CINXE.COM

CSS Values and Units Module Level 3

<!doctype html><html lang="en"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> <title>CSS Values and Units Module Level 3</title> <meta content="CRD" name="w3c-status"> <meta content="Bikeshed version 4951e4d19, updated Mon Feb 5 17:13:30 2024 -0800" name="generator"> <link href="https://www.w3.org/TR/css-values-3/" rel="canonical"> <meta content="1752d4e9f63e1989a041eb4ab8ff618376989c9f" name="revision"> <style> code, small { white-space: nowrap } pre.value { font: inherit; white-space: pre-wrap; margin: 0; padding: 0; } #propvalues td { text-align: right; } #propvalues td + td { text-align: left; } dt + dt::before { content: ", "; } dl:not(.switch) dt { display: inline; } td > small { display: block; } </style> <style> /* Put nice boxes around each algorithm. */ [data-algorithm]:not(.heading) { padding: .5em; border: thin solid #ddd; border-radius: .5em; margin: .5em calc(-0.5em - 1px); } [data-algorithm]:not(.heading) > :first-child { margin-top: 0; } [data-algorithm]:not(.heading) > :last-child { margin-bottom: 0; } [data-algorithm] [data-algorithm] { margin: 1em 0; } </style> <style>/* Boilerplate: style-autolinks */ .css.css, .property.property, .descriptor.descriptor { color: var(--a-normal-text); font-size: inherit; font-family: inherit; } .css::before, .property::before, .descriptor::before { content: "‘"; } .css::after, .property::after, .descriptor::after { content: "’"; } .property, .descriptor { /* Don't wrap property and descriptor names */ white-space: nowrap; } .type { /* CSS value <type> */ font-style: italic; } pre .property::before, pre .property::after { content: ""; } [data-link-type="property"]::before, [data-link-type="propdesc"]::before, [data-link-type="descriptor"]::before, [data-link-type="value"]::before, [data-link-type="function"]::before, [data-link-type="at-rule"]::before, [data-link-type="selector"]::before, [data-link-type="maybe"]::before { content: "‘"; } [data-link-type="property"]::after, [data-link-type="propdesc"]::after, [data-link-type="descriptor"]::after, [data-link-type="value"]::after, [data-link-type="function"]::after, [data-link-type="at-rule"]::after, [data-link-type="selector"]::after, [data-link-type="maybe"]::after { content: "’"; } [data-link-type].production::before, [data-link-type].production::after, .prod [data-link-type]::before, .prod [data-link-type]::after { content: ""; } [data-link-type=element], [data-link-type=element-attr] { font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: .9em; } [data-link-type=element]::before { content: "<" } [data-link-type=element]::after { content: ">" } [data-link-type=biblio] { white-space: pre; } @media (prefers-color-scheme: dark) { :root { --selflink-text: black; --selflink-bg: silver; --selflink-hover-text: white; } } </style> <style>/* Boilerplate: style-colors */ /* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */ :root { color-scheme: light dark; --text: black; --bg: white; --unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2016/logos/UD-watermark); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #707070; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #f8f8f8; --tocnav-active-text: #c00; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #f7f8f9; --tocsidebar-shadow: rgba(0,0,0,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #3980b5; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #005a9c; --hr-text: var(--text); --algo-border: #def; --del-text: red; --del-bg: transparent; --ins-text: #080; --ins-bg: transparent; --a-normal-text: #034575; --a-normal-underline: #bbb; --a-visited-text: var(--a-normal-text); --a-visited-underline: #707070; --a-hover-bg: rgba(75%, 75%, 75%, .25); --a-active-text: #c00; --a-active-underline: #c00; --blockquote-border: silver; --blockquote-bg: transparent; --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: #fbe9e9; --issue-text: var(--text); --issueheading-text: #831616; --example-border: #e0cb52; --example-bg: #fcfaee; --example-text: var(--text); --exampleheading-text: #574b0f; --note-border: #52e052; --note-bg: #e9fbe9; --note-text: var(--text); --noteheading-text: hsl(120, 70%, 30%); --notesummary-underline: silver; --assertion-border: #aaa; --assertion-bg: #eee; --assertion-text: black; --advisement-border: orange; --advisement-bg: #fec; --advisement-text: var(--text); --advisementheading-text: #b35f00; --warning-border: red; --warning-bg: hsla(40,100%,50%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #F5F0FF; --amendment-text: var(--text); --amendmentheading-text: #220066; --def-border: #8ccbf2; --def-bg: #def; --def-text: var(--text); --defrow-border: #bbd7e9; --datacell-border: silver; --indexinfo-text: #707070; --indextable-hover-text: black; --indextable-hover-bg: #f7f8f9; --outdatedspec-bg: rgba(0, 0, 0, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } @media (prefers-color-scheme: dark) { :root { --text: #ddd; --bg: black; --unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E"); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #999; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #080808; --tocnav-active-text: #f44; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #080808; --tocsidebar-shadow: rgba(255,255,255,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #6af; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #8af; --hr-text: var(--text); --algo-border: #456; --del-text: #f44; --del-bg: transparent; --ins-text: #4a4; --ins-bg: transparent; --a-normal-text: #6af; --a-normal-underline: #555; --a-visited-text: var(--a-normal-text); --a-visited-underline: var(--a-normal-underline); --a-hover-bg: rgba(25%, 25%, 25%, .2); --a-active-text: #f44; --a-active-underline: var(--a-active-text); --borderedblock-bg: rgba(255, 255, 255, .05); --blockquote-border: silver; --blockquote-bg: var(--borderedblock-bg); --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: var(--borderedblock-bg); --issue-text: var(--text); --issueheading-text: hsl(0deg, 70%, 70%); --example-border: hsl(50deg, 90%, 60%); --example-bg: var(--borderedblock-bg); --example-text: var(--text); --exampleheading-text: hsl(50deg, 70%, 70%); --note-border: hsl(120deg, 100%, 35%); --note-bg: var(--borderedblock-bg); --note-text: var(--text); --noteheading-text: hsl(120, 70%, 70%); --notesummary-underline: silver; --assertion-border: #444; --assertion-bg: var(--borderedblock-bg); --assertion-text: var(--text); --advisement-border: orange; --advisement-bg: #222218; --advisement-text: var(--text); --advisementheading-text: #f84; --warning-border: red; --warning-bg: hsla(40,100%,20%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #080010; --amendment-text: var(--text); --amendmentheading-text: #cc00ff; --def-border: #8ccbf2; --def-bg: #080818; --def-text: var(--text); --defrow-border: #136; --datacell-border: silver; --indexinfo-text: #aaa; --indextable-hover-text: var(--text); --indextable-hover-bg: #181818; --outdatedspec-bg: rgba(255, 255, 255, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } /* In case a transparent-bg image doesn't expect to be on a dark bg, which is quite common in practice... */ img { background: white; } } </style> <style>/* Boilerplate: style-counters */ body { counter-reset: example figure issue; } .issue { counter-increment: issue; } .issue:not(.no-marker)::before { content: "Issue " counter(issue); } .example { counter-increment: example; } .example:not(.no-marker)::before { content: "Example " counter(example); } .invalid.example:not(.no-marker)::before, .illegal.example:not(.no-marker)::before { content: "Invalid Example" counter(example); } figcaption { counter-increment: figure; } figcaption:not(.no-marker)::before { content: "Figure " counter(figure) " "; } </style> <style>/* Boilerplate: style-dfn-panel */ :root { --dfnpanel-bg: #ddd; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #ffc; --dfnpanel-target-outline: orange; } @media (prefers-color-scheme: dark) { :root { --dfnpanel-bg: #222; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #333; --dfnpanel-target-outline: silver; } } .dfn-panel { position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.75em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--dfnpanel-bg); color: var(--dfnpanel-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .dfn-panel:not(.on) { display: none; } .dfn-panel * { margin: 0; padding: 0; text-indent: 0; } .dfn-panel > b { display: block; } .dfn-panel a { color: var(--dfnpanel-text); } .dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; } .dfn-panel a:focus { outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color; } .dfn-panel > b + b { margin-top: 0.25em; } .dfn-panel ul { padding: 0 0 0 1em; list-style: none; } .dfn-panel li a { max-width: calc(300px - 1.5em - 1em); overflow: hidden; text-overflow: ellipsis; } .dfn-panel.activated { display: inline-block; position: fixed; left: 8px; bottom: 2em; margin: 0 auto; max-width: calc(100vw - 1.5em - .4em - .5em); max-height: 30vh; transition: left 1s ease-out, bottom 1s ease-out; } .dfn-panel .link-item:hover { text-decoration: underline; } .dfn-panel .link-item .copy-icon { opacity: 0; } .dfn-panel .link-item:hover .copy-icon, .dfn-panel .link-item .copy-icon:focus { opacity: 1; } .dfn-panel .copy-icon { display: inline-block; margin-right: 0.5em; width: 0.85em; height: 1em; border-radius: 3px; background-color: #ccc; cursor: pointer; } .dfn-panel .copy-icon .icon { width: 100%; height: 100%; background-color: #fff; display: flex; justify-content: center; align-items: center; position: relative; } .dfn-panel .copy-icon .icon::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid black; background-color: #ccc; opacity: 0.25; transform: translate(3px, -3px); } .dfn-panel .copy-icon:active .icon::before { opacity: 1; } .dfn-paneled[role="button"] { cursor: help; } .highlighted { animation: target-fade 3s; } @keyframes target-fade { from { background-color: var(--dfnpanel-target-bg); outline: 5px solid var(--dfnpanel-target-outline); } to { color: var(--a-normal-text); background-color: transparent; outline: transparent; } } </style> <style>/* Boilerplate: style-issues */ a[href].issue-return { float: right; float: inline-end; color: var(--issueheading-text); font-weight: bold; text-decoration: none; } </style> <style>/* Boilerplate: style-md-lists */ /* This is a weird hack for me not yet following the commonmark spec regarding paragraph and lists. */ [data-md] > :first-child { margin-top: 0; } [data-md] > :last-child { margin-bottom: 0; } </style> <style>/* Boilerplate: style-ref-hints */ :root { --ref-hint-bg: #ddd; --ref-hint-text: var(--text); } @media (prefers-color-scheme: dark) { :root { --ref-hint-bg: #222; --ref-hint-text: var(--text); } } .ref-hint { display: inline-block; position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.5em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--ref-hint-bg); color: var(--ref-hint-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .ref-hint * { margin: 0; padding: 0; text-indent: 0; } .ref-hint ul { padding: 0 0 0 1em; list-style: none; } </style> <style>/* Boilerplate: style-selflinks */ :root { --selflink-text: white; --selflink-bg: gray; --selflink-hover-text: black; } .heading, .issue, .note, .example, li, dt { position: relative; } a.self-link { position: absolute; top: 0; left: calc(-1 * (3.5rem - 26px)); width: calc(3.5rem - 26px); height: 2em; text-align: center; border: none; transition: opacity .2s; opacity: .5; } a.self-link:hover { opacity: 1; } .heading > a.self-link { font-size: 83%; } .example > a.self-link, .note > a.self-link, .issue > a.self-link { /* These blocks are overflow:auto, so positioning outside doesn't work. */ left: auto; right: 0; } li > a.self-link { left: calc(-1 * (3.5rem - 26px) - 2em); } dfn > a.self-link { top: auto; left: auto; opacity: 0; width: 1.5em; height: 1.5em; background: var(--selflink-bg); color: var(--selflink-text); font-style: normal; transition: opacity .2s, background-color .2s, color .2s; } dfn:hover > a.self-link { opacity: 1; } dfn > a.self-link:hover { color: var(--selflink-hover-text); } a.self-link::before { content: "¶"; } .heading > a.self-link::before { content: "§"; } dfn > a.self-link::before { content: "#"; } </style> <style>/* Boilerplate: style-syntax-highlighting */ code.highlight { padding: .1em; border-radius: .3em; } pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; } .highlight:not(.idl) { background: rgba(0, 0, 0, .03); } c-[a] { color: #990055 } /* Keyword.Declaration */ c-[b] { color: #990055 } /* Keyword.Type */ c-[c] { color: #708090 } /* Comment */ c-[d] { color: #708090 } /* Comment.Multiline */ c-[e] { color: #0077aa } /* Name.Attribute */ c-[f] { color: #669900 } /* Name.Tag */ c-[g] { color: #222222 } /* Name.Variable */ c-[k] { color: #990055 } /* Keyword */ c-[l] { color: #000000 } /* Literal */ c-[m] { color: #000000 } /* Literal.Number */ c-[n] { color: #0077aa } /* Name */ c-[o] { color: #999999 } /* Operator */ c-[p] { color: #999999 } /* Punctuation */ c-[s] { color: #a67f59 } /* Literal.String */ c-[t] { color: #a67f59 } /* Literal.String.Single */ c-[u] { color: #a67f59 } /* Literal.String.Double */ c-[cp] { color: #708090 } /* Comment.Preproc */ c-[c1] { color: #708090 } /* Comment.Single */ c-[cs] { color: #708090 } /* Comment.Special */ c-[kc] { color: #990055 } /* Keyword.Constant */ c-[kn] { color: #990055 } /* Keyword.Namespace */ c-[kp] { color: #990055 } /* Keyword.Pseudo */ c-[kr] { color: #990055 } /* Keyword.Reserved */ c-[ld] { color: #000000 } /* Literal.Date */ c-[nc] { color: #0077aa } /* Name.Class */ c-[no] { color: #0077aa } /* Name.Constant */ c-[nd] { color: #0077aa } /* Name.Decorator */ c-[ni] { color: #0077aa } /* Name.Entity */ c-[ne] { color: #0077aa } /* Name.Exception */ c-[nf] { color: #0077aa } /* Name.Function */ c-[nl] { color: #0077aa } /* Name.Label */ c-[nn] { color: #0077aa } /* Name.Namespace */ c-[py] { color: #0077aa } /* Name.Property */ c-[ow] { color: #999999 } /* Operator.Word */ c-[mb] { color: #000000 } /* Literal.Number.Bin */ c-[mf] { color: #000000 } /* Literal.Number.Float */ c-[mh] { color: #000000 } /* Literal.Number.Hex */ c-[mi] { color: #000000 } /* Literal.Number.Integer */ c-[mo] { color: #000000 } /* Literal.Number.Oct */ c-[sb] { color: #a67f59 } /* Literal.String.Backtick */ c-[sc] { color: #a67f59 } /* Literal.String.Char */ c-[sd] { color: #a67f59 } /* Literal.String.Doc */ c-[se] { color: #a67f59 } /* Literal.String.Escape */ c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */ c-[si] { color: #a67f59 } /* Literal.String.Interpol */ c-[sx] { color: #a67f59 } /* Literal.String.Other */ c-[sr] { color: #a67f59 } /* Literal.String.Regex */ c-[ss] { color: #a67f59 } /* Literal.String.Symbol */ c-[vc] { color: #0077aa } /* Name.Variable.Class */ c-[vg] { color: #0077aa } /* Name.Variable.Global */ c-[vi] { color: #0077aa } /* Name.Variable.Instance */ c-[il] { color: #000000 } /* Literal.Number.Integer.Long */ @media (prefers-color-scheme: dark) { .highlight:not(.idl) { background: rgba(255, 255, 255, .05); } c-[a] { color: #d33682 } /* Keyword.Declaration */ c-[b] { color: #d33682 } /* Keyword.Type */ c-[c] { color: #2aa198 } /* Comment */ c-[d] { color: #2aa198 } /* Comment.Multiline */ c-[e] { color: #268bd2 } /* Name.Attribute */ c-[f] { color: #b58900 } /* Name.Tag */ c-[g] { color: #cb4b16 } /* Name.Variable */ c-[k] { color: #d33682 } /* Keyword */ c-[l] { color: #657b83 } /* Literal */ c-[m] { color: #657b83 } /* Literal.Number */ c-[n] { color: #268bd2 } /* Name */ c-[o] { color: #657b83 } /* Operator */ c-[p] { color: #657b83 } /* Punctuation */ c-[s] { color: #6c71c4 } /* Literal.String */ c-[t] { color: #6c71c4 } /* Literal.String.Single */ c-[u] { color: #6c71c4 } /* Literal.String.Double */ c-[ch] { color: #2aa198 } /* Comment.Hashbang */ c-[cp] { color: #2aa198 } /* Comment.Preproc */ c-[cpf] { color: #2aa198 } /* Comment.PreprocFile */ c-[c1] { color: #2aa198 } /* Comment.Single */ c-[cs] { color: #2aa198 } /* Comment.Special */ c-[kc] { color: #d33682 } /* Keyword.Constant */ c-[kn] { color: #d33682 } /* Keyword.Namespace */ c-[kp] { color: #d33682 } /* Keyword.Pseudo */ c-[kr] { color: #d33682 } /* Keyword.Reserved */ c-[ld] { color: #657b83 } /* Literal.Date */ c-[nc] { color: #268bd2 } /* Name.Class */ c-[no] { color: #268bd2 } /* Name.Constant */ c-[nd] { color: #268bd2 } /* Name.Decorator */ c-[ni] { color: #268bd2 } /* Name.Entity */ c-[ne] { color: #268bd2 } /* Name.Exception */ c-[nf] { color: #268bd2 } /* Name.Function */ c-[nl] { color: #268bd2 } /* Name.Label */ c-[nn] { color: #268bd2 } /* Name.Namespace */ c-[py] { color: #268bd2 } /* Name.Property */ c-[ow] { color: #657b83 } /* Operator.Word */ c-[mb] { color: #657b83 } /* Literal.Number.Bin */ c-[mf] { color: #657b83 } /* Literal.Number.Float */ c-[mh] { color: #657b83 } /* Literal.Number.Hex */ c-[mi] { color: #657b83 } /* Literal.Number.Integer */ c-[mo] { color: #657b83 } /* Literal.Number.Oct */ c-[sa] { color: #6c71c4 } /* Literal.String.Affix */ c-[sb] { color: #6c71c4 } /* Literal.String.Backtick */ c-[sc] { color: #6c71c4 } /* Literal.String.Char */ c-[dl] { color: #6c71c4 } /* Literal.String.Delimiter */ c-[sd] { color: #6c71c4 } /* Literal.String.Doc */ c-[se] { color: #6c71c4 } /* Literal.String.Escape */ c-[sh] { color: #6c71c4 } /* Literal.String.Heredoc */ c-[si] { color: #6c71c4 } /* Literal.String.Interpol */ c-[sx] { color: #6c71c4 } /* Literal.String.Other */ c-[sr] { color: #6c71c4 } /* Literal.String.Regex */ c-[ss] { color: #6c71c4 } /* Literal.String.Symbol */ c-[fm] { color: #268bd2 } /* Name.Function.Magic */ c-[vc] { color: #cb4b16 } /* Name.Variable.Class */ c-[vg] { color: #cb4b16 } /* Name.Variable.Global */ c-[vi] { color: #cb4b16 } /* Name.Variable.Instance */ c-[vm] { color: #cb4b16 } /* Name.Variable.Magic */ c-[il] { color: #657b83 } /* Literal.Number.Integer.Long */ } </style> <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-CRD" rel="stylesheet"> <body class="h-entry"> <div class="head"> <p data-fill-with="logo"><a class="logo" href="https://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/StyleSheets/TR/2021/logos/W3C" width="72"> </a> </p> <h1 class="p-name no-ref" id="title">CSS Values and Units Module Level 3</h1> <p id="w3c-state"><a href="https://www.w3.org/standards/types#CRD">W3C Candidate Recommendation Draft</a>, <time class="dt-updated" datetime="2024-03-22">22 March 2024</time></p> <details open> <summary>More details about this document</summary> <div data-fill-with="spec-metadata"> <dl> <dt>This version: <dd><a class="u-url" href="https://www.w3.org/TR/2024/CRD-css-values-3-20240322/">https://www.w3.org/TR/2024/CRD-css-values-3-20240322/</a> <dt>Latest published version: <dd><a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a> <dt>Editor's Draft: <dd><a href="https://drafts.csswg.org/css-values-3/">https://drafts.csswg.org/css-values-3/</a> <dt>History: <dd><a class="u-url" href="https://www.w3.org/standards/history/css-values-3/">https://www.w3.org/standards/history/css-values-3/</a> <dt>Implementation Report: <dd><a href="https://drafts.csswg.org/css-values-3/implementation-report.html">https://drafts.csswg.org/css-values-3/implementation-report.html</a> <dt>Feedback: <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-values-3">CSSWG Issues Repository</a> <dt class="editor">Editors: <dd class="editor p-author h-card vcard" data-editor-id="42199"><a class="p-name fn u-url url" href="http://xanthir.com/contact/">Tab Atkins</a> (<span class="p-org org">Google</span>) <dd class="editor p-author h-card vcard" data-editor-id="35400"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Apple</span>) <dt class="editor">Former Editor: <dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:howcome@opera.com">Håkon Wium Lie</a> (<span class="p-org org">Opera Software</span>) <dt>Suggest an Edit for this Spec: <dd><a href="https://github.com/w3c/csswg-drafts/blob/main/css-values-3/Overview.bs">GitHub Editor</a> <dt>Test Suite: <dd class="wpt-overview"><a href="https://wpt.fyi/results/css/css-values/">https://wpt.fyi/results/css/css-values/</a> </dl> </div> </details> <div data-fill-with="warning"></div> <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/policies/#copyright">Copyright</a> © 2024 <a href="https://www.w3.org/">World Wide Web Consortium</a>. <abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup> <a href="https://www.w3.org/policies/#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/policies/#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/copyright/software-license/" rel="license" title="W3C Software and Document License">permissive document license</a> rules apply. </p> <hr title="Separator for header"> </div> <div class="p-summary" data-fill-with="abstract"> <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2> <p>This CSS module describes the common values and units that CSS properties accept and the syntax used for describing them in CSS property definitions.</p> <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, etc. </div> <h2 class="no-num no-toc no-ref heading settled" id="sotd"><span class="content">Status of this document</span></h2> <div data-fill-with="status"> <p><em>This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="https://www.w3.org/TR/">W3C technical reports index at https://www.w3.org/TR/.</a></em> </p> <p> This document was published by the <a href="https://www.w3.org/groups/wg/css">CSS Working Group</a> as a <strong>Candidate Recommendation Draft</strong> using the <a href="https://www.w3.org/2023/Process-20231103/#recs-and-notes">Recommendation track</a>. Publication as a Candidate Recommendation does not imply endorsement by <abbr title="World Wide Web Consortium">W3C</abbr> and its Members. A Candidate Recommendation Draft integrates changes from the previous Candidate Recommendation that the Working Group intends to include in a subsequent Candidate Recommendation Snapshot. </p> <p> This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. </p> <p>Please send feedback by <a href="https://github.com/w3c/csswg-drafts/issues">filing issues in GitHub</a> (preferred), including the spec code “css-values” in the title, like this: “[css-values] <i>…summary of comment…</i>”. All issues and comments are <a href="https://lists.w3.org/Archives/Public/public-css-archive/">archived</a>. Alternately, feedback can be sent to the (<a href="https://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list <a href="mailto:www-style@w3.org?Subject=%5Bcss-values%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a>. </p> <p>This document is governed by the <a href="https://www.w3.org/2023/Process-20231103/" id="w3c_process_revision">03 November 2023 W3C Process Document</a>. </p> <p>This document was produced by a group operating under the <a href="https://www.w3.org/Consortium/Patent-Policy-20200915/">W3C Patent Policy</a>. W3C maintains a <a href="https://www.w3.org/groups/wg/css/ipr" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/Consortium/Patent-Policy-20200915/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy-20200915/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p> <p></p> </div> <div data-fill-with="at-risk"></div> <nav data-fill-with="table-of-contents" id="toc"> <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2> <ol class="toc" role="directory"> <li> <a href="#intro"><span class="secno">1</span> <span class="content"> Introduction</span></a> <ol class="toc"> <li><a href="#placement"><span class="secno">1.1</span> <span class="content"> Module Interactions</span></a> </ol> <li> <a href="#value-defs"><span class="secno">2</span> <span class="content"> Value Definition Syntax</span></a> <ol class="toc"> <li><a href="#component-types"><span class="secno">2.1</span> <span class="content"> Component Value Types</span></a> <li><a href="#component-combinators"><span class="secno">2.2</span> <span class="content"> Component Value Combinators</span></a> <li><a href="#component-multipliers"><span class="secno">2.3</span> <span class="content"> Component Value Multipliers</span></a> <li><a href="#combinator-multiplier-patterns"><span class="secno">2.4</span> <span class="content"> Combinator and Multiplier Patterns</span></a> <li><a href="#component-whitespace"><span class="secno">2.5</span> <span class="content"> Component Values and White Space</span></a> <li><a href="#value-examples"><span class="secno">2.6</span> <span class="content"> Property Value Examples</span></a> </ol> <li> <a href="#textual-values"><span class="secno">3</span> <span class="content"> Textual Data Types</span></a> <ol class="toc"> <li> <a href="#keywords"><span class="secno">3.1</span> <span class="content"> Pre-defined Keywords</span></a> <ol class="toc"> <li><a href="#common-keywords"><span class="secno">3.1.1</span> <span class="content"> CSS-wide keywords: <span class="css">initial</span>, <span class="css">inherit</span> and <span class="css">unset</span></span></a> </ol> <li><a href="#custom-idents"><span class="secno">3.2</span> <span class="content"> Author-defined Identifiers: the <span class="production">&lt;custom-ident></span> type</span></a> <li><a href="#strings"><span class="secno">3.3</span> <span class="content"> Quoted Strings: the <span class="production">&lt;string></span> type</span></a> <li> <a href="#urls"><span class="secno">3.4</span> <span class="content"> Resource Locators: the <span class="production">&lt;url></span> type</span></a> <ol class="toc"> <li> <a href="#relative-urls"><span class="secno">3.4.1</span> <span class="content"> Relative URLs</span></a> <ol class="toc"> <li><a href="#local-urls"><span class="secno">3.4.1.1</span> <span class="content"> Fragment URLs</span></a> </ol> <li><a href="#url-empty"><span class="secno">3.4.2</span> <span class="content"> Empty URLs</span></a> <li><a href="#url-modifiers"><span class="secno">3.4.3</span> <span class="content"> URL Modifiers</span></a> </ol> </ol> <li> <a href="#numeric-types"><span class="secno">4</span> <span class="content"> Numeric Data Types</span></a> <ol class="toc"> <li><a href="#numeric-ranges"><span class="secno">4.1</span> <span class="content"> Range Restrictions and Range Definition Notation</span></a> <li><a href="#integers"><span class="secno">4.2</span> <span class="content"> Integers: the <span class="production">&lt;integer></span> type</span></a> <li><a href="#numbers"><span class="secno">4.3</span> <span class="content"> Real Numbers: the <span class="production">&lt;number></span> type</span></a> <li> <a href="#dimensions"><span class="secno">4.4</span> <span class="content"> Numbers with Units: <span>dimension</span> values</span></a> <ol class="toc"> <li><a href="#compat"><span class="secno">4.4.1</span> <span class="content"> Compatible Units</span></a> </ol> <li><a href="#percentages"><span class="secno">4.5</span> <span class="content"> Percentages: the <span class="production">&lt;percentage></span> type</span></a> <li><a href="#mixed-percentages"><span class="secno">4.6</span> <span class="content"> Mixing Percentages and Dimensions</span></a> </ol> <li> <a href="#lengths"><span class="secno">5</span> <span class="content"> Distance Units: the <span class="production">&lt;length></span> type</span></a> <ol class="toc"> <li> <a href="#relative-lengths"><span class="secno">5.1</span> <span class="content"> Relative Lengths</span></a> <ol class="toc"> <li><a href="#font-relative-lengths"><span class="secno">5.1.1</span> <span class="content"> Font-relative Lengths: the <span class="css">em</span>, <span class="css">ex</span>, <span class="css">ch</span>, <span class="css">rem</span> units</span></a> <li><a href="#viewport-relative-lengths"><span class="secno">5.1.2</span> <span class="content"> Viewport-percentage Lengths: the <span class="css">vw</span>, <span class="css">vh</span>, <span class="css">vmin</span>, <span class="css">vmax</span> units</span></a> </ol> <li><a href="#absolute-lengths"><span class="secno">5.2</span> <span class="content"> Absolute Lengths: the <span class="css">cm</span>, <span class="css">mm</span>, <span class="css">Q</span>, <span class="css">in</span>, <span class="css">pt</span>, <span class="css">pc</span>, <span class="css">px</span> units</span></a> </ol> <li> <a href="#other-units"><span class="secno">6</span> <span class="content"> Other Quantities</span></a> <ol class="toc"> <li><a href="#angles"><span class="secno">6.1</span> <span class="content"> Angle Units: the <span class="production">&lt;angle></span> type and <span class="css">deg</span>, <span class="css">grad</span>, <span class="css">rad</span>, <span class="css">turn</span> units</span></a> <li><a href="#time"><span class="secno">6.2</span> <span class="content"> Duration Units: the <span class="production">&lt;time></span> type and <span class="css">s</span>, <span class="css">ms</span> units</span></a> <li><a href="#frequency"><span class="secno">6.3</span> <span class="content"> Frequency Units: the <span class="production">&lt;frequency></span> type and <span class="css">Hz</span>, <span class="css">kHz</span> units</span></a> <li><a href="#resolution"><span class="secno">6.4</span> <span class="content"> Resolution Units: the <span class="production">&lt;resolution></span> type and <span class="css">dpi</span>, <span class="css">dpcm</span>, <span class="css">dppx</span> units</span></a> </ol> <li> <a href="#defined-elsewhere"><span class="secno">7</span> <span class="content"> Data Types Defined Elsewhere</span></a> <ol class="toc"> <li><a href="#colors"><span class="secno">7.1</span> <span class="content"> Colors: the <span class="production">&lt;color></span> type</span></a> <li><a href="#images"><span class="secno">7.2</span> <span class="content"> Images: the <span class="production">&lt;image></span> type</span></a> <li><a href="#position"><span class="secno">7.3</span> <span class="content"> 2D Positioning: the <span class="production">&lt;position></span> type</span></a> </ol> <li> <a href="#functional-notations"><span class="secno">8</span> <span class="content"> Functional Notations</span></a> <ol class="toc"> <li> <a href="#calc-notation"><span class="secno">8.1</span> <span class="content"> Mathematical Expressions: <span class="css">calc()</span></span></a> <ol class="toc"> <li><a href="#calc-syntax"><span class="secno">8.1.1</span> <span class="content"> Syntax</span></a> <li><a href="#calc-type-checking"><span class="secno">8.1.2</span> <span class="content"> Type Checking</span></a> <li><a href="#calc-computed-value"><span class="secno">8.1.3</span> <span class="content"> Computed Value</span></a> <li><a href="#calc-range"><span class="secno">8.1.4</span> <span class="content"> Range Checking</span></a> <li><a href="#calc-serialize"><span class="secno">8.1.5</span> <span class="content"> Serialization</span></a> </ol> </ol> <li> <a href="#iana"><span class="secno"></span> <span class="content"> Appendix A: IANA Considerations</span></a> <ol class="toc"> <li><a href="#about-invalid"><span class="secno"></span> <span class="content"> Registration for the <code class="highlight"><c- k>about</c-><c- p>:</c->invalid</code> URL scheme</span></a> </ol> <li><a href="#acknowledgments"><span class="secno"></span> <span class="content"> Acknowledgments</span></a> <li><a href="#changes"><span class="secno"></span> <span class="content"> Changes</span></a> <li><a href="#security"><span class="secno"></span> <span class="content"> Security Considerations</span></a> <li><a href="#privacy"><span class="secno"></span> <span class="content"> Privacy Considerations</span></a> <li> <a href="#w3c-conformance"><span class="secno"></span> <span class="content"> Conformance</span></a> <ol class="toc"> <li><a href="#w3c-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a> <li><a href="#w3c-conformance-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a> <li> <a href="#w3c-partial"><span class="secno"></span> <span class="content"> Partial implementations</span></a> <ol class="toc"> <li><a href="#w3c-conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a> </ol> <li><a href="#w3c-testing"><span class="secno"></span> <span class="content"> Non-experimental implementations</span></a> <li><a href="#w3c-cr-exit-criteria"><span class="secno"></span> <span class="content"> CR exit criteria</span></a> </ol> <li> <a href="#index"><span class="secno"></span> <span class="content">Index</span></a> <ol class="toc"> <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a> <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a> </ol> <li> <a href="#references"><span class="secno"></span> <span class="content">References</span></a> <ol class="toc"> <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a> <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a> </ol> </ol> </nav> <main> <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content"> Introduction</span><a class="self-link" href="#intro"></a></h2> <p>The value definition field of each CSS property can contain keywords, data types (which appear between <span class="css">&lt;</span> and <span class="css">></span>), and information on how they can be combined. Generic data types (<a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value">&lt;length></a> being the most widely used) that can be used by many properties are described in this specification, while more specific data types (e.g., <a class="production css" data-link-type="type">&lt;spacing-limit></a>) are described in the corresponding modules.</p> <h3 class="heading settled" data-level="1.1" id="placement"><span class="secno">1.1. </span><span class="content"> Module Interactions</span><a class="self-link" href="#placement"></a></h3> <p>This module replaces and extends the data type definitions in <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> sections <a href="https://www.w3.org/TR/CSS2/about.html#value-defs">1.4.2.1</a>, <a href="https://www.w3.org/TR/CSS2/syndata.html#values">4.3</a>, and <a href="https://www.w3.org/TR/CSS2/aural.html#aural-intro">A.2</a>.</p> <h2 class="heading settled" data-level="2" id="value-defs"><span class="secno">2. </span><span class="content"> Value Definition Syntax</span><a class="self-link" href="#value-defs"></a></h2> <p>The <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export data-lt="value definition syntax | CSS value definition syntax" id="css-value-definition-syntax">value definition syntax</dfn> described here is used to define the set of valid values for CSS properties (and the valid syntax of many other parts of CSS). A value so described can have one or more components.</p> <h3 class="heading settled" data-level="2.1" id="component-types"><span class="secno">2.1. </span><span class="content"> Component Value Types</span><a class="self-link" href="#component-types"></a></h3> <p>Component value types are designated in several ways:</p> <ol> <li data-md> <p><a href="#keywords">Keyword</a> values (such as <span class="css">auto</span>, <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-counter-styles-3/#disc" id="ref-for-disc">disc</a>, etc.), which appear literally, without quotes (e.g. <code class="highlight">auto</code>).</p> <li data-md> <p>Basic data types, which appear between <span class="css">&lt;</span> and <span class="css">></span> (e.g., <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①">&lt;length></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value">&lt;percentage></a>, etc.). For <a data-link-type="dfn" href="#numeric-data-types" id="ref-for-numeric-data-types">numeric data types</a>, this type notation can annotate any range restrictions using the <a href="#numeric-ranges">bracketed range notation</a> described below.</p> <li data-md> <p>Property value ranges, which represent the same pattern of values as a property bearing the same name. These are written as the property name, surrounded by single quotes, between <span class="css">&lt;</span> and <span class="css">></span>, e.g., <a class="production css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-border-width" id="ref-for-propdef-border-width">&lt;'border-width'></a>, <a class="production css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-background-attachment" id="ref-for-propdef-background-attachment">&lt;'background-attachment'></a>, etc.</p> <p>These types <em>do not</em> include <a href="#common-keywords">CSS-wide keywords</a> such as <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit" id="ref-for-valdef-all-inherit">inherit</a>. Additionally, if the property’s value grammar is a <a data-link-type="grammar" href="#mult-comma" id="ref-for-mult-comma">comma-separated repetition</a>, the corresponding type does not include the top-level <span id="ref-for-mult-comma①">comma-separated list multiplier</span>. (E.g. if a property named <span class="css">pairing</span> is defined as <span class="css">[ <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value">&lt;custom-ident></a> <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value">&lt;integer></a>? ]#</span>, then <span class="css">&lt;'pairing'></span> is equivalent to <span class="css">[ <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value①">&lt;custom-ident></a> <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①">&lt;integer></a>? ]</span>, not <span class="css">[ <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value②">&lt;custom-ident></a> <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value②">&lt;integer></a>? ]#</span>.)\</p> <details class="note"> <summary>Why remove the multiplier?</summary> <p>The top-level multiplier is ripped out of these value types because top-level comma-separated repetitions are mostly used for <a data-link-type="dfn" href="https://www.w3.org/TR/css-values-4/#coordinating-list-property" id="ref-for-coordinating-list-property">coordinating list properties</a>, and when a shorthand combines several such properties, it needs the unmultiplied grammar so it can construct its <em>own</em> comma-separated repetition.</p> <p>Without this special treatment, every such longhand would have to be defined with an ad-hoc production just for the inner value, which makes the grammars harder to understand overall.</p> </details> <li data-md> <p>Functional notations and their arguments. These are written as the function’s name, followed by an empty parentheses pair, between <span class="css">&lt;</span> and <span class="css">></span>, e.g. <a class="production css" data-link-type="function" href="#funcdef-calc" id="ref-for-funcdef-calc">&lt;calc()></a>, and references the correspondingly-named <a data-link-type="dfn" href="#functional-notation" id="ref-for-functional-notation">functional notation</a>.</p> <li data-md> <p>Other non-terminals. These are written as the name of the non-terminal between <span class="css">&lt;</span> and <span class="css">></span>, as in <a class="production css" data-link-type="type">&lt;spacing-limit></a>. Notice the distinction between <a class="production css" data-link-type="type" href="https://www.w3.org/TR/CSS21/box.html#value-def-border-width" id="ref-for-value-def-border-width">&lt;border-width></a> and <a class="production css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-border-width" id="ref-for-propdef-border-width①">&lt;'border-width'></a>: the latter represents the grammar of the <span class="property" id="ref-for-propdef-border-width②">border-width</span> property, the former requires an explicit expansion elsewhere. The definition of a non-terminal is typically located near its first appearance in the specification.</p> </ol> <p>Some property value definitions also include the slash (/), the comma (,), and/or parentheses as literals. These represent their corresponding tokens. Other non-keyword literal characters that may appear in a component value, such as “+”, must be written enclosed in single quotes.</p> <p><strong><dfn class="dfn-paneled" data-dfn-type="grammar" data-export data-lt="," id="comb-comma">Commas</dfn> specified in the grammar are implicitly omissible</strong> in some circumstances, when used to separate optional terms in the grammar. Within a top-level list in a property or other CSS value, or a function’s argument list, a comma specified in the grammar must be omitted if:</p> <ul> <li> all items preceding the comma have been omitted <li> all items following the comma have been omitted <li> multiple commas would be adjacent (ignoring <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a>/comments), due to the items between the commas being omitted. </ul> <div class="example" id="example-c02dd41d"> <a class="self-link" href="#example-c02dd41d"></a> For example, if a function can accept three arguments in order, but all of them are optional, the grammar can be written like: <pre class="prod highlight"><c- nf>example</c-><c- p>(</c-> first<a data-link-type="grammar" href="#mult-opt" id="ref-for-mult-opt">?</a> <a data-link-type="grammar" href="#comb-comma" id="ref-for-comb-comma"><c- p>,</c-></a> second<a data-link-type="grammar" href="#mult-opt" id="ref-for-mult-opt①">?</a> <a data-link-type="grammar" href="#comb-comma" id="ref-for-comb-comma①"><c- p>,</c-></a> third<a data-link-type="grammar" href="#mult-opt" id="ref-for-mult-opt②">?</a> <c- p>)</c-> </pre> <p>Given this grammar, writing <span class="css">example(first, second, third)</span> is valid, as is <span class="css">example(first, second)</span> or <span class="css">example(first, third)</span> or <span class="css">example(second)</span>. However, <span class="css">example(first, , third)</span> is invalid, as one of those commas are no longer separating two options; similarly, <span class="css">example(,second)</span> and <span class="css">example(first,)</span> are invalid. <span class="css">example(first second)</span> is also invalid, as commas are still required to actually separate the options.</p> <p>If commas were not implicitly omittable, the grammar would have to be much more complicated to properly express the ways that the arguments can be omitted, greatly obscuring the simplicity of the feature.</p> </div> <p>All CSS properties also accept the <a href="#common-keywords">CSS-wide keyword values</a> as the sole component of their property value. For readability these are not listed explicitly in the property value syntax definitions. For example, the full value definition of <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-border-color" id="ref-for-propdef-border-color">border-color</a> under <a data-link-type="biblio" href="#biblio-css-cascade-3" title="CSS Cascading and Inheritance Level 3">CSS Cascading and Inheritance Level 3</a> is <code class="highlight">&lt;color><c- p>{</c-><c- m>1</c-><c- p>,</c-><c- m>4</c-><c- p>}</c-> | inherit | initial | unset</code> (even though it is listed as <code class="highlight">&lt;color><c- p>{</c-><c- m>1</c-><c- p>,</c-><c- m>4</c-><c- p>}</c-></code>).</p> <p class="note" role="note"><span class="marker">Note:</span> This implies that, in general, combining these keywords with other component values in the same declaration results in an invalid declaration. For example, <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-background" id="ref-for-propdef-background">background: url(corner.png) no-repeat, inherit;</a> is invalid.</p> <h3 class="heading settled" data-level="2.2" id="component-combinators"><span class="secno">2.2. </span><span class="content"> Component Value Combinators</span><a class="self-link" href="#component-combinators"></a></h3> <p>Component values can be arranged into property values as follows:</p> <ul> <li>Juxtaposing components means that all of them must occur, in the given order. <li>A double ampersand (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="comb-all">&amp;&amp;</dfn>) separates two or more components, all of which must occur, in any order. <li>A double bar (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="comb-any">||</dfn>) separates two or more options: one or more of them must occur, in any order. <li>A bar (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="comb-one">|</dfn>) separates two or more alternatives: exactly one of them must occur. <li>Brackets ([ ]) are for grouping. </ul> <p>Juxtaposition is stronger than the double ampersand, the double ampersand is stronger than the double bar, and the double bar is stronger than the bar. Thus, the following lines are equivalent:</p> <pre class="highlight"> a b | c || d &amp;&amp; e f <c- p>[</c-> a b <c- p>]</c-> | <c- p>[</c-> c || <c- p>[</c-> d &amp;&amp; <c- p>[</c-> e f <c- p>]]]</c-> </pre> <p>For reorderable combinators (||, &amp;&amp;), ordering of the grammar does not matter: components in the same grouping may be interleaved in any order. Thus, the following lines are equivalent:</p> <pre class="highlight">a || b || c b || a || c </pre> <p class="note" role="note"><span class="marker">Note:</span> Combinators are <em>not</em> associative, so grouping is significant. For example, <span class="css">a || b || c</span> and <span class="css">a || [ b || c ]</span> are distinct grammars: the first allows a value like <span class="css">b a c</span>, but the second does not.</p> <h3 class="heading settled" data-level="2.3" id="component-multipliers"><span class="secno">2.3. </span><span class="content"> Component Value Multipliers</span><a class="self-link" href="#component-multipliers"></a></h3> <p>Every type, keyword, or bracketed group may be followed by one of the following modifiers:</p> <ul> <li>An asterisk (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="mult-zero-plus">*</dfn>) indicates that the preceding type, word, or group occurs zero or more times. <li>A plus (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="mult-one-plus">+</dfn>) indicates that the preceding type, word, or group occurs one or more times. <li>A question mark (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="mult-opt">?</dfn>) indicates that the preceding type, word, or group is optional (occurs zero or one times). <li>A single number in curly braces (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="mult-num">{<var>A</var>}</dfn>) indicates that the preceding type, word, or group occurs <var>A</var> times. <li>A comma-separated pair of numbers in curly braces (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="mult-num-range">{<var>A</var>,<var>B</var>}</dfn>) indicates that the preceding type, word, or group occurs at least <var>A</var> and at most <var>B</var> times. The <var>B</var> may be omitted ({<var>A</var>,}) to indicate that there must be at least <var>A</var> repetitions, with no upper bound on the number of repetitions. <li>A hash mark (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="mult-comma">#</dfn>) indicates that the preceding type, word, or group occurs one or more times, separated by comma tokens (which may optionally be surrounded by <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> and/or comments). It may optionally be followed by the curly brace forms, above, to indicate precisely how many times the repetition occurs, like <span class="css">&lt;length>#{1,4}</span>. <li>An exclamation point (<dfn class="dfn-paneled" data-dfn-type="grammar" data-export id="mult-req">!</dfn>) after a group indicates that the group is required and must produce at least one value; even if the grammar of the items within the group would otherwise allow the entire contents to be omitted, at least one component value must not be omitted. </ul> <p>The <span class="css">+</span> and <span class="css">#</span> multipliers may be stacked as <span class="css">+#</span>; similarly, the <span class="css">#</span> and <span class="css">?</span> multipliers may be stacked as <span class="css">#?</span>. These stacks each represent the later multiplier applied to the result of the earlier multiplier. (These same stacks can be represented using grouping, but in complex grammars this can push the number of brackets beyond readability.)</p> <p>For repeated component values (indicated by <span class="css">*</span>, <span class="css">+</span>, or <span class="css">#</span>), <a data-link-type="dfn" href="https://www.w3.org/TR/css-2023/#user-agent" id="ref-for-user-agent">UAs</a> must support at least 20 repetitions of the component. If a property value contains more than the supported number of repetitions, the declaration must be ignored as if it were invalid.</p> <h3 class="heading settled" data-level="2.4" id="combinator-multiplier-patterns"><span class="secno">2.4. </span><span class="content"> Combinator and Multiplier Patterns</span><a class="self-link" href="#combinator-multiplier-patterns"></a></h3> <p>There are a small set of common ways to combine multiple independent <a data-link-type="dfn" href="https://www.w3.org/TR/css-syntax-3/#component-value" id="ref-for-component-value">component values</a> in particular numbers and orders. In particular, it’s common to want to express that, from a set of component value, the author must select zero or more, one or more, or all of them, and in either the order specified in the grammar or in any order.</p> <p>All of these can be easily expressed using simple patterns of <a href="#component-combinators">combinators</a> and <a href="#component-multipliers">multipliers</a>:</p> <table class="data"> <thead> <tr> <th> <th>in order <th>any order <tbody> <tr> <th>zero or more <td><code class="highlight">A? B? C?</code> <td><code class="highlight">A? || B? || C?</code> <tr> <th>one or more <td><code class="highlight"><c- p>[</c-> A? B? C? <c- p>]</c->!</code> <td><code class="highlight">A || B || C</code> <tr> <th>all <td><code class="highlight">A B C </code> <td><code class="highlight">A &amp;&amp; B &amp;&amp; C</code> </table> <p>Note that all of the "any order" possibilities are expressed using combinators, while the "in order" possibilities are all variants on juxtaposition.</p> <h3 class="heading settled" data-level="2.5" id="component-whitespace"><span class="secno">2.5. </span><span class="content"> Component Values and White Space</span><a class="self-link" href="#component-whitespace"></a></h3> <p>Unless otherwise specified, <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> and/or comments may appear before, after, and/or between components combined using the above <a href="#component-combinators">combinators</a> and <a href="#component-multipliers">multipliers</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> In many cases, spaces will in fact be <em>required</em> between components in order to distinguish them from each other. For example, the value <span class="css">1em2em</span> would be parsed as a single <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-dimension-token" id="ref-for-typedef-dimension-token">&lt;dimension-token></a> with the number <span class="css">1</span> and the identifier <span class="css">em2em</span>, which is an invalid unit. In this case, a space would be required before the <span class="css">2</span> to get this parsed as the two lengths <span class="css">1em</span> and <span class="css">2em</span>.</p> <h3 class="heading settled" data-level="2.6" id="value-examples"><span class="secno">2.6. </span><span class="content"> Property Value Examples</span><a class="self-link" href="#value-examples"></a></h3> <p>Below are some examples of properties with their corresponding value definition fields</p> <div class="example" id="example-78954521"> <a class="self-link" href="#example-78954521"></a> <table class="data" id="propvalues"> <thead> <tr> <th>Property <th>Value definition field <th>Example value <tbody> <tr> <td><a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-break-3/#propdef-orphans" id="ref-for-propdef-orphans">orphans</a> <td>&lt;integer> <td><span class="css">3</span> <tr> <td><a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-text-3/#propdef-text-align" id="ref-for-propdef-text-align">text-align</a> <td>left | right | center | justify <td><a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-text-4/#valdef-text-align-center" id="ref-for-valdef-text-align-center">center</a> <tr> <td><a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-box-4/#propdef-padding-top" id="ref-for-propdef-padding-top">padding-top</a> <td>&lt;length> | &lt;percentage> <td><span class="css">5%</span> <tr> <td><a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-ui-4/#propdef-outline-color" id="ref-for-propdef-outline-color">outline-color</a> <td>&lt;color> | invert <td><span class="css">#fefefe</span> <tr> <td><a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-text-decor-4/#propdef-text-decoration" id="ref-for-propdef-text-decoration">text-decoration</a> <td>none | underline || overline || line-through || blink <td><span class="css">overline underline</span> <tr> <td><a class="css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-family" id="ref-for-propdef-font-family">font-family</a> <td>[ &lt;family-name> | &lt;generic-family> ]# <td><span class="css">"Gill Sans", Futura, sans-serif</span> <tr> <td><a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-border-width" id="ref-for-propdef-border-width③">border-width</a> <td>[ &lt;length> | thick | medium | thin ]{1,4} <td><span class="css">2px medium 4px</span> <tr> <td><a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-box-shadow" id="ref-for-propdef-box-shadow">box-shadow</a> <td>[ inset? &amp;&amp; &lt;length>{2,4} &amp;&amp; &lt;color>? ]# | none <td><span class="css">3px 3px rgba(50%, 50%, 50%, 50%), lemonchiffon 0 0 4px inset</span> </table> </div> <h2 class="heading settled" data-level="3" id="textual-values"><span class="secno">3. </span><span class="content"> Textual Data Types</span><a class="self-link" href="#textual-values"></a></h2> <p>The <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export id="css-textual-data-types">textual data types</dfn> include various keywords and identifiers as well as strings (<a class="production css" data-link-type="type" href="#string-value" id="ref-for-string-value">&lt;string></a>) and URLs (<a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value">&lt;url></a>).</p> <p>CSS <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export data-lt="CSS identifier | CSS ident | identifier | ident" id="css-css-identifier">identifiers</dfn>, generically denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-ident">&lt;ident></dfn>, consist of a sequence of characters conforming to the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-ident-token" id="ref-for-typedef-ident-token">&lt;ident-token></a> grammar. <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a> Identifiers cannot be quoted; otherwise they would be interpreted as strings. CSS properties accept two classes of <a data-link-type="dfn" href="#css-css-identifier" id="ref-for-css-css-identifier">identifiers</a>: <a href="#keywords">pre-defined keywords</a> and <a href="#custom-idents">author-defined identifiers</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> The <a class="production css" data-link-type="type" href="#typedef-ident" id="ref-for-typedef-ident">&lt;ident></a> production is not meant for property value definitions—​<a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value③">&lt;custom-ident></a> should be used instead. It is provided as a convenience for defining other syntactic constructs.</p> <h3 class="heading settled" data-level="3.1" id="keywords"><span class="secno">3.1. </span><span class="content"> Pre-defined Keywords</span><a class="self-link" href="#keywords"></a></h3> <p>In the value definition fields, <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export data-lt="keyword" id="css-keyword">keywords</dfn> with a pre-defined meaning appear literally. Keywords are <a data-link-type="dfn" href="#css-css-identifier" id="ref-for-css-css-identifier①">identifiers</a> and are interpreted <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive">ASCII case-insensitively</a> (i.e., [a-z] and [A-Z] are equivalent).</p> <div class="example" id="example-9d0ae504"> <a class="self-link" href="#example-9d0ae504"></a> For example, here is the value definition for the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/CSS21/tables.html#propdef-border-collapse" id="ref-for-propdef-border-collapse">border-collapse</a> property: <pre class="highlight"><c- k>Value</c-><c- p>:</c-> collapse | separate</pre> <p>And here is an example of its use:</p> <pre class="highlight">table <c- p>{</c-> <c- k>border-collapse</c-><c- p>:</c-> separate <c- p>}</c-></pre> </div> <h4 class="heading settled" data-level="3.1.1" id="common-keywords"><span class="secno">3.1.1. </span><span class="content"> CSS-wide keywords: <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-cascade-5/#valdef-all-initial" id="ref-for-valdef-all-initial">initial</a>, <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit" id="ref-for-valdef-all-inherit①">inherit</a> and <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-cascade-5/#valdef-all-unset" id="ref-for-valdef-all-unset">unset</a></span><a class="self-link" href="#common-keywords"></a></h4> <p>As defined <a href="#component-types">above</a>, all properties accept the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="css-wide-keywords">CSS-wide keywords</dfn>, which represent value computations common to all CSS properties. These keywords are normatively defined in the <a href="https://www.w3.org/TR/css-cascade/#defaulting-keywords">CSS Cascading and Inheritance Module</a>.</p> <p>Other CSS specifications can define additional CSS-wide keywords.</p> <h3 class="heading settled" data-level="3.2" id="custom-idents"><span class="secno">3.2. </span><span class="content"> Author-defined Identifiers: the <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value④">&lt;custom-ident></a> type</span><a class="self-link" href="#custom-idents"></a></h3> <p>Some properties accept arbitrary author-defined identifiers as a component value. This generic data type is denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="identifier-value">&lt;custom-ident></dfn>, and represents any valid <a data-link-type="dfn" href="#css-css-identifier" id="ref-for-css-css-identifier②">CSS identifier</a> that would not be misinterpreted as a pre-defined keyword in that property’s value definition. Such identifiers are fully case-sensitive, even in the ASCII range (e.g. <span class="css">example</span> and <span class="css">EXAMPLE</span> are two different, unrelated user-defined identifiers).</p> <p>The <a data-link-type="dfn" href="#css-wide-keywords" id="ref-for-css-wide-keywords">CSS-wide keywords</a> are not valid <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value⑤">&lt;custom-ident></a>s. The <span class="css">default</span> keyword is reserved and is also not a valid <span class="production" id="ref-for-identifier-value⑥">&lt;custom-ident></span>. Specifications using <span class="production" id="ref-for-identifier-value⑦">&lt;custom-ident></span> must specify clearly what other keywords are excluded from <span class="production" id="ref-for-identifier-value⑧">&lt;custom-ident></span>, if any—​for example by saying that any pre-defined keywords in that property’s value definition are excluded. Excluded keywords are excluded in all <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive①">ASCII case permutations</a>.</p> <p>When parsing positionally-ambiguous keywords in a property value, a <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value⑨">&lt;custom-ident></a> production can only claim the keyword if no other unfulfilled production can claim it.</p> <div class="example" id="example-950e3618"><a class="self-link" href="#example-950e3618"></a> For example, the shorthand declaration <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-animations-1/#propdef-animation" id="ref-for-propdef-animation">animation: ease-in ease-out</a> is equivalent to the longhand declarations <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-animations-1/#propdef-animation-timing-function" id="ref-for-propdef-animation-timing-function">animation-timing-function: ease-in; animation-name: ease-out;</a>. <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in" id="ref-for-valdef-cubic-bezier-easing-function-ease-in">ease-in</a> is claimed by the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-easing-1/#typedef-easing-function" id="ref-for-typedef-easing-function">&lt;easing-function></a> production belonging to <span class="property" id="ref-for-propdef-animation-timing-function①">animation-timing-function</span>, leaving <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-out" id="ref-for-valdef-cubic-bezier-easing-function-ease-out">ease-out</a> to be claimed by the <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value①⓪">&lt;custom-ident></a> production belonging to <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-animations-1/#propdef-animation-name" id="ref-for-propdef-animation-name">animation-name</a>. </div> <p class="note" role="note"><span class="marker">Note:</span> When designing grammars with <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value①①">&lt;custom-ident></a>, the <span class="production" id="ref-for-identifier-value①②">&lt;custom-ident></span> should always be “positionally unambiguous”, so that it’s impossible to conflict with any keyword values in the property.</p> <h3 class="heading settled" data-level="3.3" id="strings"><span class="secno">3.3. </span><span class="content"> Quoted Strings: the <a class="production css" data-link-type="type" href="#string-value" id="ref-for-string-value①">&lt;string></a> type</span><a class="self-link" href="#strings"></a></h3> <p><a data-link-type="dfn" href="https://infra.spec.whatwg.org/#string" id="ref-for-string">Strings</a> are denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="string-value">&lt;string></dfn>. When written literally, they consist of a sequence of characters delimited by double quotes or single quotes, corresponding to the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-string-token" id="ref-for-typedef-string-token">&lt;string-token></a> production in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a>.</p> <div class="example" id="example-9204e1e4"> <a class="self-link" href="#example-9204e1e4"></a> Double quotes cannot occur inside double quotes, unless <a href="https://www.w3.org/TR/CSS2/syndata.html#escaped-characters">escaped</a> (as <code class="highlight"><c- s>"\"</c->"</code> or as <code class="highlight"><c- s>"\22"</c-></code>). Analogously for single quotes (<code class="highlight"><c- s>'\'</c->'</code> or <code class="highlight"><c- s>'\27'</c-></code>). <pre class="highlight"><c- k>content</c-><c- p>:</c-> <c- s>"this is a 'string'."</c-><c- p>;</c-> <c- k>content</c-><c- p>:</c-> <c- s>"this is a \"</c->string\<c- s>"."</c-><c- p>;</c-> <c- k>content</c-><c- p>:</c-> <c- s>'this is a "string".'</c-><c- p>;</c-> <c- k>content</c-><c- p>:</c-> <c- s>'this is a \'</c->string\<c- s>'.'</c-> </pre> </div> <p>It is possible to break strings over several lines, for aesthetic or other reasons, but in such a case the newline itself has to be escaped with a backslash (\). The newline is subsequently removed from the string. For instance, the following two selectors are exactly the same:</p> <div class="example" id="example-4f7429ed"> <a class="self-link" href="#example-4f7429ed"></a> <p style="display:none">Example(s): </p> <pre class="highlight">a<c- p>[</c->title=<c- s>"a not s\</c-> <c- s>o very long title"</c-><c- p>]</c-> <c- p>{</c-><c- c>/*...*/</c-><c- p>}</c-> a<c- p>[</c->title=<c- s>"a not so very long title"</c-><c- p>]</c-> <c- p>{</c-><c- c>/*...*/</c-><c- p>}</c-> </pre> </div> <p>Since a string cannot directly represent a newline, to include a newline in a string, use the escape "\A". (Hexadecimal A is the line feed character in Unicode (U+000A), but represents the generic notion of "newline" in CSS.)</p> <h3 class="heading settled" data-level="3.4" id="urls"><span class="secno">3.4. </span><span class="content"> Resource Locators: the <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value①">&lt;url></a> type</span><a class="self-link" href="#urls"></a></h3> <p>The <dfn class="dfn-paneled css" data-dfn-type="function" data-export id="funcdef-url">url()</dfn> <a data-link-type="dfn" href="#functional-notation" id="ref-for-functional-notation①">functional notation</a>, denoted by <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value②">&lt;url></a>, represents a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="url">URL</dfn>, which is a pointer to a resource. The typical syntax of a <span class="production" id="ref-for-url-value③">&lt;url></span> is:</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="url-value">&lt;url></dfn> = <c- nf>url</c-><c- p>(</c-><c- s> </c-><a class="production" data-link-type="type" href="#string-value" id="ref-for-string-value②"><c- s>&lt;string></c-></a><c- s> </c-><a class="production" data-link-type="type" href="#typedef-url-modifier" id="ref-for-typedef-url-modifier"><c- s>&lt;url-modifier></c-></a><a data-link-type="grammar" href="#mult-zero-plus" id="ref-for-mult-zero-plus"><c- s>*</c-></a><c- s> </c-><c- p>)</c-> </pre> <div class="example" id="example-1dcaf1ec"> <a class="self-link" href="#example-1dcaf1ec"></a> This example shows a URL being used as a background image: <pre class="highlight">body <c- p>{</c-> <c- k>background</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"http://www.example.com/pinkish.gif"</c-><c- p>)</c-> <c- p>}</c-> </pre> </div> <p>A <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url">url()</a> can alternatively be written be written without quotation marks around the URL value, in which case it is <a data-link-type="dfn" href="https://www.w3.org/TR/css-syntax-3/#consume-a-url-token" id="ref-for-consume-a-url-token">specially-parsed</a> as a <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-url-token" id="ref-for-typedef-url-token">&lt;url-token></a>; see <a href="https://www.w3.org/TR/css-syntax-3/#consume-url-token"><cite>CSS Syntax 3</cite> § 4.3.6 Consume a url token</a>. <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a></p> <div class="example" id="example-2e04cf61"> <a class="self-link" href="#example-2e04cf61"></a> For example, the following declarations are identical: <pre class="highlight"><c- k>background</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"http://www.example.com/pinkish.gif"</c-><c- p>);</c-> <c- k>background</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>http://www.example.com/pinkish.gif</c-><c- p>);</c-> </pre> </div> <p class="note" role="note"><span class="marker">Note:</span> The unquoted <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①">url()</a> syntax cannot accept a <a class="production css" data-link-type="type" href="#typedef-url-modifier" id="ref-for-typedef-url-modifier①">&lt;url-modifier></a> argument and has extra escaping requirements: parentheses, <a href="https://www.w3.org/TR/css-syntax/#whitespace">whitespace</a> characters, single quotes (') and double quotes (") appearing in a URL must be escaped with a backslash, e.g. <span class="css">url(open\(parens)</span>, <span class="css">url(close\)parens)</span>. (In quoted <a class="production css" data-link-type="type" href="#string-value" id="ref-for-string-value③">&lt;string></a> <span class="css" id="ref-for-funcdef-url②">url()</span>s, only newlines and the character used to quote the string need to be escaped.) Depending on the type of URL, it might also be possible to write these characters as URL-escapes (e.g. <span class="css">url(open%28parens)</span> or <span class="css">url(close%29parens)</span>) as described in <a data-link-type="biblio" href="#biblio-url" title="URL Standard">[URL]</a>.</p> <p>Some CSS contexts (such as <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-cascade-5/#at-ruledef-import" id="ref-for-at-ruledef-import">@import</a>) also allow a <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value④">&lt;url></a> to be represented by a bare <a class="production css" data-link-type="type" href="#string-value" id="ref-for-string-value④">&lt;string></a>, without the function wrapper. In such cases the string behaves identically to a <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url③">url()</a> function containing that string.</p> <div class="example" id="example-ae720903"> <a class="self-link" href="#example-ae720903"></a> For example, the following statements act identically: <pre class="highlight"><c- n>@import</c-> <c- nf>url</c-><c- p>(</c-><c- s>"base-theme.css"</c-><c- p>);</c-> <c- n>@import</c-> <c- s>"base-theme.css"</c-><c- p>;</c-> </pre> </div> <h4 class="heading settled" data-level="3.4.1" id="relative-urls"><span class="secno">3.4.1. </span><span class="content"> Relative URLs</span><a class="self-link" href="#relative-urls"></a></h4> <p>In order to create modular style sheets that are not dependent on the absolute location of a resource, authors should use relative URLs. Relative URLs (as defined in <a data-link-type="biblio" href="#biblio-url" title="URL Standard">[URL]</a>) are resolved to full URLs using a base URL. RFC 3986, section 3, defines the normative algorithm for this process. For CSS style sheets, the base URL is that of the style sheet itself, not that of the styled source document. Style sheets embedded within a document have the base URL associated with their container.</p> <p class="note" role="note"><span class="marker">Note:</span> For HTML documents, the <a href="https://html.spec.whatwg.org/multipage/urls-and-fetching.html#dynamic-changes-to-base-urls">base URL is mutable</a>.</p> <p>When a <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value⑤">&lt;url></a> appears in the computed value of a property, it is resolved to an absolute URL, as described in the preceding paragraph. The computed value of a URL that the <a data-link-type="dfn" href="https://www.w3.org/TR/css-2023/#user-agent" id="ref-for-user-agent①">UA</a> cannot resolve to an absolute URL is the specified value.</p> <div class="example" id="example-b514611a"> <a class="self-link" href="#example-b514611a"></a> For example, suppose the following rule: <pre class="highlight">body <c- p>{</c-> <c- k>background</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>"tile.png"</c-><c- p>)</c-> <c- p>}</c-></pre> <p>is located in a style sheet designated by the URL:</p> <pre class="highlight"><c- k>http</c-><c- p>:</c->//www.example.org/style/basic.css</pre> <p>The background of the source document’s <code class="highlight">&lt;body></code> will be tiled with whatever image is described by the resource designated by the URL:</p> <pre class="highlight"><c- k>http</c-><c- p>:</c->//www.example.org/style/tile.png</pre> <p>The same image will be used regardless of the URL of the source document containing the <code class="highlight">&lt;body></code>.</p> </div> <h5 class="heading settled" data-level="3.4.1.1" id="local-urls"><span class="secno">3.4.1.1. </span><span class="content"> Fragment URLs</span><a class="self-link" href="#local-urls"></a></h5> <p>To work around some common eccentricities in browser URL handling, CSS has special behavior for fragment-only urls.</p> <p>If a <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url④">url()</a>’s value starts with a U+0023 NUMBER SIGN (<code class="highlight">#</code>) character, parse it as per normal for URLs, but additionally set the <dfn class="dfn-paneled" data-dfn-for="url()" data-dfn-type="dfn" data-export id="url-local-url-flag">local url flag</dfn> of the <span class="css" id="ref-for-funcdef-url⑤">url()</span>.</p> <p>When matching a <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url⑥">url()</a> with the <a data-link-type="dfn" href="#url-local-url-flag" id="ref-for-url-local-url-flag">local url flag</a> set, ignore everything but the URL’s fragment, and resolve that fragment against the current document that relative URLs are resolved against. This reference must always be treated as same-document (rather than cross-document).</p> <p>When <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">serializing</a> a <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url⑦">url()</a> with the <a data-link-type="dfn" href="#url-local-url-flag" id="ref-for-url-local-url-flag①">local url flag</a> set, it must serialize as just the fragment.</p> <details class="note"> <summary>What “browser eccentricities”?</summary> <p>Theoretically, browsers should re-resolve any relative URLs, including fragment-only URLs, whenever the document’s base URL changes (such as through mutation of the <code class="highlight"><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/semantics.html#the-base-element" id="ref-for-the-base-element">base</a></code> element, or calling <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-history-pushstate" id="ref-for-dom-history-pushstate">pushState()</a></code>). In many cases they don’t, however, and so without special handling, fragment-only URLs will suddenly become cross-document references (pointing at the previous base URL) and break in many of the places they’re used.</p> <p>Since fragment-only URLs express a clear semantic of wanting to refer to the current document regardless of what its current URL is, this hack preserves the expected behavior at least in these cases.</p> </details> <h4 class="heading settled" data-level="3.4.2" id="url-empty"><span class="secno">3.4.2. </span><span class="content"> Empty URLs</span><a class="self-link" href="#url-empty"></a></h4> <p>If the value of the <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value⑥">&lt;url></a> is the empty string (like <span class="css">url("")</span> or <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url⑧">url()</a>), the url must resolve to an invalid resource (similar to what the url <span class="css">about:invalid</span> does).</p> <p>Its computed value is <span class="css">url("")</span>, and it must serialize as such.</p> <p class="note" role="note"><span class="marker">Note:</span> This matches the behavior of empty urls for embedded resources elsewhere in the web platform, and avoids excess traffic re-requesting the stylesheet or host document due to editing mistakes leaving the <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url⑨">url()</a> value empty, which are almost certain to be invalid resources for whatever the <span class="css" id="ref-for-funcdef-url①⓪">url()</span> shows up in. Linking on the web platform <em>does</em> allow empty urls, so if/when CSS gains some functionality to control hyperlinks, this restriction can be relaxed in those contexts.</p> <h4 class="heading settled" data-level="3.4.3" id="url-modifiers"><span class="secno">3.4.3. </span><span class="content"> URL Modifiers</span><a class="self-link" href="#url-modifiers"></a></h4> <p>The <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①①">url()</a> function supports specifying additional <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-url-modifier">&lt;url-modifier></dfn>s, which change the meaning or the interpretation of the URL somehow. A <a class="production css" data-link-type="type" href="#typedef-url-modifier" id="ref-for-typedef-url-modifier②">&lt;url-modifier></a> is either an <a class="production css" data-link-type="type" href="#typedef-ident" id="ref-for-typedef-ident①">&lt;ident></a> or a <a data-link-type="dfn" href="#functional-notation" id="ref-for-functional-notation②">functional notation</a>.</p> <p>This specification does not define any <a class="production css" data-link-type="type" href="#typedef-url-modifier" id="ref-for-typedef-url-modifier③">&lt;url-modifier></a>s, but other specs may do so.</p> <p class="note" role="note"><span class="marker">Note:</span> A <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value⑦">&lt;url></a> that is either unquoted or not wrapped in <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①②">url()</a> notation cannot accept any <a class="production css" data-link-type="type" href="#typedef-url-modifier" id="ref-for-typedef-url-modifier④">&lt;url-modifier></a>s.</p> <h2 class="heading settled" data-level="4" id="numeric-types"><span class="secno">4. </span><span class="content"> Numeric Data Types</span><a class="self-link" href="#numeric-types"></a></h2> <p>Numeric data types are used to represent quantities, indexes, positions, and other such values. Although many syntactic variations can exist in expressing the quantity (numeric aspect) in a given numeric value, the <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#specified-value" id="ref-for-specified-value">specified</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#computed-value" id="ref-for-computed-value">computed value</a> do not distinguish these variations: they represent the value’s abstract quantity, not its syntactic representation.</p> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="numeric-data-types">numeric data types</dfn> include <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value③">&lt;integer></a>, <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value">&lt;number></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①">&lt;percentage></a>, and various <a data-link-type="dfn" href="#dimension" id="ref-for-dimension">dimensions</a> including <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value②">&lt;length></a>, <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value">&lt;angle></a>, <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value">&lt;time></a>, <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value">&lt;frequency></a>, and <a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value">&lt;resolution></a>.</p> <p class="note" role="note"><span class="marker">Note:</span> While general-purpose <a data-link-type="dfn" href="#dimension" id="ref-for-dimension①">dimensions</a> are defined here, some other modules define additional data types (e.g. <a data-link-type="biblio" href="#biblio-css-grid-1" title="CSS Grid Layout Module Level 1">[css-grid-1]</a> introduces <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-grid-2/#valdef-flex-fr" id="ref-for-valdef-flex-fr">fr</a> units) whose usage is more localized.</p> <h3 class="heading settled" data-level="4.1" id="numeric-ranges"><span class="secno">4.1. </span><span class="content"> Range Restrictions and Range Definition Notation</span><a class="self-link" href="#numeric-ranges"></a></h3> <p>Properties can restrict numeric values to some range. If the value is outside the allowed range, then unless otherwise specified, the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS2/conform.html#ignore">ignored</a>. Range restrictions can be annotated in the numeric type notation using <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="bracketed range notation" id="css-bracketed-range-notation">CSS bracketed range notation</dfn>—​<code class="highlight"><c- p>[</c-><var>min</var><c- p>,</c-><var>max</var><c- p>]</c-></code>—​within the angle brackets, after the identifying keyword, indicating a closed range between (and including) <var>min</var> and <var>max</var>. For example, <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value④">&lt;integer [0,10]></a> indicates an integer between <span class="css">0</span> and <span class="css">10</span>, inclusive, while <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value①">&lt;angle [0,180deg]></a> indicates an angle between <span class="css">0deg</span> and <span class="css">180deg</span> (expressed in any unit).</p> <p class="note" role="note"><span class="marker">Note:</span> CSS values generally do not allow open ranges; thus only square-bracket notation is used.</p> <p>CSS theoretically supports infinite precision and infinite ranges for all value types; however in reality implementations have finite capacity. <a data-link-type="dfn" href="https://www.w3.org/TR/css-2023/#user-agent" id="ref-for-user-agent②">UAs</a> should support reasonably useful ranges and precisions. Range extremes that are ideally unlimited are indicated using ∞ or −∞ as appropriate. For example, <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value③">&lt;length [0,∞]></a> indicates a non-negative length.</p> <p>If no range is indicated, either by using the <a data-link-type="dfn" href="#css-bracketed-range-notation" id="ref-for-css-bracketed-range-notation">bracketed range notation</a> or in the property description, then <code class="highlight"><c- p>[</c->−∞<c- p>,</c->∞<c- p>]</c-></code> is assumed.</p> <p>Values of −∞ or ∞ must be written without units, even if the value type uses units. Values of <span class="css">0</span> <em>can</em> be written without units, even if the value type doesn’t allow “unitless zeroes” (such as <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value①">&lt;time></a>).</p> <p class="note" role="note"><span class="marker">Note:</span> At the time of writing, the <a data-link-type="dfn" href="#css-bracketed-range-notation" id="ref-for-css-bracketed-range-notation①">bracketed range notation</a> is new; thus in most CSS specifications any range limitations are described only in prose. (For example, “Negative values are not allowed” or “Negative values are invalid” indicate a <code class="highlight"><c- p>[</c-><c- m>0</c-><c- p>,</c->∞<c- p>]</c-></code> range.) This does not make them any less binding.</p> <h3 class="heading settled" data-level="4.2" id="integers"><span class="secno">4.2. </span><span class="content"> Integers: the <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value⑤">&lt;integer></a> type</span><a class="self-link" href="#integers"></a></h3> <p>Integer values are denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="integer-value">&lt;integer></dfn>.</p> <p>When written literally, an <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="integer">integer</dfn> is one or more decimal digits <span class="css">0</span> through <span class="css">9</span> and corresponds to a subset of the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token">&lt;number-token></a> production in the CSS Syntax Module <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a>. The first digit of an integer may be immediately preceded by <span class="css">-</span> or <span class="css">+</span> to indicate the integer’s sign.</p> <h3 class="heading settled" data-level="4.3" id="numbers"><span class="secno">4.3. </span><span class="content"> Real Numbers: the <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①">&lt;number></a> type</span><a class="self-link" href="#numbers"></a></h3> <p>Number values are denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="number-value">&lt;number></dfn>, and represent real numbers, possibly with a fractional component.</p> <p>When written literally, a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="number">number</dfn> is either an <a data-link-type="dfn" href="#integer" id="ref-for-integer">integer</a>, or zero or more decimal digits followed by a dot (.) followed by one or more decimal digits; optionally, it can be concluded by the letter “e” or “E” followed by an integer indicating the base-ten exponent in <a href="https://en.wikipedia.org/wiki/Scientific_notation">scientific notation</a>. It corresponds to the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token①">&lt;number-token></a> production in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a>. As with integers, the first character of a number may be immediately preceded by <span class="css">-</span> or <span class="css">+</span> to indicate the number’s sign.</p> <h3 class="heading settled" data-level="4.4" id="dimensions"><span class="secno">4.4. </span><span class="content"> Numbers with Units: <a data-link-type="dfn" href="#dimension" id="ref-for-dimension②">dimension</a> values</span><a class="self-link" href="#dimensions"></a></h3> <p>The general term <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="dimension">dimension</dfn> refers to a number with a unit attached to it; and is denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-dimension">&lt;dimension></dfn>.</p> <p>When written literally, a <a data-link-type="dfn" href="#dimension" id="ref-for-dimension③">dimension</a> is a <a data-link-type="dfn" href="#number" id="ref-for-number">number</a> immediately followed by a unit identifier, which is an <a data-link-type="dfn" href="#css-css-identifier" id="ref-for-css-css-identifier③">identifier</a>. It corresponds to the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-dimension-token" id="ref-for-typedef-dimension-token①">&lt;dimension-token></a> production in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a>. Like keywords, unit identifiers are <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive②">ASCII case-insensitive</a>.</p> <p>CSS uses <a class="production css" data-link-type="type" href="#typedef-dimension" id="ref-for-typedef-dimension">&lt;dimension></a>s to specify distances (<a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value④">&lt;length></a>), durations (<a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value②">&lt;time></a>), frequencies (<a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value①">&lt;frequency></a>), resolutions (<a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value①">&lt;resolution></a>), and other quantities.</p> <h4 class="heading settled" data-level="4.4.1" id="compat"><span class="secno">4.4.1. </span><span class="content"> Compatible Units</span><a class="self-link" href="#compat"></a></h4> <p>When <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">serializing</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#computed-value" id="ref-for-computed-value①">computed values</a> <a data-link-type="biblio" href="#biblio-cssom" title="CSS Object Model (CSSOM)">[CSSOM]</a>, <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="compatible" id="compatible-units">compatible units</dfn> (those related by a static multiplicative factor, like the 96:1 factor between <a class="css" data-link-type="maybe" href="#px" id="ref-for-px">px</a> and <a class="css" data-link-type="maybe" href="#in" id="ref-for-in">in</a>, or the computed <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-size" id="ref-for-propdef-font-size">font-size</a> factor between <a class="css" data-link-type="maybe" href="#em" id="ref-for-em">em</a> and <span class="css" id="ref-for-px①">px</span>) are converted into a single <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="canonical" id="canonical-unit">canonical unit</dfn>. Each group of compatible units defines which among them is the <a data-link-type="dfn" href="#canonical-unit" id="ref-for-canonical-unit">canonical unit</a> that will be used for serialization.</p> <p>When serializing <a href="https://www.w3.org/TR/cssom-1/#resolved-values">resolved values</a> that are <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#used-value" id="ref-for-used-value">used values</a>, all value types (percentages, numbers, keywords, etc.) that represent lengths are considered <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units">compatible</a> with lengths. Likewise any future API that returns <span id="ref-for-used-value①">used values</span> must consider any values that represent distances/durations/frequencies/etc. as <span id="ref-for-compatible-units①">compatible</span> with the relevant class of <a data-link-type="dfn" href="#dimension" id="ref-for-dimension④">dimensions</a>, and canonicalize accordingly.</p> <h3 class="heading settled" data-level="4.5" id="percentages"><span class="secno">4.5. </span><span class="content"> Percentages: the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value②">&lt;percentage></a> type</span><a class="self-link" href="#percentages"></a></h3> <p>Percentage values are denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="percentage-value">&lt;percentage></dfn>, and indicates a value that is some fraction of another reference value.</p> <p>When written literally, a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="percentage">percentage</dfn> consists of a <a data-link-type="dfn" href="#number" id="ref-for-number①">number</a> immediately followed by a percent sign <span class="css">%</span>. It corresponds to the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-percentage-token" id="ref-for-typedef-percentage-token">&lt;percentage-token></a> production in the <a href="https://www.w3.org/TR/css-syntax/">CSS Syntax Module</a> <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a>.</p> <p>Percentage values are always relative to another quantity, for example a length. Each property that allows percentages also defines the quantity to which the percentage refers. This quantity can be a value of another property for the same element, the value of a property for an ancestor element, a measurement of the formatting context (e.g., the width of a <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#containing-block" id="ref-for-containing-block">containing block</a>), or something else.</p> <h3 class="heading settled" data-level="4.6" id="mixed-percentages"><span class="secno">4.6. </span><span class="content"> Mixing Percentages and Dimensions</span><a class="self-link" href="#mixed-percentages"></a></h3> <p>In cases where a <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value③">&lt;percentage></a> can represent the same quantity as a <a data-link-type="dfn" href="#dimension" id="ref-for-dimension⑤">dimension</a> in the same <a data-link-type="dfn" href="https://www.w3.org/TR/css-syntax-3/#component-value" id="ref-for-component-value①">component value</a> position, and can therefore be combined with them in a <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①">calc()</a> expression, the following convenience notations may be used in the property grammar:</p> <dl> <dt data-md><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-length-percentage">&lt;length-percentage></dfn> <dd data-md> <p>Equivalent to <code class="prod highlight"><c- p>[</c-> <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value⑤">&lt;length></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one">|</a> <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value④">&lt;percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑤">&lt;percentage></a> will resolve to a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value⑥">&lt;length></a>.</p> <dt data-md><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-frequency-percentage">&lt;frequency-percentage></dfn> <dd data-md> <p>Equivalent to <code class="prod highlight"><c- p>[</c-> <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value②">&lt;frequency></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①">|</a> <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑥">&lt;percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑦">&lt;percentage></a> will resolve to a <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value③">&lt;frequency></a>.</p> <dt data-md><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-angle-percentage">&lt;angle-percentage></dfn> <dd data-md> <p>Equivalent to <code class="prod highlight"><c- p>[</c-> <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value②">&lt;angle></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②">|</a> <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑧">&lt;percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑨">&lt;percentage></a> will resolve to an <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value③">&lt;angle></a>.</p> <dt data-md><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-time-percentage">&lt;time-percentage></dfn> <dd data-md> <p>Equivalent to <code class="prod highlight"><c- p>[</c-> <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value③">&lt;time></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one③">|</a> <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⓪">&lt;percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①①">&lt;percentage></a> will resolve to a <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value④">&lt;time></a>.</p> </dl> <div class="example" id="example-10c2940e"> <a class="self-link" href="#example-10c2940e"></a> For example, the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-sizing-3/#propdef-width" id="ref-for-propdef-width">width</a> property can accept a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value⑦">&lt;length></a> or a <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①②">&lt;percentage></a>, both representing a measure of distance. This means that <span class="css" id="ref-for-propdef-width①">width: calc(500px + 50%);</span> is allowed—​both values are converted to absolute lengths and added. If the containing block is <span class="css">1000px</span> wide, then <span class="css" id="ref-for-propdef-width②">width: 50%;</span> is equivalent to <span class="css" id="ref-for-propdef-width③">width: 500px</span>, and <span class="css" id="ref-for-propdef-width④">width: calc(50% + 500px)</span> thus ends up equivalent to <span class="css" id="ref-for-propdef-width⑤">width: calc(500px + 500px)</span> or <span class="css" id="ref-for-propdef-width⑥">width: 1000px</span>. <p>On the other hand, the second and third arguments of the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-color-4/#funcdef-hsl" id="ref-for-funcdef-hsl">hsl()</a> function can only be expressed as <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①③">&lt;percentage></a>s. Although <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②">calc()</a> productions are allowed in their place, they can only combine percentages with themselves, as in <span class="css">calc(10% + 20%)</span>.</p> </div> <p class="note" role="note"><span class="marker">Note:</span> Specifications should never alternate <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①④">&lt;percentage></a> in place of a dimension in a grammar unless they are <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units②">compatible</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> More &lt;<var>type</var>-percentage> productions can be added in the future as needed. A &lt;number-percentage> will never be added, as <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value②">&lt;number></a> and <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑤">&lt;percentage></a> can’t be combined in <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc③">calc()</a>.</p> <h2 class="heading settled" data-level="5" id="lengths"><span class="secno">5. </span><span class="content"> Distance Units: the <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value⑧">&lt;length></a> type</span><a class="self-link" href="#lengths"></a></h2> <p>Lengths refer to distance measurements and are denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="length-value">&lt;length></dfn> in the property definitions. A length is a <a data-link-type="dfn" href="#dimension" id="ref-for-dimension⑥">dimension</a>.</p> <p>For zero lengths the unit identifier is optional (i.e. can be syntactically represented as the <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value③">&lt;number></a> <span class="css">0</span>). However, if a <span class="css">0</span> could be parsed as either a <span class="production" id="ref-for-number-value④">&lt;number></span> or a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value⑨">&lt;length></a> in a property (such as <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height">line-height</a>), it must parse as a <span class="production" id="ref-for-number-value⑤">&lt;number></span>.</p> <p>Properties may restrict the length value to some range. If the value is outside the allowed range, the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS2/conform.html#ignore">ignored</a>.</p> <p>While some properties allow negative length values, this may complicate the formatting and there may be implementation-specific limits. If a negative length value is allowed but cannot be supported, it must be converted to the nearest value that can be supported.</p> <p>In cases where the <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#used-value" id="ref-for-used-value②">used</a> length cannot be supported, user agents must approximate it in the <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#actual-value" id="ref-for-actual-value">actual</a> value.</p> <p>There are two types of length units: <a data-link-type="dfn" href="#relative-length" id="ref-for-relative-length">relative</a> and <a data-link-type="dfn" href="#absolute-length" id="ref-for-absolute-length">absolute</a>.</p> <h3 class="heading settled" data-level="5.1" id="relative-lengths"><span class="secno">5.1. </span><span class="content"> Relative Lengths</span><a class="self-link" href="#relative-lengths"></a></h3> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="relative length | relative length unit" data-noexport id="relative-length">Relative length units</dfn> specify a length relative to another length. Style sheets that use relative units can more easily scale from one output environment to another.</p> <p>The relative units are:</p> <table class="data"> <caption>Informative Summary of Relative Units</caption> <thead> <tr> <th>unit <th>relative to <tbody> <tr> <td><a class="css" data-link-type="maybe" href="#em" id="ref-for-em①">em</a> <td>font size of the element <tr> <td><a class="css" data-link-type="maybe" href="#ex" id="ref-for-ex">ex</a> <td>x-height of the element’s font <tr> <td><a class="css" data-link-type="maybe" href="#ch" id="ref-for-ch">ch</a> <td><a data-link-type="dfn" href="#length-advance-measure" id="ref-for-length-advance-measure">character advance</a> of the “0” (ZERO, U+0030) glyph in the element’s font <tr> <td><a class="css" data-link-type="maybe" href="#rem" id="ref-for-rem">rem</a> <td>font size of the root element <tr> <td><a class="css" data-link-type="maybe" href="#vw" id="ref-for-vw">vw</a> <td>1% of viewport’s width <tr> <td><a class="css" data-link-type="maybe" href="#vh" id="ref-for-vh">vh</a> <td>1% of viewport’s height <tr> <td><a class="css" data-link-type="maybe" href="#vmin" id="ref-for-vmin">vmin</a> <td>1% of viewport’s smaller dimension <tr> <td><a class="css" data-link-type="maybe" href="#vmax" id="ref-for-vmax">vmax</a> <td>1% of viewport’s larger dimension </table> <p>Child elements do not inherit the relative values as specified for their parent; they inherit the <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#computed-value" id="ref-for-computed-value②">computed values</a>.</p> <h4 class="heading settled" data-level="5.1.1" id="font-relative-lengths"><span class="secno">5.1.1. </span><span class="content"> Font-relative Lengths: the <a class="css" data-link-type="maybe" href="#em" id="ref-for-em②">em</a>, <a class="css" data-link-type="maybe" href="#ex" id="ref-for-ex①">ex</a>, <a class="css" data-link-type="maybe" href="#ch" id="ref-for-ch①">ch</a>, <a class="css" data-link-type="maybe" href="#rem" id="ref-for-rem①">rem</a> units</span><a class="self-link" href="#font-relative-lengths"></a></h4> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="font-relative-length">font-relative lengths</dfn> refer to the font metrics of the element on which they are used—​or, in the case of <a class="css" data-link-type="maybe" href="#rem" id="ref-for-rem②">rem</a>, the metrics of the root element.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="em | em unit" id="em">em</dfn> <dd> Equal to the computed value of the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-size" id="ref-for-propdef-font-size①">font-size</a> property of the element on which it is used. <div class="example" id="example-83bc8a19"> <a class="self-link" href="#example-83bc8a19"></a> The rule: <pre class="highlight">h1 <c- p>{</c-> <c- k>line-height</c-><c- p>:</c-> <c- m>1.2</c-><c- k>em</c-> <c- p>}</c-></pre> <p>means that the line height of <code class="highlight">h1</code> elements will be 20% greater than the font size of <code class="highlight">h1</code> element. On the other hand:</p> <pre class="highlight">h1 <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>1.2</c-><c- k>em</c-> <c- p>}</c-></pre> <p>means that the font size of <code class="highlight">h1</code> elements will be 20% greater than the computed font size inherited by <code class="highlight">h1</code> elements.</p> </div> <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="rem | rem unit" id="rem">rem</dfn> <dd> Equal to the computed value of the <a class="css" data-link-type="maybe" href="#em" id="ref-for-em③">em</a> unit on the root element. <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="ex | ex unit" id="ex">ex unit</dfn> <dd> Equal to the used x-height of the <a href="https://www.w3.org/TR/css3-fonts/#first-available-font">first available font</a> <a data-link-type="biblio" href="#biblio-css3-fonts" title="CSS Fonts Module Level 3">[CSS3-FONTS]</a>. The x-height is so called because it is often equal to the height of the lowercase "x". However, an <a class="css" data-link-type="maybe" href="#ex" id="ref-for-ex②">ex</a> is defined even for fonts that do not contain an "x". The x-height of a font can be found in different ways. Some fonts contain reliable metrics for the x-height. If reliable font metrics are not available, <a data-link-type="dfn" href="https://www.w3.org/TR/css-2023/#user-agent" id="ref-for-user-agent③">UAs</a> may determine the x-height from the height of a lowercase glyph. One possible heuristic is to look at how far the glyph for the lowercase "o" extends below the baseline, and subtract that value from the top of its bounding box. In the cases where it is impossible or impractical to determine the x-height, a value of 0.5em must be assumed. <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="ch | ch unit" id="ch">ch unit</dfn> <dd> Represents the typical <a data-link-type="dfn" href="#length-advance-measure" id="ref-for-length-advance-measure①">advance measure</a> of European alphanumeric characters, and measured as the used <span id="ref-for-length-advance-measure②">advance measure</span> of the “0” (ZERO, U+0030) glyph in the font used to render it. (The <dfn class="dfn-paneled" data-dfn-for="<length>" data-dfn-type="dfn" data-export id="length-advance-measure">advance measure</dfn> of a glyph is its advance width or height, whichever is in the inline axis of the element.) <p class="note" role="note"><span class="marker">Note:</span> This measurement is an approximation (and in monospace fonts, an exact measure) of a single narrow glyph’s <a data-link-type="dfn" href="#length-advance-measure" id="ref-for-length-advance-measure③">advance measure</a>, thus allowing measurements based on an expected glyph count.</p> <p class="note" role="note"><span class="marker">Note:</span> The advance measure of a glyph depends on writing-mode and text-orientation as well as font settings, text-transform, and any other properties that affect glyph selection or orientation.</p> <p>In the cases where it is impossible or impractical to determine the measure of the “0” glyph, it must be assumed to be 0.5em wide by 1em tall. Thus, the <a class="css" data-link-type="maybe" href="#ch" id="ref-for-ch②">ch</a> unit falls back to <span class="css">0.5em</span> in the general case, and to <span class="css">1em</span> when it would be typeset upright (i.e. <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode">writing-mode</a> is <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-rl" id="ref-for-valdef-writing-mode-vertical-rl">vertical-rl</a> or <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-lr" id="ref-for-valdef-writing-mode-vertical-lr">vertical-lr</a> and <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-4/#propdef-text-orientation" id="ref-for-propdef-text-orientation">text-orientation</a> is <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright" id="ref-for-valdef-text-orientation-upright">upright</a>).</p> </dl> <p>When used outside the context of an element (such as in <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#media-query" id="ref-for-media-query">media queries</a>), these units refer to the computed font metrics corresponding to the initial values of the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font" id="ref-for-propdef-font">font</a> property. When used in the value of the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-size" id="ref-for-propdef-font-size②">font-size</a> property on the element they refer to, these units refer to the computed font metrics of the parent element (or the computed font metrics corresponding to the initial values of the <span class="property" id="ref-for-propdef-font①">font</span> property, if the element has no parent).</p> <p>The <a data-link-type="dfn" href="#font-relative-length" id="ref-for-font-relative-length">font-relative lengths</a> are calculated in the absence of shaping.</p> <h4 class="heading settled" data-level="5.1.2" id="viewport-relative-lengths"><span class="secno">5.1.2. </span><span class="content"> Viewport-percentage Lengths: the <a class="css" data-link-type="maybe" href="#vw" id="ref-for-vw①">vw</a>, <a class="css" data-link-type="maybe" href="#vh" id="ref-for-vh①">vh</a>, <a class="css" data-link-type="maybe" href="#vmin" id="ref-for-vmin①">vmin</a>, <a class="css" data-link-type="maybe" href="#vmax" id="ref-for-vmax①">vmax</a> units</span><a class="self-link" href="#viewport-relative-lengths"></a></h4> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="viewport-percentage-lengths">viewport-percentage lengths</dfn> are relative to the size of the <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">initial containing block</a>—​which is itself based on the size of either the viewport (for <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#continuous-media" id="ref-for-continuous-media">continuous media</a>) or the <a data-link-type="dfn" href="https://www.w3.org/TR/css-page-3/#page-area" id="ref-for-page-area">page area</a> (for <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#paged-media" id="ref-for-paged-media">paged media</a>). When the height or width of the initial containing block is changed, they are scaled accordingly. However, any scrollbars are assumed not to exist.</p> <p>For <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#paged-media" id="ref-for-paged-media①">paged media</a>, the exact definition of the viewport-percentage lengths is deferred to <a data-link-type="biblio" href="#biblio-css3page" title="CSS Paged Media Module Level 3">[CSS3PAGE]</a>.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="vw" id="vw">vw unit</dfn> <dd> Equal to 1% of the width of the initial containing block. <div class="example" id="example-6068ee5d"> <a class="self-link" href="#example-6068ee5d"></a> In the example below, if the width of the viewport is 200mm, the font size of <code class="highlight">h1</code> elements will be 16mm (i.e. (8×200mm)/100). <pre class="highlight">h1 <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>8</c-><c- k>vw</c-> <c- p>}</c-></pre> </div> <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="vh" id="vh">vh unit</dfn> <dd> Equal to 1% of the height of the initial containing block. <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="vmin" id="vmin">vmin unit</dfn> <dd> Equal to the smaller of <a class="css" data-link-type="maybe" href="#vw" id="ref-for-vw②">vw</a> or <a class="css" data-link-type="maybe" href="#vh" id="ref-for-vh②">vh</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export data-lt="vmax" id="vmax">vmax unit</dfn> <dd> Equal to the larger of <a class="css" data-link-type="maybe" href="#vw" id="ref-for-vw③">vw</a> or <a class="css" data-link-type="maybe" href="#vh" id="ref-for-vh③">vh</a>. </dl> <h3 class="heading settled" data-level="5.2" id="absolute-lengths"><span class="secno">5.2. </span><span class="content"> Absolute Lengths: the <a class="css" data-link-type="maybe" href="#cm" id="ref-for-cm">cm</a>, <a class="css" data-link-type="maybe" href="#mm" id="ref-for-mm">mm</a>, <a class="css" data-link-type="maybe" href="#Q" id="ref-for-Q">Q</a>, <a class="css" data-link-type="maybe" href="#in" id="ref-for-in①">in</a>, <a class="css" data-link-type="maybe" href="#pt" id="ref-for-pt">pt</a>, <a class="css" data-link-type="maybe" href="#pc" id="ref-for-pc">pc</a>, <a class="css" data-link-type="maybe" href="#px" id="ref-for-px②">px</a> units</span><a class="self-link" href="#absolute-lengths"></a></h3> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="absolute length | absolute length unit" data-noexport id="absolute-length">absolute length units</dfn> are fixed in relation to each other and <a data-link-type="dfn" href="#anchor-unit" id="ref-for-anchor-unit">anchored</a> to some physical measurement. They are mainly useful when the output environment is known. The absolute units consist of the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="physical unit" id="physical-unit">physical units</dfn> (<a class="css" data-link-type="maybe" href="#in" id="ref-for-in②">in</a>, <a class="css" data-link-type="maybe" href="#cm" id="ref-for-cm①">cm</a>, <a class="css" data-link-type="maybe" href="#mm" id="ref-for-mm①">mm</a>, <a class="css" data-link-type="maybe" href="#pt" id="ref-for-pt①">pt</a>, <a class="css" data-link-type="maybe" href="#pc" id="ref-for-pc①">pc</a>, <a class="css" data-link-type="maybe" href="#Q" id="ref-for-Q①">Q</a>) and the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="visual angle unit | pixel unit" id="visual-angle-unit">visual angle unit (pixel unit)</dfn> (<a class="css" data-link-type="maybe" href="#px" id="ref-for-px③">px</a>):</p> <table class="data"> <thead> <tr> <th>unit <th>name <th>equivalence <tbody> <tr> <th><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export id="cm">cm</dfn> <td>centimeters <td>1cm = 96px/2.54 <tr> <th><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export id="mm">mm</dfn> <td>millimeters <td>1mm = 1/10th of 1cm <tr> <th><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export id="Q">Q</dfn> <td>quarter-millimeters <td>1Q = 1/40th of 1cm <tr> <th><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export id="in">in</dfn> <td>inches <td>1in = 2.54cm = 96px <tr> <th><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export id="pc">pc</dfn> <td>picas <td>1pc = 1/6th of 1in <tr> <th><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export id="pt">pt</dfn> <td>points <td>1pt = 1/72nd of 1in <tr> <th><dfn class="dfn-paneled css" data-dfn-for="<length>" data-dfn-type="value" data-export id="px">px</dfn> <td>pixels <td>1px = 1/96th of 1in </table> <div class="example" id="example-afc1f57e"> <a class="self-link" href="#example-afc1f57e"></a> <pre class="highlight">h1 <c- p>{</c-> <c- k>margin</c-><c- p>:</c-> <c- m>0.5</c-><c- k>in</c-> <c- p>}</c-> <c- c>/* inches */</c-> h2 <c- p>{</c-> <c- k>line-height</c-><c- p>:</c-> <c- m>3</c-><c- k>cm</c-> <c- p>}</c-> <c- c>/* centimeters */</c-> h3 <c- p>{</c-> <c- k>word-spacing</c-><c- p>:</c-> <c- m>4</c-><c- k>mm</c-> <c- p>}</c-> <c- c>/* millimeters */</c-> h3 <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>1</c-><c- k>Q</c-> <c- p>}</c-> <c- c>/* quarter-millimeters */</c-> h4 <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>12</c-><c- k>pt</c-> <c- p>}</c-> <c- c>/* points */</c-> h4 <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>1</c-><c- k>pc</c-> <c- p>}</c-> <c- c>/* picas */</c-> p <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>12</c-><c- k>px</c-> <c- p>}</c-> <c- c>/* px */</c-> </pre> </div> <p class="note" role="note"><span class="marker">Note:</span> Lengths in publishing contexts are sometimes written like <code class="highlight"><c- m>2</c-><c- k>p</c-><c- m>3</c-></code>, indicating a length of 2 picas and 3 points. These can be written in CSS as <span class="css">calc(2pc + 3pt)</span> (see <a href="#calc-notation">§ 8.1 Mathematical Expressions: calc()</a>).</p> <p>All of the absolute length units are <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units③">compatible</a>, and <a class="css" data-link-type="maybe" href="#px" id="ref-for-px④">px</a> is their <a data-link-type="dfn" href="#canonical-unit" id="ref-for-canonical-unit①">canonical unit</a>.</p> <p>For a CSS device, these dimensions are <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="anchor unit | anchor" data-noexport id="anchor-unit">anchored</dfn> either</p> <ol type="i"> <li>by relating the <a data-link-type="dfn" href="#physical-unit" id="ref-for-physical-unit">physical units</a> to their physical measurements, or <li>by relating the <a data-link-type="dfn" href="#visual-angle-unit" id="ref-for-visual-angle-unit">pixel unit</a> to the <a data-link-type="dfn" href="#reference-pixel" id="ref-for-reference-pixel">reference pixel</a>. </ol> <p>For print media at typical viewing distances, the <a data-link-type="dfn" href="#anchor-unit" id="ref-for-anchor-unit①">anchor unit</a> should be one of the <a data-link-type="dfn" href="#physical-unit" id="ref-for-physical-unit①">physical units</a> (inches, centimeters, etc). For screen media (including high-resolution devices), low-resolution devices, and devices with unusual viewing distances, it is recommended instead that the <span id="ref-for-anchor-unit②">anchor unit</span> be the <a data-link-type="dfn" href="#visual-angle-unit" id="ref-for-visual-angle-unit①">pixel unit</a>. For such devices it is recommended that the <span id="ref-for-visual-angle-unit②">pixel unit</span> refer to the whole number of <a data-link-type="dfn" href="#device-pixel" id="ref-for-device-pixel">device pixels</a> that best approximates the reference pixel.</p> <p class="note" role="note"><span class="marker">Note:</span> If the <a data-link-type="dfn" href="#anchor-unit" id="ref-for-anchor-unit③">anchor unit</a> is the <a data-link-type="dfn" href="#visual-angle-unit" id="ref-for-visual-angle-unit③">pixel unit</a>, the <a data-link-type="dfn" href="#physical-unit" id="ref-for-physical-unit②">physical units</a> might not match their physical measurements. Alternatively if the <span id="ref-for-anchor-unit④">anchor unit</span> is a <span id="ref-for-physical-unit③">physical unit</span>, the <span id="ref-for-visual-angle-unit④">pixel unit</span> might not map to a whole number of <a data-link-type="dfn" href="#device-pixel" id="ref-for-device-pixel①">device pixels</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> This definition of the <a data-link-type="dfn" href="#visual-angle-unit" id="ref-for-visual-angle-unit⑤">pixel unit</a> and the <a data-link-type="dfn" href="#physical-unit" id="ref-for-physical-unit④">physical units</a> differs from the earlier editions of CSS1 and CSS2. In particular, in previous versions of CSS the <span id="ref-for-visual-angle-unit⑥">pixel unit</span> and the <span id="ref-for-physical-unit⑤">physical units</span> were not related by a fixed ratio: the <span id="ref-for-physical-unit⑥">physical units</span> were always tied to their physical measurements while the <span id="ref-for-visual-angle-unit⑦">pixel unit</span> would vary to most closely match the reference pixel. (This unfortunate change was made because too much existing content relies on the assumption of 96dpi, and breaking that assumption broke the content.)</p> <p class="note" role="note"><span class="marker">Note:</span> Units are <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive③">ASCII case-insensitive</a> and serialize as lowercase, for example 1Q serializes as 1q.</p> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="reference-pixel">reference pixel</dfn> is the visual angle of one pixel on a device with a <a data-link-type="dfn" href="#device-pixel" id="ref-for-device-pixel②">device pixel</a> density of 96dpi and a distance from the reader of an arm’s length. For a nominal arm’s length of 28 inches, the visual angle is therefore about 0.0213 degrees. For reading at arm’s length, 1px thus corresponds to about 0.26 mm (1/96 inch).</p> <p>The image below illustrates the effect of viewing distance on the size of a reference pixel: a reading distance of 71 cm (28 inches) results in a reference pixel of 0.26 mm, while a reading distance of 3.5 m (12 feet) results in a reference pixel of 1.3 mm.</p> <figure> <img alt="This diagram illustrates how the definition of a pixel depends on the users distance from the viewing surface (paper or screen). The image depicts the user looking at two planes, one 28 inches (71 cm) from the user, the second 140 inches (3.5 m) from the user. An expanding cone is projected from the user&apos;s eye onto each plane. Where the cone strikes the first plane, the projected pixel is 0.26 mm high. Where the cone strikes the second plane, the projected pixel is 1.4 mm high." height="360" src="images/pixel1.png" width="500"> <figcaption> Showing that pixels must become larger if the viewing distance increases </figcaption> </figure> <p>This second image illustrates the effect of a device’s resolution on the pixel unit: an area of 1px by 1px is covered by a single dot in a low-resolution device (e.g. a typical computer display), while the same area is covered by 16 dots in a higher resolution device (such as a printer).</p> <figure> <img alt="This diagram illustrates the relationship between the reference pixel and device pixels (called “dots” below). The image depicts a high resolution (large dot density) laser printer output on the left and a low resolution monitor screen on the right. For the laser printer, one square reference pixel is implemented by 16 dots. For the monitor screen, one square reference pixel is implemented by a single dot." height="321" src="images/pixel2.png" width="412"> <figcaption> Showing that more device pixels (dots) are needed to cover a 1px by 1px area on a high-resolution device than on a lower-resolution one (of the same approximate viewing distance) </figcaption> </figure> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="device-pixel">device pixel</dfn> is the smallest unit of area on the device output capable of displaying its full range of colors. For typical color screens, it’s a square or somewhat rectangular region containing a red, green, and blue subpixel. Many non-traditional outputs exist that can blur this definition, such as by displaying some colors at higher resolutions. Such devices still expose some equivalent notion of "device pixel", however.</p> <h2 class="heading settled" data-level="6" id="other-units"><span class="secno">6. </span><span class="content"> Other Quantities</span><a class="self-link" href="#other-units"></a></h2> <h3 class="heading settled" data-level="6.1" id="angles"><span class="secno">6.1. </span><span class="content"> Angle Units: the <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value④">&lt;angle></a> type and <a class="css" data-link-type="maybe" href="#deg" id="ref-for-deg">deg</a>, <a class="css" data-link-type="maybe" href="#grad" id="ref-for-grad">grad</a>, <a class="css" data-link-type="maybe" href="#rad" id="ref-for-rad">rad</a>, <a class="css" data-link-type="maybe" href="#turn" id="ref-for-turn">turn</a> units</span><a class="self-link" href="#angles"></a></h3> <p>Angle values are <a class="production css" data-link-type="type" href="#typedef-dimension" id="ref-for-typedef-dimension①">&lt;dimension></a>s denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="angle-value">&lt;angle></dfn>. The angle unit identifiers are:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="<angle>" data-dfn-type="value" data-export id="deg">deg</dfn> <dd> Degrees. There are 360 degrees in a full circle. <dt><dfn class="dfn-paneled css" data-dfn-for="<angle>" data-dfn-type="value" data-export id="grad">grad</dfn> <dd> Gradians, also known as "gons" or "grades". There are 400 gradians in a full circle. <dt><dfn class="dfn-paneled css" data-dfn-for="<angle>" data-dfn-type="value" data-export id="rad">rad</dfn> <dd> Radians. There are 2π radians in a full circle. <dt><dfn class="dfn-paneled css" data-dfn-for="<angle>" data-dfn-type="value" data-export id="turn">turn</dfn> <dd> Turns. There is 1 turn in a full circle. </dl> <p>For example, a right angle is <span class="css">90deg</span> or <span class="css">100grad</span> or <span class="css">0.25turn</span> or approximately <span class="css">1.57rad</span>.</p> <p>All <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value⑤">&lt;angle></a> units are <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units④">compatible</a>, and <a class="css" data-link-type="maybe" href="#deg" id="ref-for-deg①">deg</a> is their <a data-link-type="dfn" href="#canonical-unit" id="ref-for-canonical-unit②">canonical unit</a>.</p> <div class="note" role="note"> By convention, when an angle denotes a direction in CSS, it is typically interpreted as a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="bearing-angle">bearing angle</dfn>, where 0deg is "up" or "north" on the screen, and larger angles are more clockwise (so 90deg is "right" or "east"). <p>For example, in the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-images-4/#funcdef-linear-gradient" id="ref-for-funcdef-linear-gradient">linear-gradient()</a> function, the <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value⑥">&lt;angle></a> that determines the direction of the gradient is interpreted as a bearing angle.</p> </div> <p class="note" role="note"><span class="marker">Note:</span> For legacy reasons, some uses of <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value⑦">&lt;angle></a> allow a bare <span class="css">0</span> to mean <span class="css">0deg</span>. This is not true in general, however, and will not occur in future uses of the <span class="production" id="ref-for-angle-value⑧">&lt;angle></span> type.</p> <h3 class="heading settled" data-level="6.2" id="time"><span class="secno">6.2. </span><span class="content"> Duration Units: the <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value⑤">&lt;time></a> type and <a class="css" data-link-type="maybe" href="#s" id="ref-for-s">s</a>, <a class="css" data-link-type="maybe" href="#ms" id="ref-for-ms">ms</a> units</span><a class="self-link" href="#time"></a></h3> <p>Time values are <a data-link-type="dfn" href="#dimension" id="ref-for-dimension⑦">dimensions</a> denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="time-value">&lt;time></dfn>. The time unit identifiers are:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="<time>" data-dfn-type="value" data-export id="s">s</dfn> <dd>Seconds. <dt><dfn class="dfn-paneled css" data-dfn-for="<time>" data-dfn-type="value" data-export id="ms">ms</dfn> <dd>Milliseconds. There are 1000 milliseconds in a second. </dl> <p>All <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value⑥">&lt;time></a> units are <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units⑤">compatible</a>, and <a class="css" data-link-type="maybe" href="#s" id="ref-for-s①">s</a> is their <a data-link-type="dfn" href="#canonical-unit" id="ref-for-canonical-unit③">canonical unit</a>.</p> <p>Properties may restrict the time value to some range. If the value is outside the allowed range, the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS2/conform.html#ignore">ignored</a>.</p> <h3 class="heading settled" data-level="6.3" id="frequency"><span class="secno">6.3. </span><span class="content"> Frequency Units: the <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value④">&lt;frequency></a> type and <a class="css" data-link-type="maybe" href="#Hz" id="ref-for-Hz">Hz</a>, <a class="css" data-link-type="maybe" href="#kHz" id="ref-for-kHz">kHz</a> units</span><a class="self-link" href="#frequency"></a></h3> <p>Frequency values are <a data-link-type="dfn" href="#dimension" id="ref-for-dimension⑧">dimensions</a> denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="frequency-value">&lt;frequency></dfn>. The frequency unit identifiers are:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="<frequency>" data-dfn-type="value" data-export id="Hz">Hz</dfn> <dd>Hertz. It represents the number of occurrences per second. <dt><dfn class="dfn-paneled css" data-dfn-for="<frequency>" data-dfn-type="value" data-export id="kHz">kHz</dfn> <dd>KiloHertz. A kiloHertz is 1000 Hertz. </dl> <p>For example, when representing sound pitches, 200Hz (or 200hz) is a bass sound, and 6kHz (or 6khz) is a treble sound.</p> <p>All <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value⑤">&lt;frequency></a> units are <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units⑥">compatible</a>, and <a class="css" data-link-type="maybe" href="#Hz" id="ref-for-Hz①">hz</a> is their <a data-link-type="dfn" href="#canonical-unit" id="ref-for-canonical-unit④">canonical unit</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> Units are <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive④">ASCII case-insensitive</a> and serialize as lowercase, for example 1Hz serializes as 1hz.</p> <h3 class="heading settled" data-level="6.4" id="resolution"><span class="secno">6.4. </span><span class="content"> Resolution Units: the <a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value②">&lt;resolution></a> type and <a class="css" data-link-type="maybe" href="#dpi" id="ref-for-dpi">dpi</a>, <a class="css" data-link-type="maybe" href="#dpcm" id="ref-for-dpcm">dpcm</a>, <a class="css" data-link-type="maybe" href="#dppx" id="ref-for-dppx">dppx</a> units</span><a class="self-link" href="#resolution"></a></h3> <p>Resolution units are <a data-link-type="dfn" href="#dimension" id="ref-for-dimension⑨">dimensions</a> denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="resolution-value">&lt;resolution></dfn>. The resolution unit identifiers are:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="<resolution>" data-dfn-type="value" data-export id="dpi">dpi</dfn> <dd>Dots per inch. <dt><dfn class="dfn-paneled css" data-dfn-for="<resolution>" data-dfn-type="value" data-export id="dpcm">dpcm</dfn> <dd>Dots per centimeter. <dt><dfn class="dfn-paneled css" data-dfn-for="<resolution>" data-dfn-type="value" data-export id="dppx">dppx</dfn> <dd>Dots per <a class="css" data-link-type="maybe" href="#px" id="ref-for-px⑤">px</a> unit. </dl> <p>The <a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value③">&lt;resolution></a> unit represents the size of a single "dot" in a graphical representation by indicating how many of these dots fit in a CSS <a class="css" data-link-type="maybe" href="#in" id="ref-for-in③">in</a>, <a class="css" data-link-type="maybe" href="#cm" id="ref-for-cm②">cm</a>, or <a class="css" data-link-type="maybe" href="#px" id="ref-for-px⑥">px</a>. For uses, see e.g. the <span class="css">resolution</span> media query in <a data-link-type="biblio" href="#biblio-mediaq" title="Media Queries Level 4">[MEDIAQ]</a> or the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-images-4/#propdef-image-resolution" id="ref-for-propdef-image-resolution">image-resolution</a> property defined in <a data-link-type="biblio" href="#biblio-css3-images" title="CSS Images Module Level 3">[CSS3-IMAGES]</a>.</p> <p>All <a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value④">&lt;resolution></a> units are <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units⑦">compatible</a>, and <span class="css">dppx</span> is their <a data-link-type="dfn" href="#canonical-unit" id="ref-for-canonical-unit⑤">canonical unit</a>.</p> <p>The allowed range of <a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value⑤">&lt;resolution></a> values <em>always</em> excludes negative values, in addition to any explicit ranges that might be specified.</p> <p class="note" role="note">Note that due to the 1:96 fixed ratio of CSS <a class="css" data-link-type="maybe" href="#in" id="ref-for-in④">in</a> to CSS <a class="css" data-link-type="maybe" href="#px" id="ref-for-px⑦">px</a>, <span class="css">1dppx</span> is equivalent to <span class="css">96dpi</span>. This corresponds to the default resolution of images displayed in CSS: see <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-images-4/#propdef-image-resolution" id="ref-for-propdef-image-resolution①">image-resolution</a>. </p> <div class="example" id="example-33e77fee"> <a class="self-link" href="#example-33e77fee"></a> The following @media rule uses Media Queries <a data-link-type="biblio" href="#biblio-mediaq" title="Media Queries Level 4">[MEDIAQ]</a> to assign some special style rules to devices that use two or more device pixels per CSS <a class="css" data-link-type="maybe" href="#px" id="ref-for-px⑧">px</a> unit: <pre class="highlight"><c- n>@media</c-> <c- p>(</c->min-resolution: <c- m>2</c-><c- k>dppx</c-><c- p>)</c-> <c- p>{</c-> ... <c- p>}</c-></pre> </div> <h2 class="heading settled" data-level="7" id="defined-elsewhere"><span class="secno">7. </span><span class="content"> Data Types Defined Elsewhere</span><a class="self-link" href="#defined-elsewhere"></a></h2> <p>Some data types are defined in their own modules. This example talks about some of the most common ones used across several specifications.</p> <h3 class="heading settled" data-level="7.1" id="colors"><span class="secno">7.1. </span><span class="content"> Colors: the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-color-5/#typedef-color" id="ref-for-typedef-color">&lt;color></a> type</span><a class="self-link" href="#colors"></a></h3> <p>The <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-color-5/#typedef-color" id="ref-for-typedef-color①">&lt;color></a> data type is defined in <a data-link-type="biblio" href="#biblio-css3color" title="CSS Color Module Level 3">[CSS3COLOR]</a>. UAs that support CSS Color Level 3 or its successor must interpret <span class="production" id="ref-for-typedef-color②">&lt;color></span> as defined therein.</p> <h3 class="heading settled" data-level="7.2" id="images"><span class="secno">7.2. </span><span class="content"> Images: the <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-images-3/#typedef-image" id="ref-for-typedef-image">&lt;image></a> type</span><a class="self-link" href="#images"></a></h3> <p>The <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-images-3/#typedef-image" id="ref-for-typedef-image①">&lt;image></a> data type is defined in <a data-link-type="biblio" href="#biblio-css3-images" title="CSS Images Module Level 3">[CSS3-IMAGES]</a>. UAs that support CSS Images Level 3 or its successor must interpret <span class="production" id="ref-for-typedef-image②">&lt;image></span> as defined therein. UAs that do not yet support CSS Images Level 3 must interpret <span class="production" id="ref-for-typedef-image③">&lt;image></span> as <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value⑧">&lt;url></a>.</p> <h3 class="heading settled" data-level="7.3" id="position"><span class="secno">7.3. </span><span class="content"> 2D Positioning: the <a class="production css" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position">&lt;position></a> type</span><a class="self-link" href="#position"></a></h3> <p>The <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-position"><a class="production css" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position①">&lt;position></a></dfn> value specifies the position of a object area (e.g. background image) inside a positioning area (e.g. background positioning area). It is computed and interpreted as specified for <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position" id="ref-for-propdef-background-position">background-position</a>. <a data-link-type="biblio" href="#biblio-css3-background" title="CSS Backgrounds and Borders Module Level 3">[CSS3-BACKGROUND]</a></p> <pre class="prod highlight"><a class="production" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position②">&lt;position></a> = <c- p>[</c-> <c- p>[</c-> left <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one④">|</a> center <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one⑤">|</a> right <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one⑥">|</a> top <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one⑦">|</a> bottom <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one⑧">|</a> <a class="production" data-link-type="type" href="#typedef-length-percentage" id="ref-for-typedef-length-percentage">&lt;length-percentage></a> <c- p>]</c-> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one⑨">|</a> <c- p>[</c-> left <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①⓪">|</a> center <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①①">|</a> right <c- p>]</c-> <a data-link-type="grammar" href="#comb-all" id="ref-for-comb-all">&amp;&amp;</a> <c- p>[</c-> top <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①②">|</a> center <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①③">|</a> bottom <c- p>]</c-> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①④">|</a> <c- p>[</c-> left <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①⑤">|</a> center <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①⑥">|</a> right <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①⑦">|</a> <a class="production" data-link-type="type" href="#typedef-length-percentage" id="ref-for-typedef-length-percentage①">&lt;length-percentage></a> <c- p>]</c-> <c- p>[</c-> top <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①⑧">|</a> center <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one①⑨">|</a> bottom <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②⓪">|</a> <a class="production" data-link-type="type" href="#typedef-length-percentage" id="ref-for-typedef-length-percentage②">&lt;length-percentage></a> <c- p>]</c-> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②①">|</a> <c- p>[</c-> <c- p>[</c-> left <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②②">|</a> right <c- p>]</c-> <a class="production" data-link-type="type" href="#typedef-length-percentage" id="ref-for-typedef-length-percentage③">&lt;length-percentage></a> <c- p>]</c-> <a data-link-type="grammar" href="#comb-all" id="ref-for-comb-all①">&amp;&amp;</a> <c- p>[</c-> <c- p>[</c-> top <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②③">|</a> bottom <c- p>]</c-> <a class="production" data-link-type="type" href="#typedef-length-percentage" id="ref-for-typedef-length-percentage④">&lt;length-percentage></a> <c- p>]</c-> <c- p>]</c-> </pre> <p class="note" role="note"><span class="marker">Note:</span> The <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position" id="ref-for-propdef-background-position①">background-position</a> property also accepts a three-value syntax. This has been disallowed generically because it creates parsing ambiguities when combined with other length or percentage components in a property value.</p> <p>The canonical order when serializing is the horizontal component followed by the vertical component.</p> <p>When specified in a grammar alongside other keywords, <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⓪">&lt;length></a>s, or <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑥">&lt;percentage></a>s, <a class="production css" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position③">&lt;position></a> is <em>greedily</em> parsed; it consumes as many components as possible.</p> <div class="example" id="example-2622a7d7"><a class="self-link" href="#example-2622a7d7"></a> For example, <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-transforms-1/#propdef-transform-origin" id="ref-for-propdef-transform-origin">transform-origin</a> defines a 3D position as (effectively) <span class="css">&lt;position> &lt;length>?</span>. A value such as <span class="css">left 50px</span> will be parsed as a 2-value <a class="production css" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position④">&lt;position></a>, with an omitted z-component; on the other hand, a value such as <span class="css">top 50px</span> will be parsed as a single-value <span class="production" id="ref-for-typedef-position⑤">&lt;position></span> followed by a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①①">&lt;length></a>. </div> <h2 class="heading settled" data-level="8" id="functional-notations"><span class="secno">8. </span><span class="content"> Functional Notations</span><a class="self-link" href="#functional-notations"></a></h2> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="functional-notation">functional notation</dfn> is a type of component value that can represent more complex types or invoke special processing. The syntax starts with the name of the function immediately followed by a left parenthesis (i.e. a <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-function-token" id="ref-for-typedef-function-token">&lt;function-token></a>) followed by the argument(s) to the notation followed by a right parenthesis. Like keywords, function names are <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#ascii-case-insensitive" id="ref-for-ascii-case-insensitive⑤">ASCII case-insensitive</a>. <a href="https://www.w3.org/TR/css-syntax/#whitespace">White space</a> is allowed, but optional, immediately inside the parentheses. Functions can take multiple arguments, which are formatted similarly to a CSS property value.</p> <p class="note" role="note"><span class="marker">Note:</span> Some legacy <a data-link-type="dfn" href="#functional-notation" id="ref-for-functional-notation③">functional notations</a>, such as <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-color-4/#funcdef-rgba" id="ref-for-funcdef-rgba">rgba()</a>, use commas unnecessarily, but generally commas are only used to separate items in a list, or pieces of a grammar that would be ambiguous otherwise. If a comma is used to separate arguments, <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> is optional before and after the comma.</p> <div class="example" id="example-3fbb1c9d"> <a class="self-link" href="#example-3fbb1c9d"></a> <pre class="highlight"><c- k>background</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>http://www.example.org/image</c-><c- p>);</c-> <c- k>color</c-><c- p>:</c-> <c- nf>rgb</c-><c- p>(</c-><c- m>100</c-><c- p>,</c-> <c- m>200</c-><c- p>,</c-> <c- m>50</c-> <c- p>);</c-> <c- k>content</c-><c- p>:</c-> <c- nf>counter</c-><c- p>(</c->list-item<c- p>)</c-> <c- s>". "</c-><c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- nf>calc</c-><c- p>(</c-><c- m>50</c-><c- k>%</c-> - <c- m>2</c-><c- k>em</c-><c- p>);</c-> </pre> </div> <h3 class="heading settled" data-level="8.1" id="calc-notation"><span class="secno">8.1. </span><span class="content"> Mathematical Expressions: <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc④">calc()</a></span><a class="self-link" href="#calc-notation"></a></h3> <p>The <dfn class="dfn-paneled css" data-dfn-type="function" data-export id="funcdef-calc">calc()</dfn> function allows a numeric CSS component value to be written as a mathematical expression using addition (<a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-4/#selectordef-adjacent" id="ref-for-selectordef-adjacent">+</a>), subtraction (<span class="css">-</span>), multiplication (<a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-3/#x" id="ref-for-x">*</a>), and/or division (<span class="css">/</span>).</p> <p>The <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc⑤">calc()</a> expression represents the result of the mathematical calculation it contains, which is evaluated using standard operator precedence rules (<span class="css">*</span> and <span class="css">/</span> bind tighter than <span class="css">+</span> and <span class="css">-</span>, and operators are otherwise evaluated left-to-right).</p> <p>It can be used wherever <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①②">&lt;length></a>, <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value⑥">&lt;frequency></a>, <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value⑨">&lt;angle></a>, <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value⑦">&lt;time></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑦">&lt;percentage></a>, <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value⑥">&lt;number></a>, or <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value⑥">&lt;integer></a> values are allowed. Components of a <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc⑥">calc()</a> expression can be literal values or or <span class="css" id="ref-for-funcdef-calc⑦">calc()</span> expressions.</p> <div class="example" id="example-ec5d11f6"> <a class="self-link" href="#example-ec5d11f6"></a> <pre class="highlight">section <c- p>{</c-> <c- k>float</c-><c- p>:</c-> left<c- p>;</c-> <c- k>margin</c-><c- p>:</c-> <c- m>1</c-><c- k>em</c-><c- p>;</c-> <c- k>border</c-><c- p>:</c-> solid <c- m>1</c-><c- k>px</c-><c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- nf>calc</c-><c- p>(</c-><c- m>100</c-><c- k>%</c->/<c- m>3</c-> - <c- m>2</c->*<c- m>1</c-><c- k>em</c-> - <c- m>2</c->*<c- m>1</c-><c- k>px</c-><c- p>);</c-> <c- p>}</c-> </pre> </div> <div class="example" id="example-e56942d8"> <a class="self-link" href="#example-e56942d8"></a> <pre class="highlight">p <c- p>{</c-> <c- k>margin</c-><c- p>:</c-> <c- nf>calc</c-><c- p>(</c-><c- m>1</c-><c- k>rem</c-> - <c- m>2</c-><c- k>px</c-><c- p>)</c-> <c- nf>calc</c-><c- p>(</c-><c- m>1</c-><c- k>rem</c-> - <c- m>1</c-><c- k>px</c-><c- p>);</c-> <c- p>}</c-> </pre> </div> <div class="example" id="example-8f3f3fe7"> <a class="self-link" href="#example-8f3f3fe7"></a> The following sets the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-size" id="ref-for-propdef-font-size③">font-size</a> so that exactly 40em fits within the viewport, ensuring that roughly the same amount of text always fills the screen no matter the screen size. <pre class="highlight">:root <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- nf>calc</c-><c- p>(</c-><c- m>100</c-><c- k>vw</c-> / <c- m>40</c-><c- p>);</c-> <c- p>}</c-> </pre> <p>If the rest of the design is specified using the <a class="css" data-link-type="maybe" href="#rem" id="ref-for-rem③">rem</a> unit, the entire layout will scale to match the viewport width.</p> </div> <div class="example" id="example-816e5203"> <a class="self-link" href="#example-816e5203"></a> The following example stacks two background images, with the first perfectly centered and the second offset 20px to the bottom and to the left of the first. <pre class="highlight">.foo <c- p>{</c-> <c- k>background</c-><c- p>:</c-> <c- nf>url</c-><c- p>(</c-><c- s>top.png</c-><c- p>),</c-> <c- nf>url</c-><c- p>(</c-><c- s>bottom.png</c-><c- p>);</c-> <c- k>background-repeat</c-><c- p>:</c-> no-repeat<c- p>;</c-> <c- k>background-position</c-><c- p>:</c-> <c- m>50</c-><c- k>%</c-> <c- m>50</c-><c- k>%</c-><c- p>,</c-> <c- nf>calc</c-><c- p>(</c-><c- m>50</c-><c- k>%</c-> + <c- m>20</c-><c- k>px</c-><c- p>)</c-> <c- nf>calc</c-><c- p>(</c-><c- m>50</c-><c- k>%</c-> + <c- m>20</c-><c- k>px</c-><c- p>);</c-> <c- p>}</c-> </pre> </div> <div class="example" id="example-cac7a502"> <a class="self-link" href="#example-cac7a502"></a> This example shows how to place color-stops on a gradient an equal distance from either end. <pre class="highlight">.foo <c- p>{</c-> <c- k>background-image</c-><c- p>:</c-> <c- nf>linear-gradient</c-><c- p>(</c->to right<c- p>,</c-> silver<c- p>,</c-> white <c- m>50</c-><c- k>px</c-><c- p>,</c-> white <c- nf>calc</c-><c- p>(</c-><c- m>100</c-><c- k>%</c-> - <c- m>50</c-><c- k>px</c-><c- p>),</c-> silver<c- p>);</c-> <c- p>}</c-> </pre> </div> <h4 class="heading settled" data-level="8.1.1" id="calc-syntax"><span class="secno">8.1.1. </span><span class="content"> Syntax</span><a class="self-link" href="#calc-syntax"></a></h4> <p>The syntax of a <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc⑧">calc()</a> function is:</p> <pre class="prod highlight"><a class="production" data-link-type="function" href="#funcdef-calc" id="ref-for-funcdef-calc⑨">&lt;<c- nf>calc</c-><c- p>()</c->></a> = <c- nf>calc</c-><c- p>(</c-> <a class="production" data-link-type="type" href="#typedef-calc-sum" id="ref-for-typedef-calc-sum">&lt;calc-sum></a> <c- p>)</c-> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-sum">&lt;calc-sum></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-product" id="ref-for-typedef-calc-product">&lt;calc-product></a> <c- p>[</c-> <c- p>[</c-> <c- s>'+'</c-> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②④">|</a> <c- s>'-'</c-> <c- p>]</c-> <a class="production" data-link-type="type" href="#typedef-calc-product" id="ref-for-typedef-calc-product①">&lt;calc-product></a> <c- p>]</c-><a data-link-type="grammar" href="#mult-zero-plus" id="ref-for-mult-zero-plus①">*</a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-product">&lt;calc-product></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-value" id="ref-for-typedef-calc-value">&lt;calc-value></a> <c- p>[</c-> <c- s>'*'</c-> <a class="production" data-link-type="type" href="#typedef-calc-value" id="ref-for-typedef-calc-value①">&lt;calc-value></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②⑤">|</a> <c- s>'/'</c-> <a class="production" data-link-type="type" href="#typedef-calc-number-value" id="ref-for-typedef-calc-number-value">&lt;calc-number-value></a> <c- p>]</c-><a data-link-type="grammar" href="#mult-zero-plus" id="ref-for-mult-zero-plus②">*</a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-value">&lt;calc-value></dfn> = <a class="production" data-link-type="type" href="#number-value" id="ref-for-number-value⑦">&lt;number></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②⑥">|</a> <a class="production" data-link-type="type" href="#typedef-dimension" id="ref-for-typedef-dimension②">&lt;dimension></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②⑦">|</a> <a class="production" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑧">&lt;percentage></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②⑧">|</a> <c- p>(</c-> <a class="production" data-link-type="type" href="#typedef-calc-sum" id="ref-for-typedef-calc-sum①">&lt;calc-sum></a> <c- p>)</c-> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-number-sum">&lt;calc-number-sum></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-number-product" id="ref-for-typedef-calc-number-product">&lt;calc-number-product></a> <c- p>[</c-> <c- p>[</c-> <c- s>'+'</c-> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one②⑨">|</a> <c- s>'-'</c-> <c- p>]</c-> <a class="production" data-link-type="type" href="#typedef-calc-number-product" id="ref-for-typedef-calc-number-product①">&lt;calc-number-product></a> <c- p>]</c-><a data-link-type="grammar" href="#mult-zero-plus" id="ref-for-mult-zero-plus③">*</a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-number-product">&lt;calc-number-product></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-number-value" id="ref-for-typedef-calc-number-value①">&lt;calc-number-value></a> <c- p>[</c-> <c- s>'*'</c-> <a class="production" data-link-type="type" href="#typedef-calc-number-value" id="ref-for-typedef-calc-number-value②">&lt;calc-number-value></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one③⓪">|</a> <c- s>'/'</c-> <a class="production" data-link-type="type" href="#typedef-calc-number-value" id="ref-for-typedef-calc-number-value③">&lt;calc-number-value></a> <c- p>]</c-><a data-link-type="grammar" href="#mult-zero-plus" id="ref-for-mult-zero-plus④">*</a> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-number-value">&lt;calc-number-value></dfn> = <a class="production" data-link-type="type" href="#number-value" id="ref-for-number-value⑧">&lt;number></a> <a data-link-type="grammar" href="#comb-one" id="ref-for-comb-one③①">|</a> <c- p>(</c-> <a class="production" data-link-type="type" href="#typedef-calc-number-sum" id="ref-for-typedef-calc-number-sum">&lt;calc-number-sum></a> <c- p>)</c-> </pre> <p>In addition, <a href="https://www.w3.org/TR/css-syntax/#whitespace">white space</a> is required on both sides of the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-4/#selectordef-adjacent" id="ref-for-selectordef-adjacent①">+</a> and <span class="css">-</span> operators. (The <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-3/#x" id="ref-for-x①">*</a> and <span class="css">/</span> operators can be used without white space around them.)</p> <p>UAs must support <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①⓪">calc()</a> expressions of at least 20 terms, where each <code class="highlight">NUMBER</code>, <code class="highlight">DIMENSION</code>, or <code class="highlight">PERCENTAGE</code> is a term. If a <span class="css" id="ref-for-funcdef-calc①①">calc()</span> expression contains more than the supported number of terms, it must be treated as if it were invalid.</p> <h4 class="heading settled" data-level="8.1.2" id="calc-type-checking"><span class="secno">8.1.2. </span><span class="content"> Type Checking</span><a class="self-link" href="#calc-type-checking"></a></h4> <p>A math expression has a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="resolved-type">resolved type</dfn>, which is one of <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①③">&lt;length></a>, <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value⑦">&lt;frequency></a>, <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value①⓪">&lt;angle></a>, <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value⑧">&lt;time></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑨">&lt;percentage></a>, <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value⑨">&lt;number></a>, or <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value⑦">&lt;integer></a>. The <a data-link-type="dfn" href="#resolved-type" id="ref-for-resolved-type">resolved type</a> must be valid for where the expression is placed; otherwise, the expression is invalid. The <span id="ref-for-resolved-type①">resolved type</span> of the expression is determined by the types of the values it contains. <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token②">&lt;number-token></a>s are of type <span class="production" id="ref-for-number-value①⓪">&lt;number></span> or <span class="production" id="ref-for-integer-value⑧">&lt;integer></span>. A <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-dimension-token" id="ref-for-typedef-dimension-token②">&lt;dimension-token></a>’s type is given by its unit (<a class="css" data-link-type="maybe" href="#cm" id="ref-for-cm③">cm</a> is <span class="production" id="ref-for-length-value①④">&lt;length></span>, <a class="css" data-link-type="maybe" href="#deg" id="ref-for-deg②">deg</a> is <span class="production" id="ref-for-angle-value①①">&lt;angle></span>, etc.).</p> <p class="note" role="note"><span class="marker">Note:</span> Because <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token③">&lt;number-token></a>s are always interpreted as <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①①">&lt;number></a>s or <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value⑨">&lt;integer></a>s, "unitless 0" <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑤">&lt;length></a>s aren’t supported in <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①②">calc()</a>. That is, <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-sizing-3/#propdef-width" id="ref-for-propdef-width⑦">width: calc(0 + 5px);</a> is invalid, even though both <span class="css" id="ref-for-propdef-width⑧">width: 0;</span> and <span class="css" id="ref-for-propdef-width⑨">width: 5px;</span> are valid.</p> <p>If percentages are accepted in the context in which the expression is placed, and they are defined to be relative to another type besides <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①②">&lt;number></a>, a <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-syntax-3/#typedef-percentage-token" id="ref-for-typedef-percentage-token①">&lt;percentage-token></a> is treated as that type. For example, in the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-sizing-3/#propdef-width" id="ref-for-propdef-width①⓪">width</a> property, percentages have the <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑥">&lt;length></a> type. A percentage only has the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value②⓪">&lt;percentage></a> type if in that context <span class="production" id="ref-for-percentage-value②①">&lt;percentage></span> values are not used-value compatible with any other type. If percentages are not normally allowed in place of the <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①③">calc()</a>, then a <span class="css" id="ref-for-funcdef-calc①④">calc()</span> expression containing percentages is invalid in that context.</p> <p class="note" role="note"><span class="marker">Note:</span> Note that <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value②②">&lt;percentage></a>s relative to <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①③">&lt;number></a>s, such as in <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-color-4/#propdef-opacity" id="ref-for-propdef-opacity">opacity</a>, are not allowed in <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①⑤">calc()</a>. Allowing this would cause significant problems with "unit algebra" (allowing multiplication/division of <a class="production css" data-link-type="type" href="#typedef-dimension" id="ref-for-typedef-dimension③">&lt;dimension></a>s), and in every case so far, doesn’t provide any new functionality. (For example, <span class="css" id="ref-for-propdef-opacity①">opacity: 25%</span> is identical to <span class="css" id="ref-for-propdef-opacity②">opacity: .25</span>; it’s just a trivial syntax transform.)</p> <p class="note" role="note"><span class="marker">Note:</span> Although there are a few properties in which a bare <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①④">&lt;number></a> becomes a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑦">&lt;length></a> at used-value time (specifically, <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-line-height" id="ref-for-propdef-line-height①">line-height</a> and <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-text-4/#propdef-tab-size" id="ref-for-propdef-tab-size">tab-size</a>), <span class="production" id="ref-for-number-value①⑤">&lt;number></span>s never become "length-like" in <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①⑥">calc()</a>. They always stay as <span class="production" id="ref-for-number-value①⑥">&lt;number></span>s.</p> <p>Operators form sub-expressions, which gain types based on their arguments. To make expressions simpler, operators have restrictions on the types they accept. At each operator, the types of the left and right argument are checked for these restrictions. If compatible, the type resolves as described below (the following ignores precedence rules on the operators for simplicity):</p> <ul> <li> At <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-4/#selectordef-adjacent" id="ref-for-selectordef-adjacent②">+</a> or <span class="css">-</span>, check that both sides have the same type, or that one side is a <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①⑦">&lt;number></a> and the other is an <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①⓪">&lt;integer></a>. If both sides are the same type, resolve to that type. If one side is a <span class="production" id="ref-for-number-value①⑧">&lt;number></span> and the other is an <span class="production" id="ref-for-integer-value①①">&lt;integer></span>, resolve to <span class="production" id="ref-for-number-value①⑨">&lt;number></span>. <li> At <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/selectors-3/#x" id="ref-for-x②">*</a>, check that at least one side is <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value②⓪">&lt;number></a>. If both sides are <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①②">&lt;integer></a>, resolve to <span class="production" id="ref-for-integer-value①③">&lt;integer></span>. Otherwise, resolve to the type of the other side. <li> At <span class="css">/</span>, check that the right side is <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value②①">&lt;number></a>. If the left side is <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①④">&lt;integer></a>, resolve to <span class="production" id="ref-for-number-value②②">&lt;number></span>. Otherwise, resolve to the type of the left side. </ul> <p>If an operator does not pass the above checks, the expression is invalid. Also, division by zero is invalid. This includes both dividing by the literal number zero, as well as any numeric expression that evaluates to zero (as purely-numeric expressions can be evaluated without any additional information at parse time).</p> <p class="note" role="note"><span class="marker">Note:</span> Algebraic simplifications do not affect the validity of the <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①⑦">calc()</a> expression or its resolved type. For example, <span class="css">calc(5px - 5px + 10s)</span> and <span class="css">calc(0 * 5px + 10s)</span> are both invalid due to the attempt to add a length and a time.</p> <h4 class="heading settled" data-level="8.1.3" id="calc-computed-value"><span class="secno">8.1.3. </span><span class="content"> Computed Value</span><a class="self-link" href="#calc-computed-value"></a></h4> <p>The computed value of a <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①⑧">calc()</a> expression is the expression with all components computed.</p> <p>Where percentages are not resolved at computed-value time, they are not resolved in <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc①⑨">calc()</a> expressions, e.g. <span class="css">calc(100% - 100% + 1em)</span> resolves to <span class="css">calc(1em + 0%)</span>, not to <span class="css">1em</span>. If there are special rules for computing percentages in a value (e.g. <a href="https://www.w3.org/TR/CSS2/visudet.html#the-height-property">the <span class="css">height</span> property</a>), they apply whenever a <span class="css" id="ref-for-funcdef-calc②⓪">calc()</span> expression contains percentages.</p> <div class="example" id="example-023dad93"> <a class="self-link" href="#example-023dad93"></a> For example, whereas <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-size" id="ref-for-propdef-font-size④">font-size</a> computes percentage values at <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#computed-value" id="ref-for-computed-value③">computed value</a> time so that <a data-link-type="dfn" href="#font-relative-length" id="ref-for-font-relative-length①">font-relative length</a> units can be computed, <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position" id="ref-for-propdef-background-position②">background-position</a> has layout-dependent behavior for percentage values, and thus does not resolve percentages until used-value time. <p>Due to this, <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position" id="ref-for-propdef-background-position③">background-position</a> computation preserves the percentage in a <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②①">calc()</a> whereas <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-size" id="ref-for-propdef-font-size⑤">font-size</a> will compute such expressions directly into a length.</p> </div> <p>Given the complexities of width and height calculations on table cells and table elements, math expressions involving percentages for widths and heights on table columns, table column groups, table rows, table row groups, and table cells in both auto and fixed layout tables MAY be treated as if <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-sizing-3/#valdef-width-auto" id="ref-for-valdef-width-auto">auto</a> had been specified.</p> <h4 class="heading settled" data-level="8.1.4" id="calc-range"><span class="secno">8.1.4. </span><span class="content"> Range Checking</span><a class="self-link" href="#calc-range"></a></h4> <p>Parse-time range-checking of values is not performed within <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②②">calc()</a>, and therefore out-of-range values do not cause the declaration to become invalid. However, the value resulting from an expression must be clamped to the range allowed in the target context. Clamping is performed on <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#computed-value" id="ref-for-computed-value④">computed values</a> to the extent possible, and also on <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#used-value" id="ref-for-used-value③">used values</a> if computation was unable to sufficiently simplify the expression to allow range-checking. (Clamping is not performed on <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#specified-value" id="ref-for-specified-value①">specified values</a>.)</p> <p class="note" role="note"><span class="marker">Note:</span> This requires all contexts accepting <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②③">calc()</a> to define their allowable values as a closed (not open) interval.</p> <div class="example" id="example-ec14dee2"> <a class="self-link" href="#example-ec14dee2"></a> Since widths smaller than 0px are not allowed, these three declarations are equivalent: <pre class="highlight"><c- k>width</c-><c- p>:</c-> <c- nf>calc</c-><c- p>(</c-><c- m>5</c-><c- k>px</c-> - <c- m>10</c-><c- k>px</c-><c- p>);</c-> <c- k>width</c-><c- p>:</c-> <c- nf>calc</c-><c- p>(</c-><c- m>-5</c-><c- k>px</c-><c- p>);</c-> <c- k>width</c-><c- p>:</c-> <c- m>0</c-><c- k>px</c-><c- p>;</c-> </pre> <p>Note however that <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-sizing-3/#propdef-width" id="ref-for-propdef-width①①">width: -5px</a> is not equivalent to <span class="css" id="ref-for-propdef-width①②">width: calc(-5px)</span>! Out-of-range values <em>outside</em> <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②④">calc()</a> are syntactically invalid, and cause the entire declaration to be dropped.</p> </div> <h4 class="heading settled" data-level="8.1.5" id="calc-serialize"><span class="secno">8.1.5. </span><span class="content"> Serialization</span><a class="self-link" href="#calc-serialize"></a></h4> <p>The serialization of <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②⑤">calc()</a> values is undefined in this level.</p> <h2 class="heading settled" id="iana"><span class="content"> Appendix A: IANA Considerations</span><a class="self-link" href="#iana"></a></h2> <h3 class="heading settled" id="about-invalid"><span class="content"> Registration for the <code class="highlight"><c- k>about</c-><c- p>:</c->invalid</code> URL scheme</span><a class="self-link" href="#about-invalid"></a></h3> <p>This sections defines and registers the <code class="highlight"><c- k>about</c-><c- p>:</c->invalid</code> URL, in accordance with the registration procedure defined in <a data-link-type="biblio" href="#biblio-rfc6694" title="The &quot;about&quot; URI Scheme">[RFC6694]</a>.</p> <p>The official record of this registration can be found at <a href="http://www.iana.org/assignments/about-uri-tokens/about-uri-tokens.xhtml">http://www.iana.org/assignments/about-uri-tokens/about-uri-tokens.xhtml</a>.</p> <table class="data longlastcol"> <tbody> <tr> <th>Registered Token <td><code class="highlight">invalid</code> <tr> <th>Intended Usage <td> The <code class="highlight"><c- k>about</c-><c- p>:</c->invalid</code> URL references a non-existent document with a generic error condition. It can be used when a URL is necessary, but the default value shouldn’t be resolvable as any type of document. <tr> <th>Contact/Change controller <td>CSS WG &lt;<a href="mailto:www-style@w3.org">www-style@w3.org</a>> (on behalf of W3C) <tr> <th>Specification <td><a href="https://www.w3.org/TR/css3-values/">CSS Values and Units Module Level 3</a> </table> <h2 class="no-num heading settled" id="acknowledgments"><span class="content"> Acknowledgments</span><a class="self-link" href="#acknowledgments"></a></h2> <p>Comments and suggestions from Giovanni Campagna, Christoph Päper, Keith Rarick, Alex Mogilevsky, Ian Hickson, David Baron, Edward Welbourne, Boris Zbarsky, Björn Höhrmann and Michael Day improved this module.</p> <div class="informative"> <h2 class="no-num heading settled" id="changes"><span class="content"> Changes</span><a class="self-link" href="#changes"></a></h2> <p>Changes since the <a href="https://www.w3.org/TR/2022/CR-css-values-3-20221201/">1 December 2022 Candidate Recommenation Snapshot</a> are:</p> <ul> <li data-md> <p>Editorial synchronization with <a data-biblio-display="inline" data-link-type="biblio" href="https://www.w3.org/TR/css-values-4/"><cite>CSS Values and Units Module Level 4</cite></a>.</p> <li data-md> <p>Added definition for <span class="css">&lt;func()></span> notation to the <a data-link-type="dfn" href="#css-value-definition-syntax" id="ref-for-css-value-definition-syntax">value definition syntax</a>.</p> <li data-md> <p>Clarified stacking of multipliers.</p> <li data-md> <p>Clarified that <a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value⑥">&lt;resolution></a> cannot be negative.</p> </ul> <p>Changes since the <a href="https://www.w3.org/TR/2019/CR-css-values-3-20190606/">6 June 2019 Candidate Recommendation</a> are:</p> <ul> <li data-md> <p>Dropped the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#funcdef-attr" id="ref-for-funcdef-attr">attr()</a> function, since it was punted to Level 5.</p> <li data-md> <p>Specified serialization of empty urls to be <code class="highlight"><c- nf>url</c-><c- p>(</c-><c- s>""</c-><c- p>)</c-></code>. (<a href="https://github.com/w3c/csswg-drafts/issues/6447">Issue 6447</a>)</p> <li data-md> <p>Clarified that the <a data-link-type="dfn" href="#font-relative-length" id="ref-for-font-relative-length②">font-relative lengths</a> are calculated without text shaping. (<a href="https://github.com/w3c/csswg-drafts/issues/5498">Issue 5498</a>)</p> <li data-md> <p>Added a definition for <a data-link-type="dfn" href="#device-pixel" id="ref-for-device-pixel③">device pixel</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/7287">Issue 7287</a>)</p> <li data-md> <p>Cleaned up interaction of this specification and <a data-link-type="biblio" href="#biblio-css-cascade-3" title="CSS Cascading and Inheritance Level 3">[CSS-CASCADE-3]</a> in defining the <a data-link-type="dfn" href="#css-wide-keywords" id="ref-for-css-wide-keywords①">CSS-wide keywords</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/7439">Issue 7439</a>)</p> <li data-md> <p>Removed definition of <a class="production css" data-link-type="type">&lt;length-number></a>, since it is impossible to combine them with <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②⑥">calc()</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/2789">Issue 2789</a>)</p> <li data-md> <p>Fixed definition of <a data-link-type="dfn" href="#number" id="ref-for-number②">numbers</a> to allow decimals in combination with scientific notation, as originally intended and as defined in <a data-link-type="biblio" href="#biblio-css-syntax-3" title="CSS Syntax Module Level 3">[CSS-SYNTAX-3]</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/7248">Issue 7248</a>)</p> <li data-md> <p>Editorial improvements.</p> </ul> <p>Changes since the <a href="https://www.w3.org/TR/2019/CR-css-values-3-20190131/">31 January 2019 Candidate Recommendation</a> are:</p> <ul> <li>Added the new <a data-link-type="dfn" href="#css-bracketed-range-notation" id="ref-for-css-bracketed-range-notation②">bracketed range notation</a> to the CSS <a data-link-type="dfn" href="#css-value-definition-syntax" id="ref-for-css-value-definition-syntax①">value definition syntax</a>. This has no normative implications on implementations, just allows more routine annotation of ranges in future CSS specifications. (<a href="https://github.com/w3c/csswg-drafts/issues/355">Issue 355</a>) </ul> <p>Changes since the <a href="https://www.w3.org/TR/2018/CR-css-values-3-20180814/">14 August 2018 Candidate Recommendation</a> are:</p> <ul> <li>Defined <a class="production css" data-link-type="property">&lt;'property'></a> syntax to refer to the property without any top-level #-multiplier, to make the notation usable with common list-valued property patterns. (<a href="https://github.com/w3c/csswg-drafts/issues/3146">Issue 3146</a>) <li> Clarified that numeric values outside the allowed range are not ignored if a more specific spec defines other handling. (<a href="https://github.com/w3c/csswg-drafts/issues/3270">Issue 3270</a>) <blockquote> Properties may restrict numeric values to some range. If the value is outside the allowed range, <ins>unless otherwise specified,</ins> the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS2/conform.html#ignore">ignored</a>. </blockquote> <li>Fixed some <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position" id="ref-for-propdef-background-position④">background-position</a> examples to be less confusing. (<a href="https://github.com/w3c/csswg-drafts/issues/3482#issuecomment-453257033">Issue 3482</a>) </ul> <p>A <a href="http://drafts.csswg.org/css-values-3/issues-cr-2018">Disposition of Comments</a> is available.</p> <p>Changes since the <a href="https://www.w3.org/TR/2016/CR-css-values-3-20160929/">29 September 2016 Candidate Recommendation</a> are:</p> <ul> <li>Removed <a href="#change-2012-vwh-scrollbars">consideration of scrollbars</a> in computing viewport units due to lack of implementations. (<a href="https://drafts.csswg.org/css-values-3/issues-cr-2016#issue-15">Issue 15</a>) <li>Inlined the <a class="production css" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position⑥">&lt;position></a> definition and dropped the three-value syntaxes to allow for unambiguous combination in complex grammars. This effectively removes that syntax from <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-images-3/#propdef-object-position" id="ref-for-propdef-object-position">object-position</a>, but allows <span class="production" id="ref-for-typedef-position⑦">&lt;position></span> to be re-used e.g. in <a data-link-type="biblio" href="#biblio-css-transforms-1" title="CSS Transforms Module Level 1">[CSS-TRANSFORMS-1]</a> for 3D positions. (See <a href="https://lists.w3.org/Archives/Public/www-style/2017Feb/0052.html">discussion</a>.) <li>Reverted previous change to allow zero angles to drop their unit; this will instead be special-cased where needed for backwards-compatibility. (See <a href="https://lists.w3.org/Archives/Public/www-style/2017Apr/0027.html">discussion</a>) <li>Defined that range checking, and any resulting clamping, of <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②⑦">calc()</a> values is performed both at computed time and at used time. (<a href="https://github.com/w3c/csswg-drafts/issues/434">Issue #434</a>) <li>Fixed grammar error that disallowed numeric expressions as denominators in <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②⑧">calc()</a>. (<a href="https://drafts.csswg.org/css-values-3/issues-cr-2016#issue-12">Issue 12</a>) <li>Defined handling of font-relative units outside the context of an element. (<a href="https://drafts.csswg.org/css-values-3/issues-cr-2016#issue-9">Issue 9</a>) <li>Defined that <span class="css">0</span> parses as <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value②③">&lt;number></a> if it’s ambiguous whether it’s a <span class="production" id="ref-for-number-value②④">&lt;number></span> or a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑧">&lt;length></a>. (<a href="https://github.com/w3c/csswg-drafts/issues/489">Issue 489</a>) <li>Defined empty <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①③">url()</a>s to refer to an invalid URL, rather than resolving to the URL of the style sheet. (<a href="https://github.com/w3c/csswg-drafts/issues/2211">Issue 2211</a>) <li>Removed (unused) ability for percentages to be treated as a <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value②⑤">&lt;number></a> type in <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc②⑨">calc()</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/1463">Issue 1463</a>) <li>Clarified that high-resolution screens should anchor on device pixels, not physical units. (<a href="https://drafts.csswg.org/css-values-3/issues-cr-2016#issue-8">Issue 8</a>) <li>Clarified definition of <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①④">url()</a> to normatively say that it accepts unquoted syntax. <li>Defined that fragment-only <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①⑤">url()</a> are specially handled to always be page-local links, regardless of base-url shenanigans. (See <a href="#local-urls">§ 3.4.1.1 Fragment URLs</a>.) <li>Defined attr() parsing in terms of the Syntax spec, not CSS2.1 grammar. </ul> <p>A <a href="https://drafts.csswg.org/css-values-3/issues-cr-2016">Disposition of Comments</a> is available.</p> <p>Changes since the <a href="https://www.w3.org/TR/2015/CR-css-values-3-20150611/">11 June 2015 Candidate Recommendation</a> are:</p> <ul> <li>Dropped <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#funcdef-toggle" id="ref-for-funcdef-toggle">toggle()</a> for lack of implementations. <li>Allow zero angles to be represented as <span class="css">0</span>. (Change due to Web-compatibility constraints in transform and gradient syntaxes.) <li>Defined <a href="#local-urls">special handling</a> for fragment URLs. <li>Defined an empty <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value⑨">&lt;url></a> resolves to an invalid resource. <li>Defined <a data-link-type="dfn" href="#compatible-units" id="ref-for-compatible-units⑧">compatible units</a> and <a data-link-type="dfn" href="#canonical-unit" id="ref-for-canonical-unit⑥">canonical units</a> for serialization. <li>Defined case-sensitivity of <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①⑥">url()</a> attribute argument to match attribute selectors. <li>Added definition of <a class="production css" data-link-type="type" href="#typedef-ident" id="ref-for-typedef-ident②">&lt;ident></a> notation to definition of <a data-link-type="dfn" href="#css-css-identifier" id="ref-for-css-css-identifier④">identifiers</a>. <li>Added <a class="production css" data-link-type="type" href="#typedef-length-percentage" id="ref-for-typedef-length-percentage⑤">&lt;length-percentage></a> as a shorthand for <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑨">&lt;length></a> | <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value②③">&lt;percentage></a>, along with equivalent productions for angles, numbers, times, and frequencies. <li>Allowed <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value②④">&lt;percentage></a>s inside <a class="css" data-link-type="maybe" href="#funcdef-calc" id="ref-for-funcdef-calc③⓪">calc()</a> to resolve as their own type, if they occur in some (as yet theoretical) context where they are not compatible with any other type. <li>Various clarifications and editorial improvements. </ul> <p>Changes since the <a href="https://www.w3.org/TR/2013/CR-css3-values-20130730/">30 July 2013 Candidate Recommendation</a> are:</p> <ul> <li>Specified that, in the absence of font information, <span class="css">1ch</span> equal <span class="css">.5em</span>. <li>Added <a class="css" data-link-type="maybe" href="#Q" id="ref-for-Q②">Q</a> unit. <li>Relaxed unnecessary restrictions on <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value①③">&lt;custom-ident></a>. Require specs referencing it to be clear about excluded keywords, because the new rule isn’t as simple. <li>Clarified relative URL resolution for embedded style sheets. <li>Clarified {<var>A</var>} variant of {<var>A</var>,<var>B</var>} notation. <li>Added notation for restricting the length of comma-separated lists specified with the <span class="css">#</span> notation. <li>Clarified handling of <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#funcdef-toggle" id="ref-for-funcdef-toggle①">toggle()</a> when used in shorthand declarations. <li>Clarified that stringing together reorderable combinations allows interleaving. <li>Changed syntax references from the 2.1 grammar to the Syntax spec. </ul> <p>A <a href="https://drafts.csswg.org/css-values-3/issues-cr-2013">Disposition of Comments</a> is available. </p> <p>Changes since the <a href="https://www.w3.org/TR/2012/CR-css3-values-20120828/">28 August 2012 Candidate Recommendation</a> are:</p> <ul> <li>Corrected <code class="highlight">wqname</code> in the <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#funcdef-attr" id="ref-for-funcdef-attr①">attr()</a> syntax to <code class="highlight">qname</code> <li>Made undefined namespace prefixes in <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#funcdef-attr" id="ref-for-funcdef-attr②">attr()</a> invalidate the function. <li id="change-2012-vwh-scrollbars"><a class="self-link" href="#change-2012-vwh-scrollbars"></a> Per <a href="https://lists.w3.org/Archives/Public/www-style/2013Jan/0616.html">WG resolution</a>, made <a href="#viewport-relative-lengths">viewport-percentage units</a> respect scrollbars on the viewport unless <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-overflow-3/#propdef-overflow" id="ref-for-propdef-overflow">overflow</a> is <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-overflow-3/#valdef-overflow-auto" id="ref-for-valdef-overflow-auto">auto</a> (in which case they ignore the presence of scrollbars). <li>Deferred exact definition of <a href="#viewport-relative-lengths">viewport-percentage units</a> in <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#paged-media" id="ref-for-paged-media②">paged media</a> to <a href="https://www.w3.org/TR/css3-page/">CSS Paged Media</a>. <li>Added back the <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value①④">&lt;custom-ident></a> term as a convenience notation, so that other specs can refer to it. </ul> <p>Changes since the <a href="https://www.w3.org/TR/2013/CR-css3-values-20130404/">4 April 2013 Candidate Recommendation</a> are:</p> <ul> <li>Noted that the list of <a data-link-type="dfn" href="#css-wide-keywords" id="ref-for-css-wide-keywords②">CSS-wide keywords</a> may be expanded by other specs. <li>Clarified definition of <a class="css" data-link-type="maybe" href="#ex" id="ref-for-ex③">ex</a> to refer to the “first available font”. <li>Specified that <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#funcdef-attr" id="ref-for-funcdef-attr③">attr()</a> with <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#valdef-attr-string" id="ref-for-valdef-attr-string">string</a> or <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-values-5/#valdef-attr-url" id="ref-for-valdef-attr-url">url</a> types doesn’t reparse the attribute contents, just takes the value literally as the value of a <a class="production css" data-link-type="type" href="#string-value" id="ref-for-string-value⑤">&lt;string></a>. </ul> </div> <h2 class="no-num heading settled" id="security"><span class="content"> Security Considerations</span><a class="self-link" href="#security"></a></h2> <p>This specification presents no new security considerations.</p> <p>This specification defines the <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①⑦">url()</a> function (<a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value①⓪">&lt;url></a>), which allows CSS to make network requests. Depending on what features they are used in, these can potentially expose whether or not the user has access to resources on a network, and expose information about their contents (such as the rules within a style sheet, the size of an image, the metrics of a font). They can also allow exfiltrating data via URL.</p> <h2 class="no-num heading settled" id="privacy"><span class="content"> Privacy Considerations</span><a class="self-link" href="#privacy"></a></h2> <p>This specification introduces units that expose the user’s screen size (the <a data-link-type="dfn" href="#viewport-percentage-lengths" id="ref-for-viewport-percentage-lengths">viewport-percentage lengths</a>), default font size, and potentially some information about which fonts are available on the user’s system (the <a data-link-type="dfn" href="#font-relative-length" id="ref-for-font-relative-length③">font-relative lengths</a>).</p> <p>This specification defines the <a class="css" data-link-type="maybe" href="#funcdef-url" id="ref-for-funcdef-url①⑧">url()</a> function (<a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value①①">&lt;url></a>), which allows CSS to make network requests. Depending on what features they are used in, these can potentially expose whether or not the user has access to resources on a network, and expose information about their contents (such as the rules within a style sheet, the size of an image, the metrics of a font). They can also allow exfiltrating data via URL.</p> </main> <h2 class="no-ref no-num heading settled" id="w3c-conformance"><span class="content"> Conformance</span><a class="self-link" href="#w3c-conformance"></a></h2> <h3 class="no-ref heading settled" id="w3c-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#w3c-conventions"></a></h3> <p>Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification. </p> <p>All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</a></p> <p>Examples in this specification are introduced with the words “for example” or are set apart from the normative text with <code class="highlight">class=<c- s>"example"</c-></code>, like this: </p> <div class="example" id="w3c-example"> <a class="self-link" href="#w3c-example"></a> <p>This is an example of an informative example.</p> </div> <p>Informative notes begin with the word “Note” and are set apart from the normative text with <code class="highlight">class=<c- s>"note"</c-></code>, like this: </p> <p class="note" role="note">Note, this is an informative note.</p> <p>Advisements are normative sections styled to evoke special attention and are set apart from other normative text with <code class="highlight">&lt;strong class=<c- s>"advisement"</c->></code>, like this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong></p> <h3 class="no-ref heading settled" id="w3c-conformance-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#w3c-conformance-classes"></a></h3> <p>Conformance to this specification is defined for three conformance classes: </p> <dl> <dt>style sheet <dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS style sheet</a>. <dt>renderer <dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders documents that use them. <dt>authoring tool <dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that writes a style sheet. </dl> <p>A style sheet is conformant to this specification if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module. </p> <p>A renderer is conformant to this specification if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by this specification by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.) </p> <p>An authoring tool is conformant to this specification if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module. </p> <h3 class="no-ref heading settled" id="w3c-partial"><span class="content"> Partial implementations</span><a class="self-link" href="#w3c-partial"></a></h3> <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers <strong>must</strong> treat as invalid (and <a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignore as appropriate</a>) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents <strong>must not</strong> selectively ignore unsupported component values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored.</p> <h4 class="heading settled" id="w3c-conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#w3c-conform-future-proofing"></a></h4> <p>To avoid clashes with future stable CSS features, the CSSWG recommends <a href="https://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="https://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="https://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p> <h3 class="no-ref heading settled" id="w3c-testing"><span class="content"> Non-experimental implementations</span><a class="self-link" href="#w3c-testing"></a></h3> <p>Once a specification reaches the Candidate Recommendation stage, non-experimental implementations are possible, and implementors should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec. </p> <p>To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group. </p> <p>Further information on submitting testcases and implementation reports can be found from on the CSS Working Group’s website at <a href="https://www.w3.org/Style/CSS/Test/">https://www.w3.org/Style/CSS/Test/</a>. Questions should be directed to the <a href="https://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list.</p> <h3 class="no-ref heading settled" id="w3c-cr-exit-criteria"><span class="content"> CR exit criteria</span><a class="self-link" href="#w3c-cr-exit-criteria"></a></h3> <p> For this specification to be advanced to Proposed Recommendation, there must be at least two independent, interoperable implementations of each feature. Each feature may be implemented by a different set of products, there is no requirement that all features be implemented by a single product. For the purposes of this criterion, we define the following terms: </p> <dl> <dt>independent <dd>each implementation must be developed by a different party and cannot share, reuse, or derive from code used by another qualifying implementation. Sections of code that have no bearing on the implementation of this specification are exempt from this requirement. <dt>interoperable <dd>passing the respective test case(s) in the official CSS test suite, or, if the implementation is not a Web browser, an equivalent test. Every relevant test in the test suite should have an equivalent test created if such a user agent (UA) is to be used to claim interoperability. In addition if such a UA is to be used to claim interoperability, then there must one or more additional UAs which can also pass those equivalent tests in the same way for the purpose of interoperability. The equivalent tests must be made publicly available for the purposes of peer review. <dt>implementation <dd> a user agent which: <ol class="inline"> <li>implements the specification. <li>is available to the general public. The implementation may be a shipping product or other publicly available version (i.e., beta version, preview release, or "nightly build"). Non-shipping product releases must have implemented the feature(s) for a period of at least one month in order to demonstrate stability. <li>is not experimental (i.e., a version specifically designed to pass the test suite and is not intended for normal usage going forward). </ol> </dl> <p>The specification will remain Candidate Recommendation for at least six months.</p> <script src="https://www.w3.org/scripts/TR/2021/fixup.js"></script> <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2> <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3> <ul class="index"> <li><a href="#mult-req">!</a><span>, in § 2.3</span> <li><a href="#mult-comma">#</a><span>, in § 2.3</span> <li><a href="#comb-all">&amp;&amp;</a><span>, in § 2.2</span> <li><a href="#mult-zero-plus">*</a><span>, in § 2.3</span> <li><a href="#mult-one-plus">+</a><span>, in § 2.3</span> <li><a href="#comb-comma">,</a><span>, in § 2.1</span> <li><a href="#mult-opt">?</a><span>, in § 2.3</span> <li><a href="#comb-one">|</a><span>, in § 2.2</span> <li><a href="#comb-any">||</a><span>, in § 2.2</span> <li><a href="#mult-num">{A}</a><span>, in § 2.3</span> <li><a href="#mult-num-range">{A,B}</a><span>, in § 2.3</span> <li><a href="#absolute-length">absolute length</a><span>, in § 5.2</span> <li><a href="#absolute-length">absolute length unit</a><span>, in § 5.2</span> <li><a href="#length-advance-measure">advance measure</a><span>, in § 5.1.1</span> <li><a href="#anchor-unit">anchor</a><span>, in § 5.2</span> <li><a href="#anchor-unit">anchor unit</a><span>, in § 5.2</span> <li><a href="#angle-value">&lt;angle></a><span>, in § 6.1</span> <li><a href="#typedef-angle-percentage">&lt;angle-percentage></a><span>, in § 4.6</span> <li><a href="#bearing-angle">bearing angle</a><span>, in § 6.1</span> <li><a href="#css-bracketed-range-notation">bracketed range notation</a><span>, in § 4.1</span> <li><a href="#funcdef-calc">calc()</a><span>, in § 8.1</span> <li><a href="#typedef-calc-number-product">&lt;calc-number-product></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-number-sum">&lt;calc-number-sum></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-number-value">&lt;calc-number-value></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-product">&lt;calc-product></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-sum">&lt;calc-sum></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-value">&lt;calc-value></a><span>, in § 8.1.1</span> <li><a href="#canonical-unit">canonical</a><span>, in § 4.4.1</span> <li><a href="#canonical-unit">canonical unit</a><span>, in § 4.4.1</span> <li><a href="#ch">ch</a><span>, in § 5.1.1</span> <li><a href="#ch">ch unit</a><span>, in § 5.1.1</span> <li><a href="#cm">cm</a><span>, in § 5.2</span> <li><a href="#compatible-units">compatible</a><span>, in § 4.4.1</span> <li><a href="#compatible-units">compatible units</a><span>, in § 4.4.1</span> <li><a href="#css-bracketed-range-notation">CSS bracketed range notation</a><span>, in § 4.1</span> <li><a href="#css-css-identifier">CSS ident</a><span>, in § 3</span> <li><a href="#css-css-identifier">CSS identifier</a><span>, in § 3</span> <li><a href="#css-value-definition-syntax">CSS value definition syntax</a><span>, in § 2</span> <li><a href="#css-wide-keywords">CSS-wide keywords</a><span>, in § 3.1.1</span> <li><a href="#identifier-value">&lt;custom-ident></a><span>, in § 3.2</span> <li><a href="#deg">deg</a><span>, in § 6.1</span> <li><a href="#device-pixel">device pixel</a><span>, in § 5.2</span> <li><a href="#typedef-dimension">&lt;dimension></a><span>, in § 4.4</span> <li><a href="#dimension">dimension</a><span>, in § 4.4</span> <li><a href="#dpcm">dpcm</a><span>, in § 6.4</span> <li><a href="#dpi">dpi</a><span>, in § 6.4</span> <li><a href="#dppx">dppx</a><span>, in § 6.4</span> <li><a href="#em">em</a><span>, in § 5.1.1</span> <li><a href="#em">em unit</a><span>, in § 5.1.1</span> <li><a href="#ex">ex</a><span>, in § 5.1.1</span> <li><a href="#ex">ex unit</a><span>, in § 5.1.1</span> <li><a href="#font-relative-length">font-relative lengths</a><span>, in § 5.1.1</span> <li><a href="#frequency-value">&lt;frequency></a><span>, in § 6.3</span> <li><a href="#typedef-frequency-percentage">&lt;frequency-percentage></a><span>, in § 4.6</span> <li><a href="#functional-notation">functional notation</a><span>, in § 8</span> <li><a href="#grad">grad</a><span>, in § 6.1</span> <li><a href="#Hz">Hz</a><span>, in § 6.3</span> <li><a href="#typedef-ident">&lt;ident></a><span>, in § 3</span> <li><a href="#css-css-identifier">ident</a><span>, in § 3</span> <li><a href="#css-css-identifier">identifier</a><span>, in § 3</span> <li><a href="#in">in</a><span>, in § 5.2</span> <li><a href="#integer-value">&lt;integer></a><span>, in § 4.2</span> <li><a href="#integer">integer</a><span>, in § 4.2</span> <li><a href="#css-keyword">keyword</a><span>, in § 3.1</span> <li><a href="#kHz">kHz</a><span>, in § 6.3</span> <li><a href="#length-value">&lt;length></a><span>, in § 5</span> <li><a href="#typedef-length-percentage">&lt;length-percentage></a><span>, in § 4.6</span> <li><a href="#url-local-url-flag">local url flag</a><span>, in § 3.4.1.1</span> <li><a href="#mm">mm</a><span>, in § 5.2</span> <li><a href="#ms">ms</a><span>, in § 6.2</span> <li><a href="#number-value">&lt;number></a><span>, in § 4.3</span> <li><a href="#number">number</a><span>, in § 4.3</span> <li><a href="#numeric-data-types">numeric data types</a><span>, in § 4</span> <li><a href="#pc">pc</a><span>, in § 5.2</span> <li><a href="#percentage-value">&lt;percentage></a><span>, in § 4.5</span> <li><a href="#percentage">percentage</a><span>, in § 4.5</span> <li><a href="#physical-unit">physical unit</a><span>, in § 5.2</span> <li><a href="#visual-angle-unit">pixel unit</a><span>, in § 5.2</span> <li><a href="#typedef-position">&lt;position></a><span>, in § 7.3</span> <li><a href="#pt">pt</a><span>, in § 5.2</span> <li><a href="#px">px</a><span>, in § 5.2</span> <li><a href="#Q">Q</a><span>, in § 5.2</span> <li><a href="#rad">rad</a><span>, in § 6.1</span> <li><a href="#reference-pixel">reference pixel</a><span>, in § 5.2</span> <li><a href="#relative-length">relative length</a><span>, in § 5.1</span> <li><a href="#relative-length">relative length unit</a><span>, in § 5.1</span> <li><a href="#rem">rem</a><span>, in § 5.1.1</span> <li><a href="#rem">rem unit</a><span>, in § 5.1.1</span> <li><a href="#resolution-value">&lt;resolution></a><span>, in § 6.4</span> <li><a href="#resolved-type">resolved type</a><span>, in § 8.1.2</span> <li><a href="#s">s</a><span>, in § 6.2</span> <li><a href="#string-value">&lt;string></a><span>, in § 3.3</span> <li><a href="#css-textual-data-types">textual data types</a><span>, in § 3</span> <li><a href="#time-value">&lt;time></a><span>, in § 6.2</span> <li><a href="#typedef-time-percentage">&lt;time-percentage></a><span>, in § 4.6</span> <li><a href="#turn">turn</a><span>, in § 6.1</span> <li><a href="#url-value">&lt;url></a><span>, in § 3.4</span> <li><a href="#url">URL</a><span>, in § 3.4</span> <li><a href="#funcdef-url">url()</a><span>, in § 3.4</span> <li><a href="#typedef-url-modifier">&lt;url-modifier></a><span>, in § 3.4.3</span> <li><a href="#css-value-definition-syntax">value definition syntax</a><span>, in § 2</span> <li><a href="#vh">vh</a><span>, in § 5.1.2</span> <li><a href="#viewport-percentage-lengths">viewport-percentage lengths</a><span>, in § 5.1.2</span> <li><a href="#visual-angle-unit">visual angle unit</a><span>, in § 5.2</span> <li><a href="#vmax">vmax</a><span>, in § 5.1.2</span> <li><a href="#vmin">vmin</a><span>, in § 5.1.2</span> <li><a href="#vw">vw</a><span>, in § 5.1.2</span> </ul> <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3> <ul class="index"> <li> <a data-link-type="biblio">[CSS-2023]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="861626b1">ua</span> </ul> <li> <a data-link-type="biblio">[CSS-ANIMATIONS-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="1e12dba3">animation</span> <li><span class="dfn-paneled" id="04beed9b">animation-name</span> <li><span class="dfn-paneled" id="79dcf364">animation-timing-function</span> </ul> <li> <a data-link-type="biblio">[CSS-BOX-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="f72f0a02">padding-top</span> </ul> <li> <a data-link-type="biblio">[CSS-BREAK-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="4f75e4ec">orphans</span> </ul> <li> <a data-link-type="biblio">[CSS-CASCADE-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="3eef835e">@import</span> <li><span class="dfn-paneled" id="0948355d">actual value</span> <li><span class="dfn-paneled" id="8c8e51b4">computed value</span> <li><span class="dfn-paneled" id="d0dc95c3">inherit</span> <li><span class="dfn-paneled" id="762bad34">initial</span> <li><span class="dfn-paneled" id="d5e08d9c">specified value</span> <li><span class="dfn-paneled" id="7c39b465">unset</span> <li><span class="dfn-paneled" id="1a2b1083">used value</span> </ul> <li> <a data-link-type="biblio">[CSS-COLOR-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="5bd3632a">hsl()</span> <li><span class="dfn-paneled" id="3b7558dc">opacity</span> <li><span class="dfn-paneled" id="f3226176">rgba()</span> </ul> <li> <a data-link-type="biblio">[CSS-COLOR-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="d04b6986">&lt;color></span> </ul> <li> <a data-link-type="biblio">[CSS-COUNTER-STYLES-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a9efccbc">disc</span> </ul> <li> <a data-link-type="biblio">[CSS-DISPLAY-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="6b4fc208">containing block</span> </ul> <li> <a data-link-type="biblio">[CSS-EASING-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c7d3b8b7">&lt;easing-function></span> <li><span class="dfn-paneled" id="2f7ff51f">ease-in</span> <li><span class="dfn-paneled" id="056b67db">ease-out</span> </ul> <li> <a data-link-type="biblio">[CSS-FONTS-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="11a985a9">font</span> <li><span class="dfn-paneled" id="7066562d">font-family</span> <li><span class="dfn-paneled" id="297dfe3a">font-size</span> </ul> <li> <a data-link-type="biblio">[CSS-GRID-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ca502323">fr</span> </ul> <li> <a data-link-type="biblio">[CSS-IMAGES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="5663abb5">image-resolution</span> <li><span class="dfn-paneled" id="dcb1125e">linear-gradient()</span> </ul> <li> <a data-link-type="biblio">[CSS-OVERFLOW-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="0bcf441e">auto</span> <li><span class="dfn-paneled" id="add377f4">overflow</span> </ul> <li> <a data-link-type="biblio">[CSS-SIZING-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c20b5ff5">auto</span> <li><span class="dfn-paneled" id="49731d1d">width</span> </ul> <li> <a data-link-type="biblio">[CSS-SYNTAX-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="87de393a">&lt;dimension-token></span> <li><span class="dfn-paneled" id="a6331414">&lt;function-token></span> <li><span class="dfn-paneled" id="446c663e">&lt;ident-token></span> <li><span class="dfn-paneled" id="eebbfe3d">&lt;number-token></span> <li><span class="dfn-paneled" id="8a73a2e3">&lt;percentage-token></span> <li><span class="dfn-paneled" id="17fe01a1">&lt;string-token></span> <li><span class="dfn-paneled" id="30679d85">&lt;url-token></span> <li><span class="dfn-paneled" id="267b6766">component value</span> <li><span class="dfn-paneled" id="cdce34f5">consume a url token</span> </ul> <li> <a data-link-type="biblio">[CSS-TEXT-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="36e5f32e">text-align</span> </ul> <li> <a data-link-type="biblio">[CSS-TEXT-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="291965b2">center</span> <li><span class="dfn-paneled" id="beb6807a">tab-size</span> </ul> <li> <a data-link-type="biblio">[CSS-TEXT-DECOR-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="4d38e4c5">text-decoration</span> </ul> <li> <a data-link-type="biblio">[CSS-TRANSFORMS-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="31452ed5">transform-origin</span> </ul> <li> <a data-link-type="biblio">[CSS-UI-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="6ed19243">outline-color</span> </ul> <li> <a data-link-type="biblio">[CSS-VALUES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="b1f72e36">coordinating list property</span> </ul> <li> <a data-link-type="biblio">[CSS-VALUES-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="57699934">attr()</span> <li><span class="dfn-paneled" id="8ac10bc6">string</span> <li><span class="dfn-paneled" id="2ef1aa7d">toggle()</span> <li><span class="dfn-paneled" id="d10808c7">url</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="8664e85f">text-orientation</span> <li><span class="dfn-paneled" id="cec0d4db">upright</span> <li><span class="dfn-paneled" id="35f596e9">vertical-lr</span> <li><span class="dfn-paneled" id="ee88ce59">vertical-rl</span> <li><span class="dfn-paneled" id="37bb38a0">writing-mode</span> </ul> <li> <a data-link-type="biblio">[CSS2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="17f0c439">&lt;border-width></span> <li><span class="dfn-paneled" id="29ca9f85">border-collapse</span> </ul> <li> <a data-link-type="biblio">[CSS22]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ac54fbff">line-height</span> </ul> <li> <a data-link-type="biblio">[CSS3-BACKGROUND]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="db6870d5">background</span> <li><span class="dfn-paneled" id="8218676f">background-attachment</span> <li><span class="dfn-paneled" id="f2249e38">background-position</span> <li><span class="dfn-paneled" id="65b3a7bc">border-color</span> <li><span class="dfn-paneled" id="064303ba">border-width</span> <li><span class="dfn-paneled" id="c48eaa20">box-shadow</span> </ul> <li> <a data-link-type="biblio">[CSS3-IMAGES]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="35bf32f2">&lt;image></span> <li><span class="dfn-paneled" id="534310cb">object-position</span> </ul> <li> <a data-link-type="biblio">[CSS3PAGE]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="1fe10a71">page area</span> </ul> <li> <a data-link-type="biblio">[HTML]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c847111b">base</span> <li><span class="dfn-paneled" id="87806adf">pushState(data, unused, url)</span> </ul> <li> <a data-link-type="biblio">[INFRA]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="7f9469b5">ascii case-insensitive</span> <li><span class="dfn-paneled" id="0698d556">string</span> </ul> <li> <a data-link-type="biblio">[MEDIAQUERIES-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="9e462db5">continuous media</span> <li><span class="dfn-paneled" id="3ea2fcbb">media query</span> <li><span class="dfn-paneled" id="23af89d0">paged media</span> </ul> <li> <a data-link-type="biblio">[SELECTORS-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="dfd67b05">*</span> </ul> <li> <a data-link-type="biblio">[SELECTORS-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="3c7eec47">+</span> </ul> </ul> <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2> <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3> <dl> <dt id="biblio-css-2023">[CSS-2023] <dd>Chris Lilley; et al. <a href="https://www.w3.org/TR/css-2023/"><cite>CSS Snapshot 2023</cite></a>. 7 December 2023. NOTE. URL: <a href="https://www.w3.org/TR/css-2023/">https://www.w3.org/TR/css-2023/</a> <dt id="biblio-css-cascade-5">[CSS-CASCADE-5] <dd>Elika Etemad; Miriam Suzanne; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-5/"><cite>CSS Cascading and Inheritance Level 5</cite></a>. 13 January 2022. CR. URL: <a href="https://www.w3.org/TR/css-cascade-5/">https://www.w3.org/TR/css-cascade-5/</a> <dt id="biblio-css-color-5">[CSS-COLOR-5] <dd>Chris Lilley; et al. <a href="https://www.w3.org/TR/css-color-5/"><cite>CSS Color Module Level 5</cite></a>. 29 February 2024. WD. URL: <a href="https://www.w3.org/TR/css-color-5/">https://www.w3.org/TR/css-color-5/</a> <dt id="biblio-css-counter-styles-3">[CSS-COUNTER-STYLES-3] <dd>Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-counter-styles-3/"><cite>CSS Counter Styles Level 3</cite></a>. 27 July 2021. CR. URL: <a href="https://www.w3.org/TR/css-counter-styles-3/">https://www.w3.org/TR/css-counter-styles-3/</a> <dt id="biblio-css-display-3">[CSS-DISPLAY-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-display-3/"><cite>CSS Display Module Level 3</cite></a>. 30 March 2023. CR. URL: <a href="https://www.w3.org/TR/css-display-3/">https://www.w3.org/TR/css-display-3/</a> <dt id="biblio-css-fonts-4">[CSS-FONTS-4] <dd>Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-4/"><cite>CSS Fonts Module Level 4</cite></a>. 1 February 2024. WD. URL: <a href="https://www.w3.org/TR/css-fonts-4/">https://www.w3.org/TR/css-fonts-4/</a> <dt id="biblio-css-images-4">[CSS-IMAGES-4] <dd>Tab Atkins Jr.; Elika Etemad; Lea Verou. <a href="https://www.w3.org/TR/css-images-4/"><cite>CSS Images Module Level 4</cite></a>. 17 February 2023. WD. URL: <a href="https://www.w3.org/TR/css-images-4/">https://www.w3.org/TR/css-images-4/</a> <dt id="biblio-css-sizing-3">[CSS-SIZING-3] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-sizing-3/"><cite>CSS Box Sizing Module Level 3</cite></a>. 17 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-sizing-3/">https://www.w3.org/TR/css-sizing-3/</a> <dt id="biblio-css-syntax-3">[CSS-SYNTAX-3] <dd>Tab Atkins Jr.; Simon Sapin. <a href="https://www.w3.org/TR/css-syntax-3/"><cite>CSS Syntax Module Level 3</cite></a>. 24 December 2021. CR. URL: <a href="https://www.w3.org/TR/css-syntax-3/">https://www.w3.org/TR/css-syntax-3/</a> <dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4] <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-4/"><cite>CSS Writing Modes Level 4</cite></a>. 30 July 2019. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-4/">https://www.w3.org/TR/css-writing-modes-4/</a> <dt id="biblio-css2">[CSS2] <dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS21/"><cite>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</cite></a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS21/">https://www.w3.org/TR/CSS21/</a> <dt id="biblio-css22">[CSS22] <dd>Bert Bos. <a href="https://www.w3.org/TR/CSS22/"><cite>Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification</cite></a>. 12 April 2016. WD. URL: <a href="https://www.w3.org/TR/CSS22/">https://www.w3.org/TR/CSS22/</a> <dt id="biblio-css3-background">[CSS3-BACKGROUND] <dd>Elika Etemad; Brad Kemper. <a href="https://www.w3.org/TR/css-backgrounds-3/"><cite>CSS Backgrounds and Borders Module Level 3</cite></a>. 11 March 2024. CR. URL: <a href="https://www.w3.org/TR/css-backgrounds-3/">https://www.w3.org/TR/css-backgrounds-3/</a> <dt id="biblio-css3-fonts">[CSS3-FONTS] <dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-3/"><cite>CSS Fonts Module Level 3</cite></a>. 20 September 2018. REC. URL: <a href="https://www.w3.org/TR/css-fonts-3/">https://www.w3.org/TR/css-fonts-3/</a> <dt id="biblio-css3-images">[CSS3-IMAGES] <dd>Tab Atkins Jr.; Elika Etemad; Lea Verou. <a href="https://www.w3.org/TR/css-images-3/"><cite>CSS Images Module Level 3</cite></a>. 18 December 2023. CR. URL: <a href="https://www.w3.org/TR/css-images-3/">https://www.w3.org/TR/css-images-3/</a> <dt id="biblio-css3color">[CSS3COLOR] <dd>Tantek Çelik; Chris Lilley; David Baron. <a href="https://www.w3.org/TR/css-color-3/"><cite>CSS Color Module Level 3</cite></a>. 18 January 2022. REC. URL: <a href="https://www.w3.org/TR/css-color-3/">https://www.w3.org/TR/css-color-3/</a> <dt id="biblio-css3page">[CSS3PAGE] <dd>Elika Etemad. <a href="https://www.w3.org/TR/css-page-3/"><cite>CSS Paged Media Module Level 3</cite></a>. 14 September 2023. WD. URL: <a href="https://www.w3.org/TR/css-page-3/">https://www.w3.org/TR/css-page-3/</a> <dt id="biblio-cssom">[CSSOM] <dd>Daniel Glazman; Emilio Cobos Álvarez. <a href="https://www.w3.org/TR/cssom-1/"><cite>CSS Object Model (CSSOM)</cite></a>. 26 August 2021. WD. URL: <a href="https://www.w3.org/TR/cssom-1/">https://www.w3.org/TR/cssom-1/</a> <dt id="biblio-infra">[INFRA] <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/"><cite>Infra Standard</cite></a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a> <dt id="biblio-mediaqueries-5">[MEDIAQUERIES-5] <dd>Dean Jackson; et al. <a href="https://www.w3.org/TR/mediaqueries-5/"><cite>Media Queries Level 5</cite></a>. 18 December 2021. WD. URL: <a href="https://www.w3.org/TR/mediaqueries-5/">https://www.w3.org/TR/mediaqueries-5/</a> <dt id="biblio-rfc2119">[RFC2119] <dd>S. Bradner. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. March 1997. Best Current Practice. URL: <a href="https://datatracker.ietf.org/doc/html/rfc2119">https://datatracker.ietf.org/doc/html/rfc2119</a> <dt id="biblio-selectors-3">[SELECTORS-3] <dd>Tantek Çelik; et al. <a href="https://www.w3.org/TR/selectors-3/"><cite>Selectors Level 3</cite></a>. 6 November 2018. REC. URL: <a href="https://www.w3.org/TR/selectors-3/">https://www.w3.org/TR/selectors-3/</a> <dt id="biblio-selectors-4">[SELECTORS-4] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/selectors-4/"><cite>Selectors Level 4</cite></a>. 11 November 2022. WD. URL: <a href="https://www.w3.org/TR/selectors-4/">https://www.w3.org/TR/selectors-4/</a> <dt id="biblio-url">[URL] <dd>Anne van Kesteren. <a href="https://url.spec.whatwg.org/"><cite>URL Standard</cite></a>. Living Standard. URL: <a href="https://url.spec.whatwg.org/">https://url.spec.whatwg.org/</a> </dl> <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3> <dl> <dt id="biblio-css-animations-1">[CSS-ANIMATIONS-1] <dd>David Baron; et al. <a href="https://www.w3.org/TR/css-animations-1/"><cite>CSS Animations Level 1</cite></a>. 2 March 2023. WD. URL: <a href="https://www.w3.org/TR/css-animations-1/">https://www.w3.org/TR/css-animations-1/</a> <dt id="biblio-css-box-4">[CSS-BOX-4] <dd>Elika Etemad. <a href="https://www.w3.org/TR/css-box-4/"><cite>CSS Box Model Module Level 4</cite></a>. 3 November 2022. WD. URL: <a href="https://www.w3.org/TR/css-box-4/">https://www.w3.org/TR/css-box-4/</a> <dt id="biblio-css-break-3">[CSS-BREAK-3] <dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-break-3/"><cite>CSS Fragmentation Module Level 3</cite></a>. 4 December 2018. CR. URL: <a href="https://www.w3.org/TR/css-break-3/">https://www.w3.org/TR/css-break-3/</a> <dt id="biblio-css-cascade-3">[CSS-CASCADE-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-3/"><cite>CSS Cascading and Inheritance Level 3</cite></a>. 11 February 2021. REC. URL: <a href="https://www.w3.org/TR/css-cascade-3/">https://www.w3.org/TR/css-cascade-3/</a> <dt id="biblio-css-color-4">[CSS-COLOR-4] <dd>Chris Lilley; Tab Atkins Jr.; Lea Verou. <a href="https://www.w3.org/TR/css-color-4/"><cite>CSS Color Module Level 4</cite></a>. 13 February 2024. CR. URL: <a href="https://www.w3.org/TR/css-color-4/">https://www.w3.org/TR/css-color-4/</a> <dt id="biblio-css-easing-1">[CSS-EASING-1] <dd>Brian Birtles; Dean Jackson; Matt Rakow. <a href="https://www.w3.org/TR/css-easing-1/"><cite>CSS Easing Functions Level 1</cite></a>. 13 February 2023. CR. URL: <a href="https://www.w3.org/TR/css-easing-1/">https://www.w3.org/TR/css-easing-1/</a> <dt id="biblio-css-grid-1">[CSS-GRID-1] <dd>Tab Atkins Jr.; et al. <a href="https://www.w3.org/TR/css-grid-1/"><cite>CSS Grid Layout Module Level 1</cite></a>. 18 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-grid-1/">https://www.w3.org/TR/css-grid-1/</a> <dt id="biblio-css-grid-2">[CSS-GRID-2] <dd>Tab Atkins Jr.; Elika Etemad; Rossen Atanassov. <a href="https://www.w3.org/TR/css-grid-2/"><cite>CSS Grid Layout Module Level 2</cite></a>. 18 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-grid-2/">https://www.w3.org/TR/css-grid-2/</a> <dt id="biblio-css-overflow-3">[CSS-OVERFLOW-3] <dd>Elika Etemad; Florian Rivoal. <a href="https://www.w3.org/TR/css-overflow-3/"><cite>CSS Overflow Module Level 3</cite></a>. 29 March 2023. WD. URL: <a href="https://www.w3.org/TR/css-overflow-3/">https://www.w3.org/TR/css-overflow-3/</a> <dt id="biblio-css-text-3">[CSS-TEXT-3] <dd>Elika Etemad; Koji Ishii; Florian Rivoal. <a href="https://www.w3.org/TR/css-text-3/"><cite>CSS Text Module Level 3</cite></a>. 3 September 2023. CR. URL: <a href="https://www.w3.org/TR/css-text-3/">https://www.w3.org/TR/css-text-3/</a> <dt id="biblio-css-text-4">[CSS-TEXT-4] <dd>Elika Etemad; et al. <a href="https://www.w3.org/TR/css-text-4/"><cite>CSS Text Module Level 4</cite></a>. 19 February 2024. WD. URL: <a href="https://www.w3.org/TR/css-text-4/">https://www.w3.org/TR/css-text-4/</a> <dt id="biblio-css-text-decor-4">[CSS-TEXT-DECOR-4] <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-text-decor-4/"><cite>CSS Text Decoration Module Level 4</cite></a>. 4 May 2022. WD. URL: <a href="https://www.w3.org/TR/css-text-decor-4/">https://www.w3.org/TR/css-text-decor-4/</a> <dt id="biblio-css-transforms-1">[CSS-TRANSFORMS-1] <dd>Simon Fraser; et al. <a href="https://www.w3.org/TR/css-transforms-1/"><cite>CSS Transforms Module Level 1</cite></a>. 14 February 2019. CR. URL: <a href="https://www.w3.org/TR/css-transforms-1/">https://www.w3.org/TR/css-transforms-1/</a> <dt id="biblio-css-ui-4">[CSS-UI-4] <dd>Florian Rivoal. <a href="https://www.w3.org/TR/css-ui-4/"><cite>CSS Basic User Interface Module Level 4</cite></a>. 16 March 2021. WD. URL: <a href="https://www.w3.org/TR/css-ui-4/">https://www.w3.org/TR/css-ui-4/</a> <dt id="biblio-css-values-4">[CSS-VALUES-4] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/"><cite>CSS Values and Units Module Level 4</cite></a>. 12 March 2024. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a> <dt id="biblio-css-values-5">[CSS-VALUES-5] <dd><a href="https://drafts.csswg.org/css-values-5/"><cite>CSS Values and Units Module Level 5</cite></a>. Editor's Draft. URL: <a href="https://drafts.csswg.org/css-values-5/">https://drafts.csswg.org/css-values-5/</a> <dt id="biblio-html">[HTML] <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/"><cite>HTML Standard</cite></a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a> <dt id="biblio-mediaq">[MEDIAQ] <dd>Florian Rivoal; Tab Atkins Jr.. <a href="https://www.w3.org/TR/mediaqueries-4/"><cite>Media Queries Level 4</cite></a>. 25 December 2021. CR. URL: <a href="https://www.w3.org/TR/mediaqueries-4/">https://www.w3.org/TR/mediaqueries-4/</a> <dt id="biblio-rfc6694">[RFC6694] <dd>S. Moonesamy, Ed.. <a href="https://www.rfc-editor.org/rfc/rfc6694"><cite>The "about" URI Scheme</cite></a>. August 2012. Informational. URL: <a href="https://www.rfc-editor.org/rfc/rfc6694">https://www.rfc-editor.org/rfc/rfc6694</a> </dl> <script>/* Boilerplate: script-dom-helper */ "use strict"; function query(sel) { return document.querySelector(sel); } function queryAll(sel) { return [...document.querySelectorAll(sel)]; } function iter(obj) { if(!obj) return []; var it = obj[Symbol.iterator]; if(it) return it; return Object.entries(obj); } function mk(tagname, attrs, ...children) { const el = document.createElement(tagname); for(const [k,v] of iter(attrs)) { if(k.slice(0,3) == "_on") { const eventName = k.slice(3); el.addEventListener(eventName, v); } else if(k[0] == "_") { // property, not attribute el[k.slice(1)] = v; } else { if(v === false || v == null) { continue; } else if(v === true) { el.setAttribute(k, ""); continue; } else { el.setAttribute(k, v); } } } append(el, children); return el; } /* Create shortcuts for every known HTML element */ [ "a", "abbr", "acronym", "address", "applet", "area", "article", "aside", "audio", "b", "base", "basefont", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "font", "footer", "form", "frame", "frameset", "head", "header", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "link", "main", "map", "mark", "meta", "meter", "nav", "nobr", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "q", "s", "samp", "script", "section", "select", "small", "source", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "u", "ul", "var", "video", "wbr", "xmp", ].forEach(tagname=>{ mk[tagname] = (...args) => mk(tagname, ...args); }); function* nodesFromChildList(children) { for(const child of children.flat(Infinity)) { if(child instanceof Node) { yield child; } else { yield new Text(child); } } } function append(el, ...children) { for(const child of nodesFromChildList(children)) { if(el instanceof Node) el.appendChild(child); else el.push(child); } return el; } function insertAfter(el, ...children) { for(const child of nodesFromChildList(children)) { el.parentNode.insertBefore(child, el.nextSibling); } return el; } function clearContents(el) { el.innerHTML = ""; return el; } function parseHTML(markup) { if(markup.toLowerCase().trim().indexOf('<!doctype') === 0) { const doc = document.implementation.createHTMLDocument(""); doc.documentElement.innerHTML = markup; return doc; } else { const el = mk.template({}); el.innerHTML = markup; return el.content; } }</script> <script>/* Boilerplate: script-dfn-panel */ "use strict"; { let dfnPanelData = { "04beed9b": {"dfnID":"04beed9b","dfnText":"animation-name","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-animation-name"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"}],"url":"https://www.w3.org/TR/css-animations-1/#propdef-animation-name"}, "056b67db": {"dfnID":"056b67db","dfnText":"ease-out","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-cubic-bezier-easing-function-ease-out"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"}],"url":"https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-out"}, "064303ba": {"dfnID":"064303ba","dfnText":"border-width","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-border-width"},{"id":"ref-for-propdef-border-width\u2460"},{"id":"ref-for-propdef-border-width\u2461"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-propdef-border-width\u2462"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-border-width"}, "0698d556": {"dfnID":"0698d556","dfnText":"string","external":true,"refSections":[{"refs":[{"id":"ref-for-string"}],"title":"3.3. \nQuoted Strings: the <string> type"}],"url":"https://infra.spec.whatwg.org/#string"}, "0948355d": {"dfnID":"0948355d","dfnText":"actual value","external":true,"refSections":[{"refs":[{"id":"ref-for-actual-value"}],"title":"5. \nDistance Units: the <length> type"}],"url":"https://www.w3.org/TR/css-cascade-5/#actual-value"}, "0bcf441e": {"dfnID":"0bcf441e","dfnText":"auto","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-auto"}],"title":"\nChanges"}],"url":"https://www.w3.org/TR/css-overflow-3/#valdef-overflow-auto"}, "11a985a9": {"dfnID":"11a985a9","dfnText":"font","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-font"},{"id":"ref-for-propdef-font\u2460"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/css-fonts-4/#propdef-font"}, "17f0c439": {"dfnID":"17f0c439","dfnText":"<border-width>","external":true,"refSections":[{"refs":[{"id":"ref-for-value-def-border-width"}],"title":"2.1. \nComponent Value Types"}],"url":"https://www.w3.org/TR/CSS21/box.html#value-def-border-width"}, "17fe01a1": {"dfnID":"17fe01a1","dfnText":"<string-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-string-token"}],"title":"3.3. \nQuoted Strings: the <string> type"}],"url":"https://www.w3.org/TR/css-syntax-3/#typedef-string-token"}, "1a2b1083": {"dfnID":"1a2b1083","dfnText":"used value","external":true,"refSections":[{"refs":[{"id":"ref-for-used-value"},{"id":"ref-for-used-value\u2460"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-used-value\u2461"}],"title":"5. \nDistance Units: the <length> type"},{"refs":[{"id":"ref-for-used-value\u2462"}],"title":"8.1.4. \nRange Checking"}],"url":"https://www.w3.org/TR/css-cascade-5/#used-value"}, "1e12dba3": {"dfnID":"1e12dba3","dfnText":"animation","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-animation"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"}],"url":"https://www.w3.org/TR/css-animations-1/#propdef-animation"}, "1fe10a71": {"dfnID":"1fe10a71","dfnText":"page area","external":true,"refSections":[{"refs":[{"id":"ref-for-page-area"}],"title":"5.1.2. \nViewport-percentage Lengths: the vw, vh, vmin, vmax units"}],"url":"https://www.w3.org/TR/css-page-3/#page-area"}, "23af89d0": {"dfnID":"23af89d0","dfnText":"paged media","external":true,"refSections":[{"refs":[{"id":"ref-for-paged-media"},{"id":"ref-for-paged-media\u2460"}],"title":"5.1.2. \nViewport-percentage Lengths: the vw, vh, vmin, vmax units"},{"refs":[{"id":"ref-for-paged-media\u2461"}],"title":"\nChanges"}],"url":"https://www.w3.org/TR/mediaqueries-5/#paged-media"}, "267b6766": {"dfnID":"267b6766","dfnText":"component value","external":true,"refSections":[{"refs":[{"id":"ref-for-component-value"}],"title":"2.4. \nCombinator and Multiplier Patterns"},{"refs":[{"id":"ref-for-component-value\u2460"}],"title":"4.6. \nMixing Percentages and Dimensions"}],"url":"https://www.w3.org/TR/css-syntax-3/#component-value"}, "291965b2": {"dfnID":"291965b2","dfnText":"center","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-center"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-text-4/#valdef-text-align-center"}, "297dfe3a": {"dfnID":"297dfe3a","dfnText":"font-size","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-font-size"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-propdef-font-size\u2460"},{"id":"ref-for-propdef-font-size\u2461"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"},{"refs":[{"id":"ref-for-propdef-font-size\u2462"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-propdef-font-size\u2463"},{"id":"ref-for-propdef-font-size\u2464"}],"title":"8.1.3. \nComputed Value"}],"url":"https://www.w3.org/TR/css-fonts-4/#propdef-font-size"}, "29ca9f85": {"dfnID":"29ca9f85","dfnText":"border-collapse","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-border-collapse"}],"title":"3.1. \nPre-defined Keywords"}],"url":"https://www.w3.org/TR/CSS21/tables.html#propdef-border-collapse"}, "2ef1aa7d": {"dfnID":"2ef1aa7d","dfnText":"toggle()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-toggle"},{"id":"ref-for-funcdef-toggle\u2460"}],"title":"\nChanges"}],"url":"https://drafts.csswg.org/css-values-5/#funcdef-toggle"}, "2f7ff51f": {"dfnID":"2f7ff51f","dfnText":"ease-in","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-cubic-bezier-easing-function-ease-in"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"}],"url":"https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in"}, "30679d85": {"dfnID":"30679d85","dfnText":"<url-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-url-token"}],"title":"3.4. \nResource Locators: the <url> type"}],"url":"https://www.w3.org/TR/css-syntax-3/#typedef-url-token"}, "31452ed5": {"dfnID":"31452ed5","dfnText":"transform-origin","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-transform-origin"}],"title":"7.3. \n2D Positioning: the <position> type"}],"url":"https://www.w3.org/TR/css-transforms-1/#propdef-transform-origin"}, "35bf32f2": {"dfnID":"35bf32f2","dfnText":"<image>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-image"},{"id":"ref-for-typedef-image\u2460"},{"id":"ref-for-typedef-image\u2461"},{"id":"ref-for-typedef-image\u2462"}],"title":"7.2. \nImages: the <image> type"}],"url":"https://www.w3.org/TR/css-images-3/#typedef-image"}, "35f596e9": {"dfnID":"35f596e9","dfnText":"vertical-lr","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-writing-mode-vertical-lr"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-lr"}, "36e5f32e": {"dfnID":"36e5f32e","dfnText":"text-align","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-text-align"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-text-3/#propdef-text-align"}, "37bb38a0": {"dfnID":"37bb38a0","dfnText":"writing-mode","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-writing-mode"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode"}, "3b7558dc": {"dfnID":"3b7558dc","dfnText":"opacity","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-opacity"},{"id":"ref-for-propdef-opacity\u2460"},{"id":"ref-for-propdef-opacity\u2461"}],"title":"8.1.2. \nType Checking"}],"url":"https://www.w3.org/TR/css-color-4/#propdef-opacity"}, "3c7eec47": {"dfnID":"3c7eec47","dfnText":"+","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-adjacent"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-selectordef-adjacent\u2460"}],"title":"8.1.1. \nSyntax"},{"refs":[{"id":"ref-for-selectordef-adjacent\u2461"}],"title":"8.1.2. \nType Checking"}],"url":"https://www.w3.org/TR/selectors-4/#selectordef-adjacent"}, "3ea2fcbb": {"dfnID":"3ea2fcbb","dfnText":"media query","external":true,"refSections":[{"refs":[{"id":"ref-for-media-query"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/mediaqueries-5/#media-query"}, "3eef835e": {"dfnID":"3eef835e","dfnText":"@import","external":true,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-import"}],"title":"3.4. \nResource Locators: the <url> type"}],"url":"https://www.w3.org/TR/css-cascade-5/#at-ruledef-import"}, "446c663e": {"dfnID":"446c663e","dfnText":"<ident-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-ident-token"}],"title":"3. \nTextual Data Types"}],"url":"https://www.w3.org/TR/css-syntax-3/#typedef-ident-token"}, "49731d1d": {"dfnID":"49731d1d","dfnText":"width","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-width"},{"id":"ref-for-propdef-width\u2460"},{"id":"ref-for-propdef-width\u2461"},{"id":"ref-for-propdef-width\u2462"},{"id":"ref-for-propdef-width\u2463"},{"id":"ref-for-propdef-width\u2464"},{"id":"ref-for-propdef-width\u2465"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-propdef-width\u2466"},{"id":"ref-for-propdef-width\u2467"},{"id":"ref-for-propdef-width\u2468"},{"id":"ref-for-propdef-width\u2460\u24ea"}],"title":"8.1.2. \nType Checking"},{"refs":[{"id":"ref-for-propdef-width\u2460\u2460"},{"id":"ref-for-propdef-width\u2460\u2461"}],"title":"8.1.4. \nRange Checking"}],"url":"https://www.w3.org/TR/css-sizing-3/#propdef-width"}, "4d38e4c5": {"dfnID":"4d38e4c5","dfnText":"text-decoration","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-text-decoration"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-text-decor-4/#propdef-text-decoration"}, "4f75e4ec": {"dfnID":"4f75e4ec","dfnText":"orphans","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-orphans"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-break-3/#propdef-orphans"}, "534310cb": {"dfnID":"534310cb","dfnText":"object-position","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-object-position"}],"title":"\nChanges"}],"url":"https://www.w3.org/TR/css-images-3/#propdef-object-position"}, "5663abb5": {"dfnID":"5663abb5","dfnText":"image-resolution","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-image-resolution"},{"id":"ref-for-propdef-image-resolution\u2460"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"}],"url":"https://www.w3.org/TR/css-images-4/#propdef-image-resolution"}, "57699934": {"dfnID":"57699934","dfnText":"attr()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-attr"},{"id":"ref-for-funcdef-attr\u2460"},{"id":"ref-for-funcdef-attr\u2461"},{"id":"ref-for-funcdef-attr\u2462"}],"title":"\nChanges"}],"url":"https://drafts.csswg.org/css-values-5/#funcdef-attr"}, "5bd3632a": {"dfnID":"5bd3632a","dfnText":"hsl()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-hsl"}],"title":"4.6. \nMixing Percentages and Dimensions"}],"url":"https://www.w3.org/TR/css-color-4/#funcdef-hsl"}, "65b3a7bc": {"dfnID":"65b3a7bc","dfnText":"border-color","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-border-color"}],"title":"2.1. \nComponent Value Types"}],"url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-border-color"}, "6b4fc208": {"dfnID":"6b4fc208","dfnText":"containing block","external":true,"refSections":[{"refs":[{"id":"ref-for-containing-block"}],"title":"4.5. \nPercentages: the <percentage> type"}],"url":"https://www.w3.org/TR/css-display-3/#containing-block"}, "6ed19243": {"dfnID":"6ed19243","dfnText":"outline-color","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-outline-color"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-ui-4/#propdef-outline-color"}, "7066562d": {"dfnID":"7066562d","dfnText":"font-family","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-font-family"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-fonts-4/#propdef-font-family"}, "762bad34": {"dfnID":"762bad34","dfnText":"initial","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-all-initial"}],"title":"3.1.1. \nCSS-wide keywords: initial, inherit and unset"}],"url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-initial"}, "79dcf364": {"dfnID":"79dcf364","dfnText":"animation-timing-function","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-animation-timing-function"},{"id":"ref-for-propdef-animation-timing-function\u2460"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"}],"url":"https://www.w3.org/TR/css-animations-1/#propdef-animation-timing-function"}, "7c39b465": {"dfnID":"7c39b465","dfnText":"unset","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-all-unset"}],"title":"3.1.1. \nCSS-wide keywords: initial, inherit and unset"}],"url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-unset"}, "7f9469b5": {"dfnID":"7f9469b5","dfnText":"ascii case-insensitive","external":true,"refSections":[{"refs":[{"id":"ref-for-ascii-case-insensitive"}],"title":"3.1. \nPre-defined Keywords"},{"refs":[{"id":"ref-for-ascii-case-insensitive\u2460"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"},{"refs":[{"id":"ref-for-ascii-case-insensitive\u2461"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-ascii-case-insensitive\u2462"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-ascii-case-insensitive\u2463"}],"title":"6.3. \nFrequency Units: the <frequency> type and Hz, kHz units"},{"refs":[{"id":"ref-for-ascii-case-insensitive\u2464"}],"title":"8. \nFunctional Notations"}],"url":"https://infra.spec.whatwg.org/#ascii-case-insensitive"}, "8218676f": {"dfnID":"8218676f","dfnText":"background-attachment","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-background-attachment"}],"title":"2.1. \nComponent Value Types"}],"url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-background-attachment"}, "861626b1": {"dfnID":"861626b1","dfnText":"ua","external":true,"refSections":[{"refs":[{"id":"ref-for-user-agent"}],"title":"2.3. \nComponent Value Multipliers"},{"refs":[{"id":"ref-for-user-agent\u2460"}],"title":"3.4.1. \nRelative URLs"},{"refs":[{"id":"ref-for-user-agent\u2461"}],"title":"4.1. \nRange Restrictions and Range Definition Notation"},{"refs":[{"id":"ref-for-user-agent\u2462"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/css-2023/#user-agent"}, "8664e85f": {"dfnID":"8664e85f","dfnText":"text-orientation","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-text-orientation"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#propdef-text-orientation"}, "87806adf": {"dfnID":"87806adf","dfnText":"pushState(data, unused, url)","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-history-pushstate"}],"title":"3.4.1.1. \nFragment URLs"}],"url":"https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-history-pushstate"}, "87de393a": {"dfnID":"87de393a","dfnText":"<dimension-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-dimension-token"}],"title":"2.5. \nComponent Values and White Space"},{"refs":[{"id":"ref-for-typedef-dimension-token\u2460"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-typedef-dimension-token\u2461"}],"title":"8.1.2. \nType Checking"}],"url":"https://www.w3.org/TR/css-syntax-3/#typedef-dimension-token"}, "8a73a2e3": {"dfnID":"8a73a2e3","dfnText":"<percentage-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-percentage-token"}],"title":"4.5. \nPercentages: the <percentage> type"},{"refs":[{"id":"ref-for-typedef-percentage-token\u2460"}],"title":"8.1.2. \nType Checking"}],"url":"https://www.w3.org/TR/css-syntax-3/#typedef-percentage-token"}, "8ac10bc6": {"dfnID":"8ac10bc6","dfnText":"string","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-attr-string"}],"title":"\nChanges"}],"url":"https://drafts.csswg.org/css-values-5/#valdef-attr-string"}, "8c8e51b4": {"dfnID":"8c8e51b4","dfnText":"computed value","external":true,"refSections":[{"refs":[{"id":"ref-for-computed-value"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-computed-value\u2460"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-computed-value\u2461"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-computed-value\u2462"}],"title":"8.1.3. \nComputed Value"},{"refs":[{"id":"ref-for-computed-value\u2463"}],"title":"8.1.4. \nRange Checking"}],"url":"https://www.w3.org/TR/css-cascade-5/#computed-value"}, "9e462db5": {"dfnID":"9e462db5","dfnText":"continuous media","external":true,"refSections":[{"refs":[{"id":"ref-for-continuous-media"}],"title":"5.1.2. \nViewport-percentage Lengths: the vw, vh, vmin, vmax units"}],"url":"https://www.w3.org/TR/mediaqueries-5/#continuous-media"}, "Hz": {"dfnID":"Hz","dfnText":"Hz","external":false,"refSections":[{"refs":[{"id":"ref-for-Hz"},{"id":"ref-for-Hz\u2460"}],"title":"6.3. \nFrequency Units: the <frequency> type and Hz, kHz units"}],"url":"#Hz"}, "Q": {"dfnID":"Q","dfnText":"Q","external":false,"refSections":[{"refs":[{"id":"ref-for-Q"},{"id":"ref-for-Q\u2460"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-Q\u2461"}],"title":"\nChanges"}],"url":"#Q"}, "a6331414": {"dfnID":"a6331414","dfnText":"<function-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-function-token"}],"title":"8. \nFunctional Notations"}],"url":"https://www.w3.org/TR/css-syntax-3/#typedef-function-token"}, "a9efccbc": {"dfnID":"a9efccbc","dfnText":"disc","external":true,"refSections":[{"refs":[{"id":"ref-for-disc"}],"title":"2.1. \nComponent Value Types"}],"url":"https://www.w3.org/TR/css-counter-styles-3/#disc"}, "absolute-length": {"dfnID":"absolute-length","dfnText":"absolute length units","external":false,"refSections":[{"refs":[{"id":"ref-for-absolute-length"}],"title":"5. \nDistance Units: the <length> type"}],"url":"#absolute-length"}, "ac54fbff": {"dfnID":"ac54fbff","dfnText":"line-height","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-line-height"}],"title":"5. \nDistance Units: the <length> type"},{"refs":[{"id":"ref-for-propdef-line-height\u2460"}],"title":"8.1.2. \nType Checking"}],"url":"https://drafts.csswg.org/css2/#propdef-line-height"}, "add377f4": {"dfnID":"add377f4","dfnText":"overflow","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow"}],"title":"\nChanges"}],"url":"https://www.w3.org/TR/css-overflow-3/#propdef-overflow"}, "anchor-unit": {"dfnID":"anchor-unit","dfnText":"anchored","external":false,"refSections":[{"refs":[{"id":"ref-for-anchor-unit"},{"id":"ref-for-anchor-unit\u2460"},{"id":"ref-for-anchor-unit\u2461"},{"id":"ref-for-anchor-unit\u2462"},{"id":"ref-for-anchor-unit\u2463"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"}],"url":"#anchor-unit"}, "angle-value": {"dfnID":"angle-value","dfnText":"<angle>","external":false,"refSections":[{"refs":[{"id":"ref-for-angle-value"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-angle-value\u2460"}],"title":"4.1. \nRange Restrictions and Range Definition Notation"},{"refs":[{"id":"ref-for-angle-value\u2461"},{"id":"ref-for-angle-value\u2462"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-angle-value\u2463"},{"id":"ref-for-angle-value\u2464"},{"id":"ref-for-angle-value\u2465"},{"id":"ref-for-angle-value\u2466"},{"id":"ref-for-angle-value\u2467"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"},{"refs":[{"id":"ref-for-angle-value\u2468"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-angle-value\u2460\u24ea"},{"id":"ref-for-angle-value\u2460\u2460"}],"title":"8.1.2. \nType Checking"}],"url":"#angle-value"}, "b1f72e36": {"dfnID":"b1f72e36","dfnText":"coordinating list property","external":true,"refSections":[{"refs":[{"id":"ref-for-coordinating-list-property"}],"title":"2.1. \nComponent Value Types"}],"url":"https://www.w3.org/TR/css-values-4/#coordinating-list-property"}, "bearing-angle": {"dfnID":"bearing-angle","dfnText":"bearing angle","external":false,"refSections":[],"url":"#bearing-angle"}, "beb6807a": {"dfnID":"beb6807a","dfnText":"tab-size","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-tab-size"}],"title":"8.1.2. \nType Checking"}],"url":"https://www.w3.org/TR/css-text-4/#propdef-tab-size"}, "c20b5ff5": {"dfnID":"c20b5ff5","dfnText":"auto","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-width-auto"}],"title":"8.1.3. \nComputed Value"}],"url":"https://www.w3.org/TR/css-sizing-3/#valdef-width-auto"}, "c48eaa20": {"dfnID":"c48eaa20","dfnText":"box-shadow","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-box-shadow"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-box-shadow"}, "c7d3b8b7": {"dfnID":"c7d3b8b7","dfnText":"<easing-function>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-easing-function"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"}],"url":"https://www.w3.org/TR/css-easing-1/#typedef-easing-function"}, "c847111b": {"dfnID":"c847111b","dfnText":"base","external":true,"refSections":[{"refs":[{"id":"ref-for-the-base-element"}],"title":"3.4.1.1. \nFragment URLs"}],"url":"https://html.spec.whatwg.org/multipage/semantics.html#the-base-element"}, "ca502323": {"dfnID":"ca502323","dfnText":"fr","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-flex-fr"}],"title":"4. \nNumeric Data Types"}],"url":"https://www.w3.org/TR/css-grid-2/#valdef-flex-fr"}, "canonical-unit": {"dfnID":"canonical-unit","dfnText":"canonical unit","external":false,"refSections":[{"refs":[{"id":"ref-for-canonical-unit"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-canonical-unit\u2460"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-canonical-unit\u2461"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"},{"refs":[{"id":"ref-for-canonical-unit\u2462"}],"title":"6.2. \nDuration Units: the <time> type and s, ms units"},{"refs":[{"id":"ref-for-canonical-unit\u2463"}],"title":"6.3. \nFrequency Units: the <frequency> type and Hz, kHz units"},{"refs":[{"id":"ref-for-canonical-unit\u2464"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"},{"refs":[{"id":"ref-for-canonical-unit\u2465"}],"title":"\nChanges"}],"url":"#canonical-unit"}, "cdce34f5": {"dfnID":"cdce34f5","dfnText":"consume a url token","external":true,"refSections":[{"refs":[{"id":"ref-for-consume-a-url-token"}],"title":"3.4. \nResource Locators: the <url> type"}],"url":"https://www.w3.org/TR/css-syntax-3/#consume-a-url-token"}, "cec0d4db": {"dfnID":"cec0d4db","dfnText":"upright","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-text-orientation-upright"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright"}, "ch": {"dfnID":"ch","dfnText":"ch unit","external":false,"refSections":[{"refs":[{"id":"ref-for-ch"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-ch\u2460"},{"id":"ref-for-ch\u2461"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"#ch"}, "cm": {"dfnID":"cm","dfnText":"cm","external":false,"refSections":[{"refs":[{"id":"ref-for-cm"},{"id":"ref-for-cm\u2460"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-cm\u2461"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"},{"refs":[{"id":"ref-for-cm\u2462"}],"title":"8.1.2. \nType Checking"}],"url":"#cm"}, "comb-all": {"dfnID":"comb-all","dfnText":"&&","external":false,"refSections":[{"refs":[{"id":"ref-for-comb-all"},{"id":"ref-for-comb-all\u2460"}],"title":"7.3. \n2D Positioning: the <position> type"}],"url":"#comb-all"}, "comb-any": {"dfnID":"comb-any","dfnText":"||","external":false,"refSections":[],"url":"#comb-any"}, "comb-comma": {"dfnID":"comb-comma","dfnText":"Commas","external":false,"refSections":[{"refs":[{"id":"ref-for-comb-comma"},{"id":"ref-for-comb-comma\u2460"}],"title":"2.1. \nComponent Value Types"}],"url":"#comb-comma"}, "comb-one": {"dfnID":"comb-one","dfnText":"|","external":false,"refSections":[{"refs":[{"id":"ref-for-comb-one"},{"id":"ref-for-comb-one\u2460"},{"id":"ref-for-comb-one\u2461"},{"id":"ref-for-comb-one\u2462"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-comb-one\u2463"},{"id":"ref-for-comb-one\u2464"},{"id":"ref-for-comb-one\u2465"},{"id":"ref-for-comb-one\u2466"},{"id":"ref-for-comb-one\u2467"},{"id":"ref-for-comb-one\u2468"},{"id":"ref-for-comb-one\u2460\u24ea"},{"id":"ref-for-comb-one\u2460\u2460"},{"id":"ref-for-comb-one\u2460\u2461"},{"id":"ref-for-comb-one\u2460\u2462"},{"id":"ref-for-comb-one\u2460\u2463"},{"id":"ref-for-comb-one\u2460\u2464"},{"id":"ref-for-comb-one\u2460\u2465"},{"id":"ref-for-comb-one\u2460\u2466"},{"id":"ref-for-comb-one\u2460\u2467"},{"id":"ref-for-comb-one\u2460\u2468"},{"id":"ref-for-comb-one\u2461\u24ea"},{"id":"ref-for-comb-one\u2461\u2460"},{"id":"ref-for-comb-one\u2461\u2461"},{"id":"ref-for-comb-one\u2461\u2462"}],"title":"7.3. \n2D Positioning: the <position> type"},{"refs":[{"id":"ref-for-comb-one\u2461\u2463"},{"id":"ref-for-comb-one\u2461\u2464"},{"id":"ref-for-comb-one\u2461\u2465"},{"id":"ref-for-comb-one\u2461\u2466"},{"id":"ref-for-comb-one\u2461\u2467"},{"id":"ref-for-comb-one\u2461\u2468"},{"id":"ref-for-comb-one\u2462\u24ea"},{"id":"ref-for-comb-one\u2462\u2460"}],"title":"8.1.1. \nSyntax"}],"url":"#comb-one"}, "compatible-units": {"dfnID":"compatible-units","dfnText":"compatible units","external":false,"refSections":[{"refs":[{"id":"ref-for-compatible-units"},{"id":"ref-for-compatible-units\u2460"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-compatible-units\u2461"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-compatible-units\u2462"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-compatible-units\u2463"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"},{"refs":[{"id":"ref-for-compatible-units\u2464"}],"title":"6.2. \nDuration Units: the <time> type and s, ms units"},{"refs":[{"id":"ref-for-compatible-units\u2465"}],"title":"6.3. \nFrequency Units: the <frequency> type and Hz, kHz units"},{"refs":[{"id":"ref-for-compatible-units\u2466"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"},{"refs":[{"id":"ref-for-compatible-units\u2467"}],"title":"\nChanges"}],"url":"#compatible-units"}, "css-bracketed-range-notation": {"dfnID":"css-bracketed-range-notation","dfnText":"CSS bracketed range notation","external":false,"refSections":[{"refs":[{"id":"ref-for-css-bracketed-range-notation"},{"id":"ref-for-css-bracketed-range-notation\u2460"}],"title":"4.1. \nRange Restrictions and Range Definition Notation"},{"refs":[{"id":"ref-for-css-bracketed-range-notation\u2461"}],"title":"\nChanges"}],"url":"#css-bracketed-range-notation"}, "css-css-identifier": {"dfnID":"css-css-identifier","dfnText":"identifiers","external":false,"refSections":[{"refs":[{"id":"ref-for-css-css-identifier"}],"title":"3. \nTextual Data Types"},{"refs":[{"id":"ref-for-css-css-identifier\u2460"}],"title":"3.1. \nPre-defined Keywords"},{"refs":[{"id":"ref-for-css-css-identifier\u2461"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"},{"refs":[{"id":"ref-for-css-css-identifier\u2462"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-css-css-identifier\u2463"}],"title":"\nChanges"}],"url":"#css-css-identifier"}, "css-keyword": {"dfnID":"css-keyword","dfnText":"keywords","external":false,"refSections":[],"url":"#css-keyword"}, "css-textual-data-types": {"dfnID":"css-textual-data-types","dfnText":"textual data types","external":false,"refSections":[],"url":"#css-textual-data-types"}, "css-value-definition-syntax": {"dfnID":"css-value-definition-syntax","dfnText":"value definition syntax","external":false,"refSections":[{"refs":[{"id":"ref-for-css-value-definition-syntax"},{"id":"ref-for-css-value-definition-syntax\u2460"}],"title":"\nChanges"}],"url":"#css-value-definition-syntax"}, "css-wide-keywords": {"dfnID":"css-wide-keywords","dfnText":"CSS-wide keywords","external":false,"refSections":[{"refs":[{"id":"ref-for-css-wide-keywords"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"},{"refs":[{"id":"ref-for-css-wide-keywords\u2460"},{"id":"ref-for-css-wide-keywords\u2461"}],"title":"\nChanges"}],"url":"#css-wide-keywords"}, "d04b6986": {"dfnID":"d04b6986","dfnText":"<color>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-color"},{"id":"ref-for-typedef-color\u2460"},{"id":"ref-for-typedef-color\u2461"}],"title":"7.1. \nColors: the <color> type"}],"url":"https://www.w3.org/TR/css-color-5/#typedef-color"}, "d0dc95c3": {"dfnID":"d0dc95c3","dfnText":"inherit","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-all-inherit"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-valdef-all-inherit\u2460"}],"title":"3.1.1. \nCSS-wide keywords: initial, inherit and unset"}],"url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit"}, "d10808c7": {"dfnID":"d10808c7","dfnText":"url","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-attr-url"}],"title":"\nChanges"}],"url":"https://drafts.csswg.org/css-values-5/#valdef-attr-url"}, "d5e08d9c": {"dfnID":"d5e08d9c","dfnText":"specified value","external":true,"refSections":[{"refs":[{"id":"ref-for-specified-value"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-specified-value\u2460"}],"title":"8.1.4. \nRange Checking"}],"url":"https://www.w3.org/TR/css-cascade-5/#specified-value"}, "db6870d5": {"dfnID":"db6870d5","dfnText":"background","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-background"}],"title":"2.1. \nComponent Value Types"}],"url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-background"}, "dcb1125e": {"dfnID":"dcb1125e","dfnText":"linear-gradient()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-linear-gradient"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"}],"url":"https://www.w3.org/TR/css-images-4/#funcdef-linear-gradient"}, "deg": {"dfnID":"deg","dfnText":"deg","external":false,"refSections":[{"refs":[{"id":"ref-for-deg"},{"id":"ref-for-deg\u2460"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"},{"refs":[{"id":"ref-for-deg\u2461"}],"title":"8.1.2. \nType Checking"}],"url":"#deg"}, "device-pixel": {"dfnID":"device-pixel","dfnText":"device pixel","external":false,"refSections":[{"refs":[{"id":"ref-for-device-pixel"},{"id":"ref-for-device-pixel\u2460"},{"id":"ref-for-device-pixel\u2461"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-device-pixel\u2462"}],"title":"\nChanges"}],"url":"#device-pixel"}, "dfd67b05": {"dfnID":"dfd67b05","dfnText":"*","external":true,"refSections":[{"refs":[{"id":"ref-for-x"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-x\u2460"}],"title":"8.1.1. \nSyntax"},{"refs":[{"id":"ref-for-x\u2461"}],"title":"8.1.2. \nType Checking"}],"url":"https://www.w3.org/TR/selectors-3/#x"}, "dimension": {"dfnID":"dimension","dfnText":"dimension","external":false,"refSections":[{"refs":[{"id":"ref-for-dimension"},{"id":"ref-for-dimension\u2460"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-dimension\u2461"},{"id":"ref-for-dimension\u2462"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-dimension\u2463"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-dimension\u2464"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-dimension\u2465"}],"title":"5. \nDistance Units: the <length> type"},{"refs":[{"id":"ref-for-dimension\u2466"}],"title":"6.2. \nDuration Units: the <time> type and s, ms units"},{"refs":[{"id":"ref-for-dimension\u2467"}],"title":"6.3. \nFrequency Units: the <frequency> type and Hz, kHz units"},{"refs":[{"id":"ref-for-dimension\u2468"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"}],"url":"#dimension"}, "dpcm": {"dfnID":"dpcm","dfnText":"dpcm","external":false,"refSections":[{"refs":[{"id":"ref-for-dpcm"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"}],"url":"#dpcm"}, "dpi": {"dfnID":"dpi","dfnText":"dpi","external":false,"refSections":[{"refs":[{"id":"ref-for-dpi"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"}],"url":"#dpi"}, "dppx": {"dfnID":"dppx","dfnText":"dppx","external":false,"refSections":[{"refs":[{"id":"ref-for-dppx"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"}],"url":"#dppx"}, "ee88ce59": {"dfnID":"ee88ce59","dfnText":"vertical-rl","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-writing-mode-vertical-rl"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-rl"}, "eebbfe3d": {"dfnID":"eebbfe3d","dfnText":"<number-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-number-token"}],"title":"4.2. \nIntegers: the <integer> type"},{"refs":[{"id":"ref-for-typedef-number-token\u2460"}],"title":"4.3. \nReal Numbers: the <number> type"},{"refs":[{"id":"ref-for-typedef-number-token\u2461"},{"id":"ref-for-typedef-number-token\u2462"}],"title":"8.1.2. \nType Checking"}],"url":"https://www.w3.org/TR/css-syntax-3/#typedef-number-token"}, "em": {"dfnID":"em","dfnText":"em","external":false,"refSections":[{"refs":[{"id":"ref-for-em"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-em\u2460"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-em\u2461"},{"id":"ref-for-em\u2462"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"#em"}, "ex": {"dfnID":"ex","dfnText":"ex unit","external":false,"refSections":[{"refs":[{"id":"ref-for-ex"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-ex\u2460"},{"id":"ref-for-ex\u2461"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"},{"refs":[{"id":"ref-for-ex\u2462"}],"title":"\nChanges"}],"url":"#ex"}, "f2249e38": {"dfnID":"f2249e38","dfnText":"background-position","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-background-position"},{"id":"ref-for-propdef-background-position\u2460"}],"title":"7.3. \n2D Positioning: the <position> type"},{"refs":[{"id":"ref-for-propdef-background-position\u2461"},{"id":"ref-for-propdef-background-position\u2462"}],"title":"8.1.3. \nComputed Value"},{"refs":[{"id":"ref-for-propdef-background-position\u2463"}],"title":"\nChanges"}],"url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position"}, "f3226176": {"dfnID":"f3226176","dfnText":"rgba()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-rgba"}],"title":"8. \nFunctional Notations"}],"url":"https://www.w3.org/TR/css-color-4/#funcdef-rgba"}, "f72f0a02": {"dfnID":"f72f0a02","dfnText":"padding-top","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-padding-top"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://www.w3.org/TR/css-box-4/#propdef-padding-top"}, "font-relative-length": {"dfnID":"font-relative-length","dfnText":"font-relative lengths","external":false,"refSections":[{"refs":[{"id":"ref-for-font-relative-length"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"},{"refs":[{"id":"ref-for-font-relative-length\u2460"}],"title":"8.1.3. \nComputed Value"},{"refs":[{"id":"ref-for-font-relative-length\u2461"}],"title":"\nChanges"},{"refs":[{"id":"ref-for-font-relative-length\u2462"}],"title":"\nPrivacy Considerations"}],"url":"#font-relative-length"}, "frequency-value": {"dfnID":"frequency-value","dfnText":"<frequency>","external":false,"refSections":[{"refs":[{"id":"ref-for-frequency-value"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-frequency-value\u2460"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-frequency-value\u2461"},{"id":"ref-for-frequency-value\u2462"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-frequency-value\u2463"},{"id":"ref-for-frequency-value\u2464"}],"title":"6.3. \nFrequency Units: the <frequency> type and Hz, kHz units"},{"refs":[{"id":"ref-for-frequency-value\u2465"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-frequency-value\u2466"}],"title":"8.1.2. \nType Checking"}],"url":"#frequency-value"}, "funcdef-calc": {"dfnID":"funcdef-calc","dfnText":"calc()","external":false,"refSections":[{"refs":[{"id":"ref-for-funcdef-calc"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-funcdef-calc\u2460"},{"id":"ref-for-funcdef-calc\u2461"},{"id":"ref-for-funcdef-calc\u2462"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-funcdef-calc\u2463"},{"id":"ref-for-funcdef-calc\u2464"},{"id":"ref-for-funcdef-calc\u2465"},{"id":"ref-for-funcdef-calc\u2466"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-funcdef-calc\u2467"},{"id":"ref-for-funcdef-calc\u2468"},{"id":"ref-for-funcdef-calc\u2460\u24ea"},{"id":"ref-for-funcdef-calc\u2460\u2460"}],"title":"8.1.1. \nSyntax"},{"refs":[{"id":"ref-for-funcdef-calc\u2460\u2461"},{"id":"ref-for-funcdef-calc\u2460\u2462"},{"id":"ref-for-funcdef-calc\u2460\u2463"},{"id":"ref-for-funcdef-calc\u2460\u2464"},{"id":"ref-for-funcdef-calc\u2460\u2465"},{"id":"ref-for-funcdef-calc\u2460\u2466"}],"title":"8.1.2. \nType Checking"},{"refs":[{"id":"ref-for-funcdef-calc\u2460\u2467"},{"id":"ref-for-funcdef-calc\u2460\u2468"},{"id":"ref-for-funcdef-calc\u2461\u24ea"},{"id":"ref-for-funcdef-calc\u2461\u2460"}],"title":"8.1.3. \nComputed Value"},{"refs":[{"id":"ref-for-funcdef-calc\u2461\u2461"},{"id":"ref-for-funcdef-calc\u2461\u2462"},{"id":"ref-for-funcdef-calc\u2461\u2463"}],"title":"8.1.4. \nRange Checking"},{"refs":[{"id":"ref-for-funcdef-calc\u2461\u2464"}],"title":"8.1.5. \nSerialization"},{"refs":[{"id":"ref-for-funcdef-calc\u2461\u2465"},{"id":"ref-for-funcdef-calc\u2461\u2466"},{"id":"ref-for-funcdef-calc\u2461\u2467"},{"id":"ref-for-funcdef-calc\u2461\u2468"},{"id":"ref-for-funcdef-calc\u2462\u24ea"}],"title":"\nChanges"}],"url":"#funcdef-calc"}, "funcdef-url": {"dfnID":"funcdef-url","dfnText":"url()","external":false,"refSections":[{"refs":[{"id":"ref-for-funcdef-url"},{"id":"ref-for-funcdef-url\u2460"},{"id":"ref-for-funcdef-url\u2461"},{"id":"ref-for-funcdef-url\u2462"}],"title":"3.4. \nResource Locators: the <url> type"},{"refs":[{"id":"ref-for-funcdef-url\u2463"},{"id":"ref-for-funcdef-url\u2464"},{"id":"ref-for-funcdef-url\u2465"},{"id":"ref-for-funcdef-url\u2466"}],"title":"3.4.1.1. \nFragment URLs"},{"refs":[{"id":"ref-for-funcdef-url\u2467"},{"id":"ref-for-funcdef-url\u2468"},{"id":"ref-for-funcdef-url\u2460\u24ea"}],"title":"3.4.2. \nEmpty URLs"},{"refs":[{"id":"ref-for-funcdef-url\u2460\u2460"},{"id":"ref-for-funcdef-url\u2460\u2461"}],"title":"3.4.3. \nURL Modifiers"},{"refs":[{"id":"ref-for-funcdef-url\u2460\u2462"},{"id":"ref-for-funcdef-url\u2460\u2463"},{"id":"ref-for-funcdef-url\u2460\u2464"},{"id":"ref-for-funcdef-url\u2460\u2465"}],"title":"\nChanges"},{"refs":[{"id":"ref-for-funcdef-url\u2460\u2466"}],"title":"\nSecurity Considerations"},{"refs":[{"id":"ref-for-funcdef-url\u2460\u2467"}],"title":"\nPrivacy Considerations"}],"url":"#funcdef-url"}, "functional-notation": {"dfnID":"functional-notation","dfnText":"functional notation","external":false,"refSections":[{"refs":[{"id":"ref-for-functional-notation"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-functional-notation\u2460"}],"title":"3.4. \nResource Locators: the <url> type"},{"refs":[{"id":"ref-for-functional-notation\u2461"}],"title":"3.4.3. \nURL Modifiers"},{"refs":[{"id":"ref-for-functional-notation\u2462"}],"title":"8. \nFunctional Notations"}],"url":"#functional-notation"}, "grad": {"dfnID":"grad","dfnText":"grad","external":false,"refSections":[{"refs":[{"id":"ref-for-grad"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"}],"url":"#grad"}, "identifier-value": {"dfnID":"identifier-value","dfnText":"<custom-ident>","external":false,"refSections":[{"refs":[{"id":"ref-for-identifier-value"},{"id":"ref-for-identifier-value\u2460"},{"id":"ref-for-identifier-value\u2461"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-identifier-value\u2462"}],"title":"3. \nTextual Data Types"},{"refs":[{"id":"ref-for-identifier-value\u2463"},{"id":"ref-for-identifier-value\u2464"},{"id":"ref-for-identifier-value\u2465"},{"id":"ref-for-identifier-value\u2466"},{"id":"ref-for-identifier-value\u2467"},{"id":"ref-for-identifier-value\u2468"},{"id":"ref-for-identifier-value\u2460\u24ea"},{"id":"ref-for-identifier-value\u2460\u2460"},{"id":"ref-for-identifier-value\u2460\u2461"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"},{"refs":[{"id":"ref-for-identifier-value\u2460\u2462"},{"id":"ref-for-identifier-value\u2460\u2463"}],"title":"\nChanges"}],"url":"#identifier-value"}, "in": {"dfnID":"in","dfnText":"in","external":false,"refSections":[{"refs":[{"id":"ref-for-in"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-in\u2460"},{"id":"ref-for-in\u2461"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-in\u2462"},{"id":"ref-for-in\u2463"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"}],"url":"#in"}, "integer": {"dfnID":"integer","dfnText":"integer","external":false,"refSections":[{"refs":[{"id":"ref-for-integer"}],"title":"4.3. \nReal Numbers: the <number> type"}],"url":"#integer"}, "integer-value": {"dfnID":"integer-value","dfnText":"<integer>","external":false,"refSections":[{"refs":[{"id":"ref-for-integer-value"},{"id":"ref-for-integer-value\u2460"},{"id":"ref-for-integer-value\u2461"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-integer-value\u2462"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-integer-value\u2463"}],"title":"4.1. \nRange Restrictions and Range Definition Notation"},{"refs":[{"id":"ref-for-integer-value\u2464"}],"title":"4.2. \nIntegers: the <integer> type"},{"refs":[{"id":"ref-for-integer-value\u2465"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-integer-value\u2466"},{"id":"ref-for-integer-value\u2467"},{"id":"ref-for-integer-value\u2468"},{"id":"ref-for-integer-value\u2460\u24ea"},{"id":"ref-for-integer-value\u2460\u2460"},{"id":"ref-for-integer-value\u2460\u2461"},{"id":"ref-for-integer-value\u2460\u2462"},{"id":"ref-for-integer-value\u2460\u2463"}],"title":"8.1.2. \nType Checking"}],"url":"#integer-value"}, "kHz": {"dfnID":"kHz","dfnText":"kHz","external":false,"refSections":[{"refs":[{"id":"ref-for-kHz"}],"title":"6.3. \nFrequency Units: the <frequency> type and Hz, kHz units"}],"url":"#kHz"}, "length-advance-measure": {"dfnID":"length-advance-measure","dfnText":"advance measure","external":false,"refSections":[{"refs":[{"id":"ref-for-length-advance-measure"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-length-advance-measure\u2460"},{"id":"ref-for-length-advance-measure\u2461"},{"id":"ref-for-length-advance-measure\u2462"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"}],"url":"#length-advance-measure"}, "length-value": {"dfnID":"length-value","dfnText":"<length>","external":false,"refSections":[{"refs":[{"id":"ref-for-length-value"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-length-value\u2460"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-length-value\u2461"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-length-value\u2462"}],"title":"4.1. \nRange Restrictions and Range Definition Notation"},{"refs":[{"id":"ref-for-length-value\u2463"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-length-value\u2464"},{"id":"ref-for-length-value\u2465"},{"id":"ref-for-length-value\u2466"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-length-value\u2467"},{"id":"ref-for-length-value\u2468"}],"title":"5. \nDistance Units: the <length> type"},{"refs":[{"id":"ref-for-length-value\u2460\u24ea"},{"id":"ref-for-length-value\u2460\u2460"}],"title":"7.3. \n2D Positioning: the <position> type"},{"refs":[{"id":"ref-for-length-value\u2460\u2461"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-length-value\u2460\u2462"},{"id":"ref-for-length-value\u2460\u2463"},{"id":"ref-for-length-value\u2460\u2464"},{"id":"ref-for-length-value\u2460\u2465"},{"id":"ref-for-length-value\u2460\u2466"}],"title":"8.1.2. \nType Checking"},{"refs":[{"id":"ref-for-length-value\u2460\u2467"},{"id":"ref-for-length-value\u2460\u2468"}],"title":"\nChanges"}],"url":"#length-value"}, "mm": {"dfnID":"mm","dfnText":"mm","external":false,"refSections":[{"refs":[{"id":"ref-for-mm"},{"id":"ref-for-mm\u2460"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"}],"url":"#mm"}, "ms": {"dfnID":"ms","dfnText":"ms","external":false,"refSections":[{"refs":[{"id":"ref-for-ms"}],"title":"6.2. \nDuration Units: the <time> type and s, ms units"}],"url":"#ms"}, "mult-comma": {"dfnID":"mult-comma","dfnText":"#","external":false,"refSections":[{"refs":[{"id":"ref-for-mult-comma"},{"id":"ref-for-mult-comma\u2460"}],"title":"2.1. \nComponent Value Types"}],"url":"#mult-comma"}, "mult-num": {"dfnID":"mult-num","dfnText":"{A}","external":false,"refSections":[],"url":"#mult-num"}, "mult-num-range": {"dfnID":"mult-num-range","dfnText":"{A,B}","external":false,"refSections":[],"url":"#mult-num-range"}, "mult-one-plus": {"dfnID":"mult-one-plus","dfnText":"+","external":false,"refSections":[],"url":"#mult-one-plus"}, "mult-opt": {"dfnID":"mult-opt","dfnText":"?","external":false,"refSections":[{"refs":[{"id":"ref-for-mult-opt"},{"id":"ref-for-mult-opt\u2460"},{"id":"ref-for-mult-opt\u2461"}],"title":"2.1. \nComponent Value Types"}],"url":"#mult-opt"}, "mult-req": {"dfnID":"mult-req","dfnText":"!","external":false,"refSections":[],"url":"#mult-req"}, "mult-zero-plus": {"dfnID":"mult-zero-plus","dfnText":"*","external":false,"refSections":[{"refs":[{"id":"ref-for-mult-zero-plus"}],"title":"3.4. \nResource Locators: the <url> type"},{"refs":[{"id":"ref-for-mult-zero-plus\u2460"},{"id":"ref-for-mult-zero-plus\u2461"},{"id":"ref-for-mult-zero-plus\u2462"},{"id":"ref-for-mult-zero-plus\u2463"}],"title":"8.1.1. \nSyntax"}],"url":"#mult-zero-plus"}, "number": {"dfnID":"number","dfnText":"number","external":false,"refSections":[{"refs":[{"id":"ref-for-number"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-number\u2460"}],"title":"4.5. \nPercentages: the <percentage> type"},{"refs":[{"id":"ref-for-number\u2461"}],"title":"\nChanges"}],"url":"#number"}, "number-value": {"dfnID":"number-value","dfnText":"<number>","external":false,"refSections":[{"refs":[{"id":"ref-for-number-value"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-number-value\u2460"}],"title":"4.3. \nReal Numbers: the <number> type"},{"refs":[{"id":"ref-for-number-value\u2461"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-number-value\u2462"},{"id":"ref-for-number-value\u2463"},{"id":"ref-for-number-value\u2464"}],"title":"5. \nDistance Units: the <length> type"},{"refs":[{"id":"ref-for-number-value\u2465"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-number-value\u2466"},{"id":"ref-for-number-value\u2467"}],"title":"8.1.1. \nSyntax"},{"refs":[{"id":"ref-for-number-value\u2468"},{"id":"ref-for-number-value\u2460\u24ea"},{"id":"ref-for-number-value\u2460\u2460"},{"id":"ref-for-number-value\u2460\u2461"},{"id":"ref-for-number-value\u2460\u2462"},{"id":"ref-for-number-value\u2460\u2463"},{"id":"ref-for-number-value\u2460\u2464"},{"id":"ref-for-number-value\u2460\u2465"},{"id":"ref-for-number-value\u2460\u2466"},{"id":"ref-for-number-value\u2460\u2467"},{"id":"ref-for-number-value\u2460\u2468"},{"id":"ref-for-number-value\u2461\u24ea"},{"id":"ref-for-number-value\u2461\u2460"},{"id":"ref-for-number-value\u2461\u2461"}],"title":"8.1.2. \nType Checking"},{"refs":[{"id":"ref-for-number-value\u2461\u2462"},{"id":"ref-for-number-value\u2461\u2463"},{"id":"ref-for-number-value\u2461\u2464"}],"title":"\nChanges"}],"url":"#number-value"}, "numeric-data-types": {"dfnID":"numeric-data-types","dfnText":"numeric data types","external":false,"refSections":[{"refs":[{"id":"ref-for-numeric-data-types"}],"title":"2.1. \nComponent Value Types"}],"url":"#numeric-data-types"}, "pc": {"dfnID":"pc","dfnText":"pc","external":false,"refSections":[{"refs":[{"id":"ref-for-pc"},{"id":"ref-for-pc\u2460"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"}],"url":"#pc"}, "percentage": {"dfnID":"percentage","dfnText":"percentage","external":false,"refSections":[],"url":"#percentage"}, "percentage-value": {"dfnID":"percentage-value","dfnText":"<percentage>","external":false,"refSections":[{"refs":[{"id":"ref-for-percentage-value"}],"title":"2.1. \nComponent Value Types"},{"refs":[{"id":"ref-for-percentage-value\u2460"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-percentage-value\u2461"}],"title":"4.5. \nPercentages: the <percentage> type"},{"refs":[{"id":"ref-for-percentage-value\u2462"},{"id":"ref-for-percentage-value\u2463"},{"id":"ref-for-percentage-value\u2464"},{"id":"ref-for-percentage-value\u2465"},{"id":"ref-for-percentage-value\u2466"},{"id":"ref-for-percentage-value\u2467"},{"id":"ref-for-percentage-value\u2468"},{"id":"ref-for-percentage-value\u2460\u24ea"},{"id":"ref-for-percentage-value\u2460\u2460"},{"id":"ref-for-percentage-value\u2460\u2461"},{"id":"ref-for-percentage-value\u2460\u2462"},{"id":"ref-for-percentage-value\u2460\u2463"},{"id":"ref-for-percentage-value\u2460\u2464"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-percentage-value\u2460\u2465"}],"title":"7.3. \n2D Positioning: the <position> type"},{"refs":[{"id":"ref-for-percentage-value\u2460\u2466"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-percentage-value\u2460\u2467"}],"title":"8.1.1. \nSyntax"},{"refs":[{"id":"ref-for-percentage-value\u2460\u2468"},{"id":"ref-for-percentage-value\u2461\u24ea"},{"id":"ref-for-percentage-value\u2461\u2460"},{"id":"ref-for-percentage-value\u2461\u2461"}],"title":"8.1.2. \nType Checking"},{"refs":[{"id":"ref-for-percentage-value\u2461\u2462"},{"id":"ref-for-percentage-value\u2461\u2463"}],"title":"\nChanges"}],"url":"#percentage-value"}, "physical-unit": {"dfnID":"physical-unit","dfnText":"physical units","external":false,"refSections":[{"refs":[{"id":"ref-for-physical-unit"},{"id":"ref-for-physical-unit\u2460"},{"id":"ref-for-physical-unit\u2461"},{"id":"ref-for-physical-unit\u2462"},{"id":"ref-for-physical-unit\u2463"},{"id":"ref-for-physical-unit\u2464"},{"id":"ref-for-physical-unit\u2465"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"}],"url":"#physical-unit"}, "pt": {"dfnID":"pt","dfnText":"pt","external":false,"refSections":[{"refs":[{"id":"ref-for-pt"},{"id":"ref-for-pt\u2460"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"}],"url":"#pt"}, "px": {"dfnID":"px","dfnText":"px","external":false,"refSections":[{"refs":[{"id":"ref-for-px"},{"id":"ref-for-px\u2460"}],"title":"4.4.1. \nCompatible Units"},{"refs":[{"id":"ref-for-px\u2461"},{"id":"ref-for-px\u2462"},{"id":"ref-for-px\u2463"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"},{"refs":[{"id":"ref-for-px\u2464"},{"id":"ref-for-px\u2465"},{"id":"ref-for-px\u2466"},{"id":"ref-for-px\u2467"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"}],"url":"#px"}, "rad": {"dfnID":"rad","dfnText":"rad","external":false,"refSections":[{"refs":[{"id":"ref-for-rad"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"}],"url":"#rad"}, "reference-pixel": {"dfnID":"reference-pixel","dfnText":"reference pixel","external":false,"refSections":[{"refs":[{"id":"ref-for-reference-pixel"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"}],"url":"#reference-pixel"}, "relative-length": {"dfnID":"relative-length","dfnText":"Relative length units","external":false,"refSections":[{"refs":[{"id":"ref-for-relative-length"}],"title":"5. \nDistance Units: the <length> type"}],"url":"#relative-length"}, "rem": {"dfnID":"rem","dfnText":"rem","external":false,"refSections":[{"refs":[{"id":"ref-for-rem"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-rem\u2460"},{"id":"ref-for-rem\u2461"}],"title":"5.1.1. \nFont-relative Lengths: the em, ex, ch, rem units"},{"refs":[{"id":"ref-for-rem\u2462"}],"title":"8.1. \nMathematical Expressions: calc()"}],"url":"#rem"}, "resolution-value": {"dfnID":"resolution-value","dfnText":"<resolution>","external":false,"refSections":[{"refs":[{"id":"ref-for-resolution-value"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-resolution-value\u2460"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-resolution-value\u2461"},{"id":"ref-for-resolution-value\u2462"},{"id":"ref-for-resolution-value\u2463"},{"id":"ref-for-resolution-value\u2464"}],"title":"6.4. \nResolution Units: the <resolution> type and dpi, dpcm, dppx units"},{"refs":[{"id":"ref-for-resolution-value\u2465"}],"title":"\nChanges"}],"url":"#resolution-value"}, "resolved-type": {"dfnID":"resolved-type","dfnText":"resolved type","external":false,"refSections":[{"refs":[{"id":"ref-for-resolved-type"},{"id":"ref-for-resolved-type\u2460"}],"title":"8.1.2. \nType Checking"}],"url":"#resolved-type"}, "s": {"dfnID":"s","dfnText":"s","external":false,"refSections":[{"refs":[{"id":"ref-for-s"},{"id":"ref-for-s\u2460"}],"title":"6.2. \nDuration Units: the <time> type and s, ms units"}],"url":"#s"}, "string-value": {"dfnID":"string-value","dfnText":"<string>","external":false,"refSections":[{"refs":[{"id":"ref-for-string-value"}],"title":"3. \nTextual Data Types"},{"refs":[{"id":"ref-for-string-value\u2460"}],"title":"3.3. \nQuoted Strings: the <string> type"},{"refs":[{"id":"ref-for-string-value\u2461"},{"id":"ref-for-string-value\u2462"},{"id":"ref-for-string-value\u2463"}],"title":"3.4. \nResource Locators: the <url> type"},{"refs":[{"id":"ref-for-string-value\u2464"}],"title":"\nChanges"}],"url":"#string-value"}, "time-value": {"dfnID":"time-value","dfnText":"<time>","external":false,"refSections":[{"refs":[{"id":"ref-for-time-value"}],"title":"4. \nNumeric Data Types"},{"refs":[{"id":"ref-for-time-value\u2460"}],"title":"4.1. \nRange Restrictions and Range Definition Notation"},{"refs":[{"id":"ref-for-time-value\u2461"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-time-value\u2462"},{"id":"ref-for-time-value\u2463"}],"title":"4.6. \nMixing Percentages and Dimensions"},{"refs":[{"id":"ref-for-time-value\u2464"},{"id":"ref-for-time-value\u2465"}],"title":"6.2. \nDuration Units: the <time> type and s, ms units"},{"refs":[{"id":"ref-for-time-value\u2466"}],"title":"8.1. \nMathematical Expressions: calc()"},{"refs":[{"id":"ref-for-time-value\u2467"}],"title":"8.1.2. \nType Checking"}],"url":"#time-value"}, "turn": {"dfnID":"turn","dfnText":"turn","external":false,"refSections":[{"refs":[{"id":"ref-for-turn"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"}],"url":"#turn"}, "typedef-angle-percentage": {"dfnID":"typedef-angle-percentage","dfnText":"<angle-percentage>","external":false,"refSections":[],"url":"#typedef-angle-percentage"}, "typedef-calc-number-product": {"dfnID":"typedef-calc-number-product","dfnText":"<calc-number-product>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-calc-number-product"},{"id":"ref-for-typedef-calc-number-product\u2460"}],"title":"8.1.1. \nSyntax"}],"url":"#typedef-calc-number-product"}, "typedef-calc-number-sum": {"dfnID":"typedef-calc-number-sum","dfnText":"<calc-number-sum>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-calc-number-sum"}],"title":"8.1.1. \nSyntax"}],"url":"#typedef-calc-number-sum"}, "typedef-calc-number-value": {"dfnID":"typedef-calc-number-value","dfnText":"<calc-number-value>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-calc-number-value"},{"id":"ref-for-typedef-calc-number-value\u2460"},{"id":"ref-for-typedef-calc-number-value\u2461"},{"id":"ref-for-typedef-calc-number-value\u2462"}],"title":"8.1.1. \nSyntax"}],"url":"#typedef-calc-number-value"}, "typedef-calc-product": {"dfnID":"typedef-calc-product","dfnText":"<calc-product>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-calc-product"},{"id":"ref-for-typedef-calc-product\u2460"}],"title":"8.1.1. \nSyntax"}],"url":"#typedef-calc-product"}, "typedef-calc-sum": {"dfnID":"typedef-calc-sum","dfnText":"<calc-sum>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-calc-sum"},{"id":"ref-for-typedef-calc-sum\u2460"}],"title":"8.1.1. \nSyntax"}],"url":"#typedef-calc-sum"}, "typedef-calc-value": {"dfnID":"typedef-calc-value","dfnText":"<calc-value>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-calc-value"},{"id":"ref-for-typedef-calc-value\u2460"}],"title":"8.1.1. \nSyntax"}],"url":"#typedef-calc-value"}, "typedef-dimension": {"dfnID":"typedef-dimension","dfnText":"<dimension>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-dimension"}],"title":"4.4. \nNumbers with Units: dimension values"},{"refs":[{"id":"ref-for-typedef-dimension\u2460"}],"title":"6.1. \nAngle Units: the <angle> type and deg, grad, rad, turn units"},{"refs":[{"id":"ref-for-typedef-dimension\u2461"}],"title":"8.1.1. \nSyntax"},{"refs":[{"id":"ref-for-typedef-dimension\u2462"}],"title":"8.1.2. \nType Checking"}],"url":"#typedef-dimension"}, "typedef-frequency-percentage": {"dfnID":"typedef-frequency-percentage","dfnText":"<frequency-percentage>","external":false,"refSections":[],"url":"#typedef-frequency-percentage"}, "typedef-ident": {"dfnID":"typedef-ident","dfnText":"<ident>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-ident"}],"title":"3. \nTextual Data Types"},{"refs":[{"id":"ref-for-typedef-ident\u2460"}],"title":"3.4.3. \nURL Modifiers"},{"refs":[{"id":"ref-for-typedef-ident\u2461"}],"title":"\nChanges"}],"url":"#typedef-ident"}, "typedef-length-percentage": {"dfnID":"typedef-length-percentage","dfnText":"<length-percentage>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-length-percentage"},{"id":"ref-for-typedef-length-percentage\u2460"},{"id":"ref-for-typedef-length-percentage\u2461"},{"id":"ref-for-typedef-length-percentage\u2462"},{"id":"ref-for-typedef-length-percentage\u2463"}],"title":"7.3. \n2D Positioning: the <position> type"},{"refs":[{"id":"ref-for-typedef-length-percentage\u2464"}],"title":"\nChanges"}],"url":"#typedef-length-percentage"}, "typedef-position": {"dfnID":"typedef-position","dfnText":"<position>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-position"},{"id":"ref-for-typedef-position\u2460"},{"id":"ref-for-typedef-position\u2461"},{"id":"ref-for-typedef-position\u2462"},{"id":"ref-for-typedef-position\u2463"},{"id":"ref-for-typedef-position\u2464"}],"title":"7.3. \n2D Positioning: the <position> type"},{"refs":[{"id":"ref-for-typedef-position\u2465"},{"id":"ref-for-typedef-position\u2466"}],"title":"\nChanges"}],"url":"#typedef-position"}, "typedef-time-percentage": {"dfnID":"typedef-time-percentage","dfnText":"<time-percentage>","external":false,"refSections":[],"url":"#typedef-time-percentage"}, "typedef-url-modifier": {"dfnID":"typedef-url-modifier","dfnText":"<url-modifier>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-url-modifier"},{"id":"ref-for-typedef-url-modifier\u2460"}],"title":"3.4. \nResource Locators: the <url> type"},{"refs":[{"id":"ref-for-typedef-url-modifier\u2461"},{"id":"ref-for-typedef-url-modifier\u2462"},{"id":"ref-for-typedef-url-modifier\u2463"}],"title":"3.4.3. \nURL Modifiers"}],"url":"#typedef-url-modifier"}, "url": {"dfnID":"url","dfnText":"URL","external":false,"refSections":[],"url":"#url"}, "url-local-url-flag": {"dfnID":"url-local-url-flag","dfnText":"local url flag","external":false,"refSections":[{"refs":[{"id":"ref-for-url-local-url-flag"},{"id":"ref-for-url-local-url-flag\u2460"}],"title":"3.4.1.1. \nFragment URLs"}],"url":"#url-local-url-flag"}, "url-value": {"dfnID":"url-value","dfnText":"<url>","external":false,"refSections":[{"refs":[{"id":"ref-for-url-value"}],"title":"3. \nTextual Data Types"},{"refs":[{"id":"ref-for-url-value\u2460"},{"id":"ref-for-url-value\u2461"},{"id":"ref-for-url-value\u2462"},{"id":"ref-for-url-value\u2463"}],"title":"3.4. \nResource Locators: the <url> type"},{"refs":[{"id":"ref-for-url-value\u2464"}],"title":"3.4.1. \nRelative URLs"},{"refs":[{"id":"ref-for-url-value\u2465"}],"title":"3.4.2. \nEmpty URLs"},{"refs":[{"id":"ref-for-url-value\u2466"}],"title":"3.4.3. \nURL Modifiers"},{"refs":[{"id":"ref-for-url-value\u2467"}],"title":"7.2. \nImages: the <image> type"},{"refs":[{"id":"ref-for-url-value\u2468"}],"title":"\nChanges"},{"refs":[{"id":"ref-for-url-value\u2460\u24ea"}],"title":"\nSecurity Considerations"},{"refs":[{"id":"ref-for-url-value\u2460\u2460"}],"title":"\nPrivacy Considerations"}],"url":"#url-value"}, "vh": {"dfnID":"vh","dfnText":"vh unit","external":false,"refSections":[{"refs":[{"id":"ref-for-vh"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-vh\u2460"},{"id":"ref-for-vh\u2461"},{"id":"ref-for-vh\u2462"}],"title":"5.1.2. \nViewport-percentage Lengths: the vw, vh, vmin, vmax units"}],"url":"#vh"}, "viewport-percentage-lengths": {"dfnID":"viewport-percentage-lengths","dfnText":"viewport-percentage lengths","external":false,"refSections":[{"refs":[{"id":"ref-for-viewport-percentage-lengths"}],"title":"\nPrivacy Considerations"}],"url":"#viewport-percentage-lengths"}, "visual-angle-unit": {"dfnID":"visual-angle-unit","dfnText":"visual angle unit (pixel unit)","external":false,"refSections":[{"refs":[{"id":"ref-for-visual-angle-unit"},{"id":"ref-for-visual-angle-unit\u2460"},{"id":"ref-for-visual-angle-unit\u2461"},{"id":"ref-for-visual-angle-unit\u2462"},{"id":"ref-for-visual-angle-unit\u2463"},{"id":"ref-for-visual-angle-unit\u2464"},{"id":"ref-for-visual-angle-unit\u2465"},{"id":"ref-for-visual-angle-unit\u2466"}],"title":"5.2. \nAbsolute Lengths: the cm, mm, Q, in, pt, pc, px units"}],"url":"#visual-angle-unit"}, "vmax": {"dfnID":"vmax","dfnText":"vmax unit","external":false,"refSections":[{"refs":[{"id":"ref-for-vmax"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-vmax\u2460"}],"title":"5.1.2. \nViewport-percentage Lengths: the vw, vh, vmin, vmax units"}],"url":"#vmax"}, "vmin": {"dfnID":"vmin","dfnText":"vmin unit","external":false,"refSections":[{"refs":[{"id":"ref-for-vmin"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-vmin\u2460"}],"title":"5.1.2. \nViewport-percentage Lengths: the vw, vh, vmin, vmax units"}],"url":"#vmin"}, "vw": {"dfnID":"vw","dfnText":"vw unit","external":false,"refSections":[{"refs":[{"id":"ref-for-vw"}],"title":"5.1. \nRelative Lengths"},{"refs":[{"id":"ref-for-vw\u2460"},{"id":"ref-for-vw\u2461"},{"id":"ref-for-vw\u2462"}],"title":"5.1.2. \nViewport-percentage Lengths: the vw, vh, vmin, vmax units"}],"url":"#vw"}, }; document.addEventListener("DOMContentLoaded", ()=>{ genAllDfnPanels(); document.body.addEventListener("click", (e) => { // If not handled already, just hide all dfn panels. hideAllDfnPanels(); }); }); window.addEventListener("resize", () => { // Pin any visible dfn panel queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>positionDfnPanel(el)); }); function genAllDfnPanels() { for(const panelData of Object.values(dfnPanelData)) { const dfnID = panelData.dfnID; const dfn = document.getElementById(dfnID); if(!dfn) { console.log(`Can't find dfn#${dfnID}.`, panelData); continue; } dfn.panelData = panelData; insertDfnPopupAction(dfn); } } function genDfnPanel(dfn, { dfnID, url, dfnText, refSections, external }) { const dfnPanel = mk.aside({ class: "dfn-panel on", id: `infopanel-for-${dfnID}`, "data-for": dfnID, "aria-labelled-by":`infopaneltitle-for-${dfnID}`, }, mk.span({id:`infopaneltitle-for-${dfnID}`, style:"display:none"}, `Info about the '${dfnText}' ${external?"external":""} reference.`), mk.a({href:url, class:"dfn-link"}, url), refSections.length == 0 ? [] : mk.b({}, "Referenced in:"), mk.ul({}, ...refSections.map(section=> mk.li({}, ...section.refs.map((ref, refI)=> [ mk.a({ href: `#${ref.id}` }, (refI == 0) ? section.title : `(${refI + 1})` ), " ", ] ), ), ), ), genLinkingSyntaxes(dfn), ); dfnPanel.addEventListener('click', (event) => { if (event.target.nodeName == 'A') { scrollToTargetAndHighlight(event); pinDfnPanel(dfnPanel); } event.stopPropagation(); refocusOnTarget(event); }); dfnPanel.addEventListener('keydown', (event) => { if(event.keyCode == 27) { // Escape key hideDfnPanel({dfnPanel}); event.stopPropagation(); event.preventDefault(); } }); dfnPanel.dfn = dfn; dfn.dfnPanel = dfnPanel; return dfnPanel; } function hideAllDfnPanels() { // Delete the currently-active dfn panel. queryAll(".dfn-panel").forEach(dfnPanel=>hideDfnPanel({dfnPanel})); } function showDfnPanel(dfn) { hideAllDfnPanels(); // Only display one at a time. dfn.setAttribute("aria-expanded", "true"); const dfnPanel = genDfnPanel(dfn, dfn.panelData); // Give the dfn a unique tabindex, and then // give all the tabbable panel bits successive indexes. let tabIndex = 100; dfn.tabIndex = tabIndex++; const tabbable = dfnPanel.querySelectorAll(":is(a, button)"); for (const el of tabbable) { el.tabIndex = tabIndex++; } append(document.body, dfnPanel); positionDfnPanel(dfnPanel); } function positionDfnPanel(dfnPanel) { const dfn = dfnPanel.dfn; const dfnPos = getBounds(dfn); dfnPanel.style.top = dfnPos.bottom + "px"; dfnPanel.style.left = dfnPos.left + "px"; const panelPos = dfnPanel.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, dfnPos.left - overflowAmount); dfnPanel.style.left = newLeft + "px"; } } function pinDfnPanel(dfnPanel) { // Switch it to "activated" state, which pins it. dfnPanel.classList.add("activated"); dfnPanel.style.position = "fixed"; dfnPanel.style.left = null; dfnPanel.style.top = null; } function hideDfnPanel({dfn, dfnPanel}) { if(!dfnPanel) dfnPanel = dfn.dfnPanel; if(!dfn) dfn = dfnPanel.dfn; dfn.dfnPanel = undefined; dfnPanel.dfn = undefined; dfn.setAttribute("aria-expanded", "false"); dfn.tabIndex = undefined; dfnPanel.remove() } function toggleDfnPanel(dfn) { if(dfn.dfnPanel) { hideDfnPanel(dfn); } else { showDfnPanel(dfn); } } function insertDfnPopupAction(dfn) { dfn.setAttribute('role', 'button'); dfn.setAttribute('aria-expanded', 'false') dfn.tabIndex = 0; dfn.classList.add('has-dfn-panel'); dfn.addEventListener('click', (event) => { toggleDfnPanel(dfn); event.stopPropagation(); }); dfn.addEventListener('keypress', (event) => { const kc = event.keyCode; // 32->Space, 13->Enter if(kc == 32 || kc == 13) { toggleDfnPanel(dfn); event.stopPropagation(); event.preventDefault(); } }); } function refocusOnTarget(event) { const target = event.target; setTimeout(() => { // Refocus on the event.target element. // This is needed after browser scrolls to the destination. target.focus(); }); } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function scrollToTargetAndHighlight(event) { let hash = event.target.hash; if (hash) { hash = decodeURIComponent(hash.substring(1)); const dest = document.getElementById(hash); if (dest) { dest.classList.add('highlighted'); setTimeout(() => dest.classList.remove('highlighted'), 1000); } } } // Functions, divided by link type, that wrap an autolink's // contents with the appropriate outer syntax. // Alternately, a string naming another type they format // the same as. function needsFor(type) { switch(type) { case "descriptor": case "value": case "element-attr": case "attr-value": case "element-state": case "method": case "constructor": case "argument": case "attribute": case "const": case "dict-member": case "event": case "enum-value": case "stringifier": case "serializer": case "iterator": case "maplike": case "setlike": case "state": case "mode": case "context": case "facet": return true; default: return false; } } function refusesFor(type) { switch(type) { case "property": case "element": case "interface": case "namespace": case "callback": case "dictionary": case "enum": case "exception": case "typedef": case "http-header": case "permission": return true; default: return false; } } function linkFormatterFromType(type) { switch(type) { case 'scheme': case 'permission': case 'dfn': return (text) => `[=${text}=]`; case 'abstract-op': return (text) => `[\$${text}\$]`; case 'function': case 'at-rule': case 'selector': case 'value': return (text) => `''${text}''`; case 'http-header': return (text) => `[:${text}:]`; case 'interface': case 'constructor': case 'method': case 'argument': case 'attribute': case 'callback': case 'dictionary': case 'dict-member': case 'enum': case 'enum-value': case 'exception': case 'const': case 'typedef': case 'stringifier': case 'serializer': case 'iterator': case 'maplike': case 'setlike': case 'extended-attribute': case 'event': case 'idl': return (text) => `{{${text}}}`; case 'element-state': case 'element-attr': case 'attr-value': case 'element': return (element) => `<{${element}}>`; case 'grammar': return (text) => `${text} (within a <pre class=prod>)`; case 'type': return (text)=> `<<${text}>>`; case 'descriptor': case 'property': return (text) => `'${text}'`; default: return; }; }; function genLinkingSyntaxes(dfn) { if(dfn.tagName != "DFN") return; const type = dfn.getAttribute('data-dfn-type'); if(!type) { console.log(`<dfn> doesn't have a data-dfn-type:`, dfn); return []; } // Return a function that wraps link text based on the type const linkFormatter = linkFormatterFromType(type); if(!linkFormatter) { console.log(`<dfn> has an unknown data-dfn-type:`, dfn); return []; } let ltAlts; if(dfn.hasAttribute('data-lt')) { ltAlts = dfn.getAttribute('data-lt') .split("|") .map(x=>x.trim()); } else { ltAlts = [dfn.textContent.trim()]; } if(type == "type") { // lt of "<foo>", but "foo" is the interior; // <<foo/bar>> is how you write it with a for, // not <foo/<bar>> or whatever. for(var i = 0; i < ltAlts.length; i++) { const lt = ltAlts[i]; const match = /<(.*)>/.exec(lt); if(match) { ltAlts[i] = match[1]; } } } let forAlts; if(dfn.hasAttribute('data-dfn-for')) { forAlts = dfn.getAttribute('data-dfn-for') .split(",") .map(x=>x.trim()); } else { forAlts = ['']; } let linkingSyntaxes = []; if(!needsFor(type)) { for(const lt of ltAlts) { linkingSyntaxes.push(linkFormatter(lt)); } } if(!refusesFor(type)) { for(const f of forAlts) { linkingSyntaxes.push(linkFormatter(`${f}/${ltAlts[0]}`)) } } return [ mk.b({}, 'Possible linking syntaxes:'), mk.ul({}, ...linkingSyntaxes.map(link => { const copyLink = async () => await navigator.clipboard.writeText(link); return mk.li({}, mk.div({ class: 'link-item' }, mk.button({ class: 'copy-icon', title: 'Copy', type: 'button', _onclick: copyLink, tabindex: 0, }, mk.span({ class: 'icon' }) ), mk.span({}, link) ) ); }) ) ]; } } </script> <script>/* Boilerplate: script-link-titles */ "use strict"; { let linkTitleData = { "#angle-value": "Expands to: deg | grad | rad | turn", "#frequency-value": "Expands to: hz | khz", "#length-value": "Expands to: advance measure | ch | cm | em | ex | in | mm | pc | pt | px | q | rem | vh | vmax | vmin | vw", "#resolution-value": "Expands to: dpcm | dpi | dppx", "#time-value": "Expands to: ms | s", "https://www.w3.org/TR/css-color-5/#typedef-color": "Expands to: <alpha-value> | accentcolor | accentcolortext | activeborder | activecaption | activetext | aliceblue | antiquewhite | appworkspace | aqua | aquamarine | azure | background | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | buttonborder | buttonface | buttonhighlight | buttonshadow | buttontext | cadetblue | canvas | canvastext | captiontext | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | currentcolor | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | field | fieldtext | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | graytext | green | greenyellow | grey | highlight | highlighttext | honeydew | hotpink | inactiveborder | inactivecaption | inactivecaptiontext | indianred | indigo | infobackground | infotext | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | linktext | magenta | mark | marktext | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | menu | menutext | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | none | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | scrollbar | seagreen | seashell | selecteditem | selecteditemtext | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | threeddarkshadow | threedface | threedhighlight | threedlightshadow | threedshadow | tomato | transparent | turquoise | violet | visitedtext | wheat | white | whitesmoke | window | windowframe | windowtext | yellow | yellowgreen", "https://www.w3.org/TR/css-easing-1/#typedef-easing-function": "Expands to: linear", }; function setTypeTitles() { for(let el of document.querySelectorAll("a[href]")) { if(el.href in linkTitleData && !el.hasAttribute("title")) { el.setAttribute("title", linkTitleData[el.href]); } } } document.addEventListener("DOMContentLoaded", setTypeTitles); } </script> <script>/* Boilerplate: script-ref-hints */ "use strict"; { let refsData = { "#Hz": {"export":true,"for_":["<frequency>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"hz","type":"value","url":"#Hz"}, "#Q": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"q","type":"value","url":"#Q"}, "#absolute-length": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"absolute length","type":"dfn","url":"#absolute-length"}, "#anchor-unit": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"anchor","type":"dfn","url":"#anchor-unit"}, "#angle-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<angle>","type":"type","url":"#angle-value"}, "#canonical-unit": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"canonical unit","type":"dfn","url":"#canonical-unit"}, "#ch": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"ch","type":"value","url":"#ch"}, "#cm": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"cm","type":"value","url":"#cm"}, "#comb-all": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"&&","type":"grammar","url":"#comb-all"}, "#comb-comma": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":",","type":"grammar","url":"#comb-comma"}, "#comb-one": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"|","type":"grammar","url":"#comb-one"}, "#compatible-units": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"compatible","type":"dfn","url":"#compatible-units"}, "#css-bracketed-range-notation": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"bracketed range notation","type":"dfn","url":"#css-bracketed-range-notation"}, "#css-css-identifier": {"export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"identifier","type":"dfn","url":"#css-css-identifier"}, "#css-value-definition-syntax": {"export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"value definition syntax","type":"dfn","url":"#css-value-definition-syntax"}, "#css-wide-keywords": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"css-wide keywords","type":"dfn","url":"#css-wide-keywords"}, "#deg": {"export":true,"for_":["<angle>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"deg","type":"value","url":"#deg"}, "#device-pixel": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"device pixel","type":"dfn","url":"#device-pixel"}, "#dimension": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"dimension","type":"dfn","url":"#dimension"}, "#dpcm": {"export":true,"for_":["<resolution>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"dpcm","type":"value","url":"#dpcm"}, "#dpi": {"export":true,"for_":["<resolution>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"dpi","type":"value","url":"#dpi"}, "#dppx": {"export":true,"for_":["<resolution>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"dppx","type":"value","url":"#dppx"}, "#em": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"em","type":"value","url":"#em"}, "#ex": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"ex","type":"value","url":"#ex"}, "#font-relative-length": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"font-relative lengths","type":"dfn","url":"#font-relative-length"}, "#frequency-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<frequency>","type":"type","url":"#frequency-value"}, "#funcdef-calc": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"calc()","type":"function","url":"#funcdef-calc"}, "#funcdef-url": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"url()","type":"function","url":"#funcdef-url"}, "#functional-notation": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"functional notation","type":"dfn","url":"#functional-notation"}, "#grad": {"export":true,"for_":["<angle>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"grad","type":"value","url":"#grad"}, "#identifier-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<custom-ident>","type":"type","url":"#identifier-value"}, "#in": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"in","type":"value","url":"#in"}, "#integer": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"integer","type":"dfn","url":"#integer"}, "#integer-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<integer>","type":"type","url":"#integer-value"}, "#kHz": {"export":true,"for_":["<frequency>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"khz","type":"value","url":"#kHz"}, "#length-advance-measure": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"advance measure","type":"dfn","url":"#length-advance-measure"}, "#length-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<length>","type":"type","url":"#length-value"}, "#mm": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"mm","type":"value","url":"#mm"}, "#ms": {"export":true,"for_":["<time>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"ms","type":"value","url":"#ms"}, "#mult-comma": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"#","type":"grammar","url":"#mult-comma"}, "#mult-opt": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"?","type":"grammar","url":"#mult-opt"}, "#mult-zero-plus": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"*","type":"grammar","url":"#mult-zero-plus"}, "#number": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"number","type":"dfn","url":"#number"}, "#number-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<number>","type":"type","url":"#number-value"}, "#numeric-data-types": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"numeric data types","type":"dfn","url":"#numeric-data-types"}, "#pc": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"pc","type":"value","url":"#pc"}, "#percentage-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<percentage>","type":"type","url":"#percentage-value"}, "#physical-unit": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"physical unit","type":"dfn","url":"#physical-unit"}, "#pt": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"pt","type":"value","url":"#pt"}, "#px": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"px","type":"value","url":"#px"}, "#rad": {"export":true,"for_":["<angle>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"rad","type":"value","url":"#rad"}, "#reference-pixel": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"reference pixel","type":"dfn","url":"#reference-pixel"}, "#relative-length": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"relative length","type":"dfn","url":"#relative-length"}, "#rem": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"rem","type":"value","url":"#rem"}, "#resolution-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<resolution>","type":"type","url":"#resolution-value"}, "#resolved-type": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"resolved type","type":"dfn","url":"#resolved-type"}, "#s": {"export":true,"for_":["<time>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"s","type":"value","url":"#s"}, "#string-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<string>","type":"type","url":"#string-value"}, "#time-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<time>","type":"type","url":"#time-value"}, "#turn": {"export":true,"for_":["<angle>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"turn","type":"value","url":"#turn"}, "#typedef-calc-number-product": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<calc-number-product>","type":"type","url":"#typedef-calc-number-product"}, "#typedef-calc-number-sum": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<calc-number-sum>","type":"type","url":"#typedef-calc-number-sum"}, "#typedef-calc-number-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<calc-number-value>","type":"type","url":"#typedef-calc-number-value"}, "#typedef-calc-product": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<calc-product>","type":"type","url":"#typedef-calc-product"}, "#typedef-calc-sum": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<calc-sum>","type":"type","url":"#typedef-calc-sum"}, "#typedef-calc-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<calc-value>","type":"type","url":"#typedef-calc-value"}, "#typedef-dimension": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<dimension>","type":"type","url":"#typedef-dimension"}, "#typedef-ident": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<ident>","type":"type","url":"#typedef-ident"}, "#typedef-length-percentage": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<length-percentage>","type":"type","url":"#typedef-length-percentage"}, "#typedef-position": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<position>","type":"type","url":"#typedef-position"}, "#typedef-url-modifier": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<url-modifier>","type":"type","url":"#typedef-url-modifier"}, "#url-local-url-flag": {"export":true,"for_":["url()"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"local url flag","type":"dfn","url":"#url-local-url-flag"}, "#url-value": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<url>","type":"type","url":"#url-value"}, "#vh": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"vh","type":"value","url":"#vh"}, "#viewport-percentage-lengths": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"viewport-percentage lengths","type":"dfn","url":"#viewport-percentage-lengths"}, "#visual-angle-unit": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"pixel unit","type":"dfn","url":"#visual-angle-unit"}, "#vmax": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"vmax","type":"value","url":"#vmax"}, "#vmin": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"vmin","type":"value","url":"#vmin"}, "#vw": {"export":true,"for_":["<length>"],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"vw","type":"value","url":"#vw"}, "https://drafts.csswg.org/css-values-5/#funcdef-attr": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-values","spec":"css-values-5","status":"current","text":"attr()","type":"function","url":"https://drafts.csswg.org/css-values-5/#funcdef-attr"}, "https://drafts.csswg.org/css-values-5/#funcdef-toggle": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-values","spec":"css-values-5","status":"current","text":"toggle()","type":"function","url":"https://drafts.csswg.org/css-values-5/#funcdef-toggle"}, "https://drafts.csswg.org/css-values-5/#valdef-attr-string": {"export":true,"for_":["attr()"],"level":"5","normative":true,"shortname":"css-values","spec":"css-values-5","status":"current","text":"string","type":"value","url":"https://drafts.csswg.org/css-values-5/#valdef-attr-string"}, "https://drafts.csswg.org/css-values-5/#valdef-attr-url": {"export":true,"for_":["attr()"],"level":"5","normative":true,"shortname":"css-values","spec":"css-values-5","status":"current","text":"url","type":"value","url":"https://drafts.csswg.org/css-values-5/#valdef-attr-url"}, "https://drafts.csswg.org/css2/#propdef-line-height": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"line-height","type":"property","url":"https://drafts.csswg.org/css2/#propdef-line-height"}, "https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-history-pushstate": {"export":true,"for_":["History"],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"pushState(data, unused, url)","type":"method","url":"https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-history-pushstate"}, "https://html.spec.whatwg.org/multipage/semantics.html#the-base-element": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"base","type":"element","url":"https://html.spec.whatwg.org/multipage/semantics.html#the-base-element"}, "https://infra.spec.whatwg.org/#ascii-case-insensitive": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"ascii case-insensitive","type":"dfn","url":"https://infra.spec.whatwg.org/#ascii-case-insensitive"}, "https://infra.spec.whatwg.org/#string": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"string","type":"dfn","url":"https://infra.spec.whatwg.org/#string"}, "https://www.w3.org/TR/CSS21/box.html#value-def-border-width": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css2","status":"snapshot","text":"<border-width>","type":"type","url":"https://www.w3.org/TR/CSS21/box.html#value-def-border-width"}, "https://www.w3.org/TR/CSS21/tables.html#propdef-border-collapse": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css2","status":"snapshot","text":"border-collapse","type":"property","url":"https://www.w3.org/TR/CSS21/tables.html#propdef-border-collapse"}, "https://www.w3.org/TR/css-2023/#user-agent": {"export":false,"for_":[],"level":"2023","normative":true,"shortname":"css","spec":"css-2023","status":"snapshot","text":"ua","type":"dfn","url":"https://www.w3.org/TR/css-2023/#user-agent"}, "https://www.w3.org/TR/css-animations-1/#propdef-animation": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css-animations","spec":"css-animations-1","status":"snapshot","text":"animation","type":"property","url":"https://www.w3.org/TR/css-animations-1/#propdef-animation"}, "https://www.w3.org/TR/css-animations-1/#propdef-animation-name": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css-animations","spec":"css-animations-1","status":"snapshot","text":"animation-name","type":"property","url":"https://www.w3.org/TR/css-animations-1/#propdef-animation-name"}, "https://www.w3.org/TR/css-animations-1/#propdef-animation-timing-function": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css-animations","spec":"css-animations-1","status":"snapshot","text":"animation-timing-function","type":"property","url":"https://www.w3.org/TR/css-animations-1/#propdef-animation-timing-function"}, "https://www.w3.org/TR/css-backgrounds-3/#propdef-background": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"snapshot","text":"background","type":"property","url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-background"}, "https://www.w3.org/TR/css-backgrounds-3/#propdef-background-attachment": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"snapshot","text":"background-attachment","type":"property","url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-background-attachment"}, "https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"snapshot","text":"background-position","type":"property","url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-background-position"}, "https://www.w3.org/TR/css-backgrounds-3/#propdef-border-color": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"snapshot","text":"border-color","type":"property","url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-border-color"}, "https://www.w3.org/TR/css-backgrounds-3/#propdef-border-width": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"snapshot","text":"border-width","type":"property","url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-border-width"}, "https://www.w3.org/TR/css-backgrounds-3/#propdef-box-shadow": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"snapshot","text":"box-shadow","type":"property","url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-box-shadow"}, "https://www.w3.org/TR/css-box-4/#propdef-padding-top": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"snapshot","text":"padding-top","type":"property","url":"https://www.w3.org/TR/css-box-4/#propdef-padding-top"}, "https://www.w3.org/TR/css-break-3/#propdef-orphans": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-break","spec":"css-break-3","status":"snapshot","text":"orphans","type":"property","url":"https://www.w3.org/TR/css-break-3/#propdef-orphans"}, "https://www.w3.org/TR/css-cascade-5/#actual-value": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"actual value","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#actual-value"}, "https://www.w3.org/TR/css-cascade-5/#at-ruledef-import": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"@import","type":"at-rule","url":"https://www.w3.org/TR/css-cascade-5/#at-ruledef-import"}, "https://www.w3.org/TR/css-cascade-5/#computed-value": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"computed value","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#computed-value"}, "https://www.w3.org/TR/css-cascade-5/#specified-value": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"specified value","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#specified-value"}, "https://www.w3.org/TR/css-cascade-5/#used-value": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"used value","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#used-value"}, "https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit": {"export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"inherit","type":"value","url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit"}, "https://www.w3.org/TR/css-cascade-5/#valdef-all-initial": {"export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"initial","type":"value","url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-initial"}, "https://www.w3.org/TR/css-cascade-5/#valdef-all-unset": {"export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"unset","type":"value","url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-unset"}, "https://www.w3.org/TR/css-color-4/#funcdef-hsl": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-color","spec":"css-color-4","status":"snapshot","text":"hsl()","type":"function","url":"https://www.w3.org/TR/css-color-4/#funcdef-hsl"}, "https://www.w3.org/TR/css-color-4/#funcdef-rgba": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-color","spec":"css-color-4","status":"snapshot","text":"rgba()","type":"function","url":"https://www.w3.org/TR/css-color-4/#funcdef-rgba"}, "https://www.w3.org/TR/css-color-4/#propdef-opacity": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-color","spec":"css-color-4","status":"snapshot","text":"opacity","type":"property","url":"https://www.w3.org/TR/css-color-4/#propdef-opacity"}, "https://www.w3.org/TR/css-color-5/#typedef-color": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-color","spec":"css-color-5","status":"snapshot","text":"<color>","type":"type","url":"https://www.w3.org/TR/css-color-5/#typedef-color"}, "https://www.w3.org/TR/css-counter-styles-3/#disc": {"export":true,"for_":["<counter-style-name>"],"level":"3","normative":true,"shortname":"css-counter-styles","spec":"css-counter-styles-3","status":"snapshot","text":"disc","type":"value","url":"https://www.w3.org/TR/css-counter-styles-3/#disc"}, "https://www.w3.org/TR/css-display-3/#containing-block": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"containing block","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#containing-block"}, "https://www.w3.org/TR/css-easing-1/#typedef-easing-function": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css-easing","spec":"css-easing-1","status":"snapshot","text":"<easing-function>","type":"type","url":"https://www.w3.org/TR/css-easing-1/#typedef-easing-function"}, "https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in": {"export":true,"for_":["<cubic-bezier-easing-function>"],"level":"1","normative":true,"shortname":"css-easing","spec":"css-easing-1","status":"snapshot","text":"ease-in","type":"value","url":"https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-in"}, "https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-out": {"export":true,"for_":["<cubic-bezier-easing-function>"],"level":"1","normative":true,"shortname":"css-easing","spec":"css-easing-1","status":"snapshot","text":"ease-out","type":"value","url":"https://www.w3.org/TR/css-easing-1/#valdef-cubic-bezier-easing-function-ease-out"}, "https://www.w3.org/TR/css-fonts-4/#propdef-font": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"snapshot","text":"font","type":"property","url":"https://www.w3.org/TR/css-fonts-4/#propdef-font"}, "https://www.w3.org/TR/css-fonts-4/#propdef-font-family": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"snapshot","text":"font-family","type":"property","url":"https://www.w3.org/TR/css-fonts-4/#propdef-font-family"}, "https://www.w3.org/TR/css-fonts-4/#propdef-font-size": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"snapshot","text":"font-size","type":"property","url":"https://www.w3.org/TR/css-fonts-4/#propdef-font-size"}, "https://www.w3.org/TR/css-grid-2/#valdef-flex-fr": {"export":true,"for_":["<flex>"],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"snapshot","text":"fr","type":"value","url":"https://www.w3.org/TR/css-grid-2/#valdef-flex-fr"}, "https://www.w3.org/TR/css-images-3/#propdef-object-position": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-images","spec":"css-images-3","status":"snapshot","text":"object-position","type":"property","url":"https://www.w3.org/TR/css-images-3/#propdef-object-position"}, "https://www.w3.org/TR/css-images-3/#typedef-image": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-images","spec":"css-images-3","status":"snapshot","text":"<image>","type":"type","url":"https://www.w3.org/TR/css-images-3/#typedef-image"}, "https://www.w3.org/TR/css-images-4/#funcdef-linear-gradient": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-images","spec":"css-images-4","status":"snapshot","text":"linear-gradient()","type":"function","url":"https://www.w3.org/TR/css-images-4/#funcdef-linear-gradient"}, "https://www.w3.org/TR/css-images-4/#propdef-image-resolution": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-images","spec":"css-images-4","status":"snapshot","text":"image-resolution","type":"property","url":"https://www.w3.org/TR/css-images-4/#propdef-image-resolution"}, "https://www.w3.org/TR/css-overflow-3/#propdef-overflow": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"snapshot","text":"overflow","type":"property","url":"https://www.w3.org/TR/css-overflow-3/#propdef-overflow"}, "https://www.w3.org/TR/css-overflow-3/#valdef-overflow-auto": {"export":true,"for_":["overflow","overflow-x","overflow-y"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"snapshot","text":"auto","type":"value","url":"https://www.w3.org/TR/css-overflow-3/#valdef-overflow-auto"}, "https://www.w3.org/TR/css-page-3/#page-area": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-page","spec":"css-page-3","status":"snapshot","text":"page area","type":"dfn","url":"https://www.w3.org/TR/css-page-3/#page-area"}, "https://www.w3.org/TR/css-sizing-3/#propdef-width": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"width","type":"property","url":"https://www.w3.org/TR/css-sizing-3/#propdef-width"}, "https://www.w3.org/TR/css-sizing-3/#valdef-width-auto": {"export":true,"for_":["width","height","min-width","min-height"],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"auto","type":"value","url":"https://www.w3.org/TR/css-sizing-3/#valdef-width-auto"}, "https://www.w3.org/TR/css-syntax-3/#component-value": {"export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"component value","type":"dfn","url":"https://www.w3.org/TR/css-syntax-3/#component-value"}, "https://www.w3.org/TR/css-syntax-3/#consume-a-url-token": {"export":false,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"consume a url token","type":"dfn","url":"https://www.w3.org/TR/css-syntax-3/#consume-a-url-token"}, "https://www.w3.org/TR/css-syntax-3/#typedef-dimension-token": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"<dimension-token>","type":"type","url":"https://www.w3.org/TR/css-syntax-3/#typedef-dimension-token"}, "https://www.w3.org/TR/css-syntax-3/#typedef-function-token": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"<function-token>","type":"type","url":"https://www.w3.org/TR/css-syntax-3/#typedef-function-token"}, "https://www.w3.org/TR/css-syntax-3/#typedef-ident-token": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"<ident-token>","type":"type","url":"https://www.w3.org/TR/css-syntax-3/#typedef-ident-token"}, "https://www.w3.org/TR/css-syntax-3/#typedef-number-token": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"<number-token>","type":"type","url":"https://www.w3.org/TR/css-syntax-3/#typedef-number-token"}, "https://www.w3.org/TR/css-syntax-3/#typedef-percentage-token": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"<percentage-token>","type":"type","url":"https://www.w3.org/TR/css-syntax-3/#typedef-percentage-token"}, "https://www.w3.org/TR/css-syntax-3/#typedef-string-token": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"<string-token>","type":"type","url":"https://www.w3.org/TR/css-syntax-3/#typedef-string-token"}, "https://www.w3.org/TR/css-syntax-3/#typedef-url-token": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"snapshot","text":"<url-token>","type":"type","url":"https://www.w3.org/TR/css-syntax-3/#typedef-url-token"}, "https://www.w3.org/TR/css-text-3/#propdef-text-align": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"snapshot","text":"text-align","type":"property","url":"https://www.w3.org/TR/css-text-3/#propdef-text-align"}, "https://www.w3.org/TR/css-text-4/#propdef-tab-size": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"snapshot","text":"tab-size","type":"property","url":"https://www.w3.org/TR/css-text-4/#propdef-tab-size"}, "https://www.w3.org/TR/css-text-4/#valdef-text-align-center": {"export":true,"for_":["text-align"],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"snapshot","text":"center","type":"value","url":"https://www.w3.org/TR/css-text-4/#valdef-text-align-center"}, "https://www.w3.org/TR/css-text-decor-4/#propdef-text-decoration": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text-decor","spec":"css-text-decor-4","status":"snapshot","text":"text-decoration","type":"property","url":"https://www.w3.org/TR/css-text-decor-4/#propdef-text-decoration"}, "https://www.w3.org/TR/css-transforms-1/#propdef-transform-origin": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css-transforms","spec":"css-transforms-1","status":"snapshot","text":"transform-origin","type":"property","url":"https://www.w3.org/TR/css-transforms-1/#propdef-transform-origin"}, "https://www.w3.org/TR/css-ui-4/#propdef-outline-color": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-ui","spec":"css-ui-4","status":"snapshot","text":"outline-color","type":"property","url":"https://www.w3.org/TR/css-ui-4/#propdef-outline-color"}, "https://www.w3.org/TR/css-values-4/#coordinating-list-property": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"coordinating list property","type":"dfn","url":"https://www.w3.org/TR/css-values-4/#coordinating-list-property"}, "https://www.w3.org/TR/css-writing-modes-4/#propdef-text-orientation": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"text-orientation","type":"property","url":"https://www.w3.org/TR/css-writing-modes-4/#propdef-text-orientation"}, "https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"writing-mode","type":"property","url":"https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode"}, "https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright": {"export":true,"for_":["text-orientation"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"upright","type":"value","url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright"}, "https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-lr": {"export":true,"for_":["writing-mode"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"vertical-lr","type":"value","url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-lr"}, "https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-rl": {"export":true,"for_":["writing-mode"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"vertical-rl","type":"value","url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-writing-mode-vertical-rl"}, "https://www.w3.org/TR/mediaqueries-5/#continuous-media": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"snapshot","text":"continuous media","type":"dfn","url":"https://www.w3.org/TR/mediaqueries-5/#continuous-media"}, "https://www.w3.org/TR/mediaqueries-5/#media-query": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"snapshot","text":"media query","type":"dfn","url":"https://www.w3.org/TR/mediaqueries-5/#media-query"}, "https://www.w3.org/TR/mediaqueries-5/#paged-media": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"snapshot","text":"paged media","type":"dfn","url":"https://www.w3.org/TR/mediaqueries-5/#paged-media"}, "https://www.w3.org/TR/selectors-3/#x": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"selectors","spec":"selectors-3","status":"snapshot","text":"*","type":"selector","url":"https://www.w3.org/TR/selectors-3/#x"}, "https://www.w3.org/TR/selectors-4/#selectordef-adjacent": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"selectors","spec":"selectors-4","status":"snapshot","text":"+","type":"selector","url":"https://www.w3.org/TR/selectors-4/#selectordef-adjacent"}, }; function mkRefHint(link, ref) { const linkText = link.textContent; let dfnTextElements = ''; if (ref.text != linkText) { dfnTextElements = mk.li({}, mk.b({}, "Term: "), mk.span({}, ref.text) ); } const forList = ref.for_; let forListElements; if(forList.length == 0) { forListElements = []; } else if(forList.length == 1) { forListElements = mk.li({}, mk.b({}, "For: "), mk.span({}, forList[0]), ); } else { forListElements = mk.li({}, mk.b({}, "For: "), mk.ul({}, ...forList.map(forItem => mk.li({}, mk.span({}, forItem) ), ), ), ); } const url = ref.url; const safeUrl = encodeURIComponent(url); const hintPanel = mk.aside({ class: "ref-hint", id: `ref-hint-for-${safeUrl}`, "data-for": url, "aria-labelled-by": `ref-hint-for-${safeUrl}`, }, mk.ul({}, dfnTextElements, mk.li({}, mk.b({}, "URL: "), mk.a({ href: url, class: "ref" }, url), ), mk.li({}, mk.b({}, "Type: "), mk.span({}, `${ref.type}`), ), mk.li({}, mk.b({}, "Spec: "), mk.span({}, `${ref.spec ? ref.spec : ''}`), ), forListElements ), ); hintPanel.forLink = link; setupRefHintEventListeners(link, hintPanel); return hintPanel; } function hideAllRefHints() { queryAll(".ref-hint").forEach(el=>hideRefHint(el)); } function hideRefHint(refHint) { const link = refHint.forLink; link.setAttribute("aria-expanded", "false"); if(refHint.teardownEventListeners) { refHint.teardownEventListeners(); } refHint.remove(); } function showRefHint(link) { if(link.classList.contains("dfn-link")) return; const url = link.getAttribute("href"); const ref = refsData[url]; if(!ref) return; hideAllRefHints(); // Only display one at this time. const refHint = mkRefHint(link, ref); append(document.body, refHint); link.setAttribute("aria-expanded", "true"); positionRefHint(refHint); } function setupRefHintEventListeners(link, refHint) { if (refHint.teardownEventListeners) return; // Add event handlers to hide the refHint after the user moves away // from both the link and refHint, if not hovering either within one second. let timeout = null; const startHidingRefHint = (event) => { if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { hideRefHint(refHint); }, 1000); } const resetHidingRefHint = (event) => { if (timeout) clearTimeout(timeout); timeout = null; }; link.addEventListener("mouseleave", startHidingRefHint); link.addEventListener("mouseenter", resetHidingRefHint); link.addEventListener("blur", startHidingRefHint); link.addEventListener("focus", resetHidingRefHint); refHint.addEventListener("mouseleave", startHidingRefHint); refHint.addEventListener("mouseenter", resetHidingRefHint); refHint.addEventListener("blur", startHidingRefHint); refHint.addEventListener("focus", resetHidingRefHint); refHint.teardownEventListeners = () => { // remove event listeners resetHidingRefHint(); link.removeEventListener("mouseleave", startHidingRefHint); link.removeEventListener("mouseenter", resetHidingRefHint); link.removeEventListener("blur", startHidingRefHint); link.removeEventListener("focus", resetHidingRefHint); refHint.removeEventListener("mouseleave", startHidingRefHint); refHint.removeEventListener("mouseenter", resetHidingRefHint); refHint.removeEventListener("blur", startHidingRefHint); refHint.removeEventListener("focus", resetHidingRefHint); }; } function positionRefHint(refHint) { const link = refHint.forLink; const linkPos = getBounds(link); refHint.style.top = linkPos.bottom + "px"; refHint.style.left = linkPos.left + "px"; const panelPos = refHint.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount); refHint.style.left = newLeft + "px"; } } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function showRefHintListener(e) { // If the target isn't in a link (or is a link), // just ignore it. let link = e.target.closest("a"); if(!link) return; // If the target is in a ref-hint panel // (aka a link in the already-open one), // also just ignore it. if(link.closest(".ref-hint")) return; // Otherwise, show the panel for the link. showRefHint(link); } function hideAllHintsListener(e) { // If the click is inside a ref-hint panel, ignore it. if(e.target.closest(".ref-hint")) return; // Otherwise, close all the current panels. hideAllRefHints(); } document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("mousedown", showRefHintListener); document.body.addEventListener("focus", showRefHintListener); document.body.addEventListener("click", hideAllHintsListener); }); window.addEventListener("resize", () => { // Hide any open ref hint. hideAllRefHints(); }); } </script>

Pages: 1 2 3 4 5 6 7 8 9 10