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="ED" name="w3c-status"> <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-ED" rel="stylesheet"> <meta content="Bikeshed version 742f3d674, updated Mon Nov 4 14:56:54 2024 -0800" name="generator"> <link href="https://www.w3.org/TR/css-values-3/" rel="canonical"> <link href="https://drafts.csswg.org/csslogo.ico" rel="icon"> <meta content="1f4e5de6538eeaed2378d127300a62f95146562f" name="revision"> <meta content="dark light" name="color-scheme"> <link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css"> <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-caniuse-panel */ @media (max-width: 767px) { .caniuse-status { opacity: .1; transition: opacity .1s; } } :root { --caniuse-bg: #EEE; --caniuse-shadow: #999; --caniuse-nosupport-text: #ccc; --caniuse-partialsupport-text: #666; } @media (prefers-color-scheme: dark) { :root { --caniuse-bg: #222; --caniuse-shadow: #444; --caniuse-nosupport-text: #666; --caniuse-partialsupport-text: #bbb; } } .caniuse-status { background: var(--caniuse-bg, #EEE); border-radius: .25em; box-shadow: 0 0 3px var(--caniuse-shadow, #999); color: var(--text, black); font: 1em sans-serif; hyphens: none; max-width: min-content; overflow: hidden; padding: .2em; position: absolute; right: 0.3em; top: auto; width: fit-content; word-wrap: normal; z-index: 8; } .caniuse-status.unpositioned { display: none; } .caniuse-status.overlapping-main { opacity: .2; transition: opacity .1s; } .caniuse-status[open] { opacity: 1; z-index: 9; min-width: 9em; width: fit-content; } .caniuse-status:hover { outline: var(--text, black) 1px solid; opacity: 1; } .caniuse-status > summary { font-weight: normal; text-align: right; cursor: pointer; display: block; } .caniuse-status > p { font-size: 0.6em; margin: 0; padding: 0; clear: both; } .caniuse-status > p + p { padding-top: 0.5em; } .caniuse-status > .support { display: block; } .caniuse-status > .support > span { padding: 0.2em 0; display: block; display: table; } .caniuse-status > .support > span.partial { color: var(--caniuse-partialsupport-text, #666666); filter: grayscale(50%); } .caniuse-status > .support > span.no { color: var(--caniuse-nosupport-text, #CCCCCC); filter: grayscale(100%); } .caniuse-status > .support > span.no::before { opacity: 0.5; } .caniuse-status > .support > span:first-of-type { padding-top: 0.5em; } .caniuse-status > .support > span > span { padding: 0 0.5em; display: table-cell; vertical-align: top; } .caniuse-status > .support > span > span:first-child { width: 100%; } .caniuse-status > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; } .caniuse-status > .support > span::before { content: ' '; display: table-cell; height: 1.5em; background: no-repeat center center; background-size: contain; text-align: right; font-size: 0.75em; font-weight: bold; } .caniuse-status > .support > .and_chr::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .caniuse-status > .support > .and_ff::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .caniuse-status > .support > .and_uc::before { background-image: url(https://resources.whatwg.org/browser-logos/uc.png); } /* UC Browser for Android */ .caniuse-status > .support > .android::before { background-image: url(https://resources.whatwg.org/browser-logos/android.svg); } .caniuse-status > .support > .bb::before { background-image: url(https://resources.whatwg.org/browser-logos/bb.jpg); } /* Blackberry Browser */ .caniuse-status > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .caniuse-status > .support > .edge::before { background-image: url(https://resources.whatwg.org/browser-logos/edge.svg); } .caniuse-status > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .caniuse-status > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); } .caniuse-status > .support > .ie_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/ie-mobile.svg); } .caniuse-status > .support > .ios_saf::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); } .caniuse-status > .support > .op_mini::before { background-image: url(https://resources.whatwg.org/browser-logos/opera-mini.png); } .caniuse-status > .support > .op_mob::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .caniuse-status > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .caniuse-status > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); } .caniuse-status > .support > .samsung::before { background-image: url(https://resources.whatwg.org/browser-logos/samsung.svg); } .caniuse-status > .caniuse { text-align: right; font-style: italic; } @media (max-width: 767px) { .caniuse-status.wrapped { width: 9em; height: auto; } .caniuse-status:not(.wrapped) { height: 1em; max-width: min-content; } .caniuse-status.wrapped > :not(input) { display: block; } .caniuse-status:not(.wrapped) > :not(input) { display: none; } } </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-mdn-anno */ :root { --mdn-bg: #EEE; --mdn-shadow: #999; --mdn-nosupport-text: #ccc; --mdn-pass: green; --mdn-fail: red; } @media (prefers-color-scheme: dark) { :root { --mdn-bg: #222; --mdn-shadow: #444; --mdn-nosupport-text: #666; --mdn-pass: #690; --mdn-fail: #d22; } } .mdn-anno { background: var(--mdn-bg, #EEE); border-radius: .25em; box-shadow: 0 0 3px var(--mdn-shadow, #999); color: var(--text, black); font: 1em sans-serif; hyphens: none; max-width: min-content; overflow: hidden; padding: 0.2em; position: absolute; right: 0.3em; top: auto; white-space: nowrap; word-wrap: normal; z-index: 8; } .mdn-anno.unpositioned { display: none; } .mdn-anno.overlapping-main { opacity: .2; transition: opacity .1s; } .mdn-anno[open] { opacity: 1; z-index: 9; min-width: 9em; } .mdn-anno:hover { opacity: 1; outline: var(--text, black) 1px solid; } .mdn-anno > summary { font-weight: normal; text-align: right; cursor: pointer; display: block; } .mdn-anno > summary > .less-than-two-engines-flag { color: var(--mdn-fail); padding-right: 2px; } .mdn-anno > summary > .all-engines-flag { color: var(--mdn-pass); padding-right: 2px; } .mdn-anno > summary > span { color: #fff; background-color: #000; font-weight: normal; font-family: zillaslab, Palatino, "Palatino Linotype", serif; padding: 2px 3px 0px 3px; line-height: 1.3em; vertical-align: top; } .mdn-anno > .feature { margin-top: 20px; } .mdn-anno > .feature:not(:first-of-type) { border-top: 1px solid #999; margin-top: 6px; padding-top: 2px; } .mdn-anno > .feature > .less-than-two-engines-text { color: var(--mdn-fail); } .mdn-anno > .feature > .all-engines-text { color: var(--mdn-pass); } .mdn-anno > .feature > p { font-size: .75em; margin-top: 6px; margin-bottom: 0; } .mdn-anno > .feature > p + p { margin-top: 3px; } .mdn-anno > .feature > .support { display: block; font-size: 0.6em; margin: 0; padding: 0; margin-top: 2px; } .mdn-anno > .feature > .support + div { padding-top: 0.5em; } .mdn-anno > .feature > .support > hr { display: block; border: none; border-top: 1px dotted #999; padding: 3px 0px 0px 0px; margin: 2px 3px 0px 3px; } .mdn-anno > .feature > .support > hr::before { content: ""; } .mdn-anno > .feature > .support > span { padding: 0.2em 0; display: block; display: table; } .mdn-anno > .feature > .support > span.no { color: var(--mdn-nosupport-text); filter: grayscale(100%); } .mdn-anno > .feature > .support > span.no::before { opacity: 0.5; } .mdn-anno > .feature > .support > span:first-of-type { padding-top: 0.5em; } .mdn-anno > .feature > .support > span > span { padding: 0 0.5em; display: table-cell; } .mdn-anno > .feature > .support > span > span:first-child { width: 100%; } .mdn-anno > .feature > .support > span > span:last-child { width: 100%; white-space: pre; padding: 0; } .mdn-anno > .feature > .support > span::before { content: ' '; display: table-cell; min-width: 1.5em; height: 1.5em; background: no-repeat center center; background-size: contain; text-align: right; font-size: 0.75em; font-weight: bold; } .mdn-anno > .feature > .support > .chrome_android::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .mdn-anno > .feature > .support > .firefox_android::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .mdn-anno > .feature > .support > .chrome::before { background-image: url(https://resources.whatwg.org/browser-logos/chrome.svg); } .mdn-anno > .feature > .support > .edge_blink::before { background-image: url(https://resources.whatwg.org/browser-logos/edge.svg); } .mdn-anno > .feature > .support > .edge::before { background-image: url(https://resources.whatwg.org/browser-logos/edge_legacy.svg); } .mdn-anno > .feature > .support > .firefox::before { background-image: url(https://resources.whatwg.org/browser-logos/firefox.png); } .mdn-anno > .feature > .support > .ie::before { background-image: url(https://resources.whatwg.org/browser-logos/ie.png); } .mdn-anno > .feature > .support > .safari_ios::before { background-image: url(https://resources.whatwg.org/browser-logos/safari-ios.svg); } .mdn-anno > .feature > .support > .nodejs::before { background-image: url(https://nodejs.org/static/images/favicons/favicon.ico); } .mdn-anno > .feature > .support > .opera_android::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .mdn-anno > .feature > .support > .opera::before { background-image: url(https://resources.whatwg.org/browser-logos/opera.svg); } .mdn-anno > .feature > .support > .safari::before { background-image: url(https://resources.whatwg.org/browser-logos/safari.png); } .mdn-anno > .feature > .support > .samsunginternet_android::before { background-image: url(https://resources.whatwg.org/browser-logos/samsung.svg); } .mdn-anno > .feature > .support > .webview_android::before { background-image: url(https://resources.whatwg.org/browser-logos/android-webview.png); } .name-slug-mismatch { color: red; } .caniuse-status:hover { z-index: 9; } /* dt, li, .issue, .note, and .example are "position: relative", so to put annotation at right margin, must move to right of containing block */; .h-entry:not(.status-LS) dt > .mdn-anno, .h-entry:not(.status-LS) li > .mdn-anno, .h-entry:not(.status-LS) .issue > .mdn-anno, .h-entry:not(.status-LS) .note > .mdn-anno, .h-entry:not(.status-LS) .example > .mdn-anno { right: -6.7em; } .h-entry p + .mdn-anno { margin-top: 0; } h2 + .mdn-anno.after { margin: -48px 0 0 0; } h3 + .mdn-anno.after { margin: -46px 0 0 0; } h4 + .mdn-anno.after { margin: -42px 0 0 0; } h5 + .mdn-anno.after { margin: -40px 0 0 0; } h6 + .mdn-anno.after { margin: -40px 0 0 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> <style>/* Boilerplate: style-wpt */ :root { --wpt-border: hsl(0, 0%, 60%); --wpt-bg: hsl(0, 0%, 95%); --wpt-text: var(--text); --wptheading-text: hsl(0, 0%, 30%); } @media (prefers-color-scheme: dark) { :root { --wpt-border: hsl(0, 0%, 30%); --wpt-bg: var(--borderedblock-bg); --wpt-text: var(--text); --wptheading-text: hsl(0, 0%, 60%); } } .wpt-tests-block { list-style: none; border-left: .5em solid var(--wpt-border); background: var(--wpt-bg); color: var(--wpt-text); margin: 1em auto; padding: .5em; } .wpt-tests-block summary { color: var(--wptheading-text); font-weight: normal; text-transform: uppercase; } .wpt-tests-block summary::marker{ color: var(--wpt-border); } .wpt-tests-block summary:hover::marker{ color: var(--wpt-text); } /* The only content of a wpt test block in its closed state is the <summary>, which contains the word TESTS, and that is absolutely positioned. In that closed state, wpt test blocks are styled to have a top margin whose height is exactly equal to the height of the absolutely positioned <summary>, and no other background/padding/margin/border. The wpt test block elements will therefore allow the maring of the previous/next block elements to collapse through them; if this combined margin would be larger than its own top margin, it stays as is, and therefore the pre-existing vertical rhythm of the document is undisturbed. If that combined margin would be smaller, it is grown to that size. This means that the wpt test block ensures that there's always enough vertical space to insert the summary, without adding more than is needed. */ .wpt-tests-block:not([open]){ padding: 0; border: none; background: none; font-size: 0.75em; line-height: 1; position: relative; margin: 1em 0 0; } .wpt-tests-block:not([open]) summary { position: absolute; right: 0; bottom: 0; } /* It is possible that both the last child of a block element and the block element itself would be annotated with a <wpt> block each. If the block element has a padding or a border, that's fine, but otherwise the bottom margin of the block and of its last child would collapse and both <wpt> elements would overlap, being both placed there. To avoid that, add 1px of padding to the <wpt> element annotating the last child to prevent the bottom margin of the block and of its last child from collapsing (and as much negative margin, as wel only want to prevent margin collapsing, but are not trying to actually take more space). */ .wpt-tests-block:not([open]):last-child { padding-bottom: 1px; margin-bottom: -1px; } /* Exception to the previous rule: don't do that in non-last list items, because it's not necessary, and would therefore consume more space than strictly needed. Lists must have list items as children, not <wpt> elements, so a <wpt> element cannot be a sibling of a list item, and the collision that the previous rule avoids cannot happen. */ li:not(:last-child) > .wpt-tests-block:not([open]):last-child, dd:not(:last-child) > .wpt-tests-block:not([open]):last-child { padding-bottom: 0; margin-bottom: 0; } .wpt-tests-block:not([open]):not(:hover){ opacity: 0.5; } .wpt-tests-list { list-style: none; display: grid; margin: 0; padding: 0; grid-template-columns: 1fr max-content auto auto; grid-column-gap: .5em; } .wpt-tests-block hr:last-child { display: none; } .wpt-test { display: contents; } .wpt-test > a { text-decoration: underline; border: none; } .wpt-test > .wpt-name { grid-column: 1; } .wpt-test > .wpt-results { grid-column: 2; } .wpt-test > .wpt-live { grid-column: 3; } .wpt-test > .wpt-source { grid-column: 4; } .wpt-test > .wpt-results { display: flex; gap: .1em; } .wpt-test .wpt-result { display: inline-block; height: 1em; width: 1em; border-radius: 50%; position: relative; } </style> <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/#ED">Editor’s Draft</a>, <time class="dt-updated" datetime="2024-07-31">31 July 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://drafts.csswg.org/css-values-3/">https://drafts.csswg.org/css-values-3/</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>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. <script> const githubPrefix = "https://w3c.github.io/csswg-drafts/"; if(location.href.slice(0, githubPrefix.length) == githubPrefix) { const suffix = location.href.slice(githubPrefix.length); const draftUrl = "https://drafts.csswg.org/" + suffix; window.location.replace(draftUrl); } </script> </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> This is a public copy of the editors’ draft. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C. Don’t cite this document other than as 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/policies/process/20231103/" id="w3c_process_revision">03 November 2023 W3C Process Document</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"><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"><string></span> type</span></a> <li> <a href="#urls"><span class="secno">3.4</span> <span class="content"> Resource Locators: the <span class="production"><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"><integer></span> type</span></a> <li><a href="#numbers"><span class="secno">4.3</span> <span class="content"> Real Numbers: the <span class="production"><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"><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"><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"><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"><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"><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"><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"><color></span> type</span></a> <li><a href="#images"><span class="secno">7.2</span> <span class="content"> Images: the <span class="production"><image></span> type</span></a> <li><a href="#position"><span class="secno">7.3</span> <span class="content"> 2D Positioning: the <span class="production"><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> </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"><</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"><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"><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://drafts.csswg.org/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"><</span> and <span class="css">></span> (e.g., <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①"><length></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value"><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"><</span> and <span class="css">></span>, e.g., <a class="production css" data-link-type="property" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-width" id="ref-for-propdef-border-width"><'border-width'></a>, <a class="production css" data-link-type="property" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-background-attachment" id="ref-for-propdef-background-attachment"><'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://drafts.csswg.org/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"><custom-ident></a> <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value"><integer></a>? ]#</span>, then <span class="css"><'pairing'></span> is equivalent to <span class="css">[ <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value①"><custom-ident></a> <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①"><integer></a>? ]</span>, not <span class="css">[ <a class="production css" data-link-type="type" href="#identifier-value" id="ref-for-identifier-value②"><custom-ident></a> <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value②"><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://drafts.csswg.org/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"><</span> and <span class="css">></span>, e.g. <a class="production css" data-link-type="function" href="#funcdef-calc" id="ref-for-funcdef-calc"><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"><</span> and <span class="css">></span>, as in <a class="production css" data-link-type="type"><spacing-limit></a>. Notice the distinction between <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/#value-def-border-width" id="ref-for-value-def-border-width"><border-width></a> and <a class="production css" data-link-type="property" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-width" id="ref-for-propdef-border-width①"><'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://drafts.csswg.org/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"><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"><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://drafts.csswg.org/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">&&</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 && e f <c- p>[</c-> a b <c- p>]</c-> | <c- p>[</c-> c || <c- p>[</c-> d && <c- p>[</c-> e f <c- p>]]]</c-> </pre> <p>For reorderable combinators (||, &&), 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"><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://drafts.csswg.org/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://drafts.csswg.org/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 && B && 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://drafts.csswg.org/css-syntax-3/#typedef-dimension-token" id="ref-for-typedef-dimension-token"><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://drafts.csswg.org/css-break-3/#propdef-orphans" id="ref-for-propdef-orphans">orphans</a> <td><integer> <td><span class="css">3</span> <tr> <td><a class="property css" data-link-type="property" href="https://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/css-box-4/#propdef-padding-top" id="ref-for-propdef-padding-top">padding-top</a> <td><length> | <percentage> <td><span class="css">5%</span> <tr> <td><a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-ui-4/#propdef-outline-color" id="ref-for-propdef-outline-color">outline-color</a> <td><color> | invert <td><span class="css">#fefefe</span> <tr> <td><a class="property css" data-link-type="property" href="https://drafts.csswg.org/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://drafts.csswg.org/css-fonts-4/#propdef-font-family" id="ref-for-propdef-font-family">font-family</a> <td>[ <family-name> | <generic-family> ]# <td><span class="css">"Gill Sans", Futura, sans-serif</span> <tr> <td><a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-width" id="ref-for-propdef-border-width③">border-width</a> <td>[ <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://drafts.csswg.org/css-backgrounds-3/#propdef-box-shadow" id="ref-for-propdef-box-shadow">box-shadow</a> <td>[ inset? && <length>{2,4} && <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"><string></a>) and URLs (<a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value"><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"><ident></dfn>, consist of a sequence of characters conforming to the <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-ident-token" id="ref-for-typedef-ident-token"><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"><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③"><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">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://drafts.csswg.org/css-cascade-5/#valdef-all-initial" id="ref-for-valdef-all-initial">initial</a>, <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit" id="ref-for-valdef-all-inherit①">inherit</a> and <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-multicol/multicol-inherit-002.xht" title="css/css-multicol/multicol-inherit-002.xht">multicol-inherit-002.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-multicol/multicol-inherit-002.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-multicol/multicol-inherit-002.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-multicol/multicol-rule-color-inherit-001.xht" title="css/css-multicol/multicol-rule-color-inherit-001.xht">multicol-rule-color-inherit-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-multicol/multicol-rule-color-inherit-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-multicol/multicol-rule-color-inherit-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-multicol/multicol-rule-color-inherit-002.xht" title="css/css-multicol/multicol-rule-color-inherit-002.xht">multicol-rule-color-inherit-002.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-multicol/multicol-rule-color-inherit-002.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-multicol/multicol-rule-color-inherit-002.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-008.xht" title="css/CSS2/values/units-008.xht">units-008.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-008.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-008.xht"><small>(source)</small></a> </ul> </details> <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④"><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"><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⑤"><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⑥"><custom-ident></span>. Specifications using <span class="production" id="ref-for-identifier-value⑦"><custom-ident></span> must specify clearly what other keywords are excluded from <span class="production" id="ref-for-identifier-value⑧"><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⑨"><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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/css-easing-2/#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://drafts.csswg.org/css-easing-2/#typedef-easing-function" id="ref-for-typedef-easing-function"><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://drafts.csswg.org/css-easing-2/#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①⓪"><custom-ident></a> production belonging to <a class="property css" data-link-type="property" href="https://drafts.csswg.org/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①①"><custom-ident></a>, the <span class="production" id="ref-for-identifier-value①②"><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①"><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"><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://drafts.csswg.org/css-syntax-3/#typedef-string-token" id="ref-for-typedef-string-token"><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①"><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②"><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③"><url></span> is:</p> <pre class="prod highlight"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="url-value"><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><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><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://drafts.csswg.org/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://drafts.csswg.org/css-syntax-3/#typedef-url-token" id="ref-for-typedef-url-token"><url-token></a>; see <a href="https://drafts.csswg.org/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①"><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③"><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://drafts.csswg.org/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④"><url></a> to be represented by a bare <a class="production css" data-link-type="type" href="#string-value" id="ref-for-string-value④"><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⑤"><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://drafts.csswg.org/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"><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"><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⑥"><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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/urls/empty.html" title="css/css-values/urls/empty.html">empty.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/urls/empty.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/urls/empty.html"><small>(source)</small></a> </ul> </details> <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"><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②"><url-modifier></a> is either an <a class="production css" data-link-type="type" href="#typedef-ident" id="ref-for-typedef-ident①"><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③"><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⑦"><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④"><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://drafts.csswg.org/css-cascade-5/#specified-value" id="ref-for-specified-value">specified</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/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③"><integer></a>, <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value"><number></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①"><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②"><length></a>, <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value"><angle></a>, <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value"><time></a>, <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value"><frequency></a>, and <a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value"><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://drafts.csswg.org/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④"><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①"><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://drafts.csswg.org/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③"><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①"><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⑤"><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"><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://drafts.csswg.org/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token"><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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-multicol/multicol-count-non-integer-001.xht" title="css/css-multicol/multicol-count-non-integer-001.xht">multicol-count-non-integer-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-multicol/multicol-count-non-integer-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-multicol/multicol-count-non-integer-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-multicol/multicol-count-non-integer-002.xht" title="css/css-multicol/multicol-count-non-integer-002.xht">multicol-count-non-integer-002.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-multicol/multicol-count-non-integer-002.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-multicol/multicol-count-non-integer-002.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-multicol/multicol-count-non-integer-003.xht" title="css/css-multicol/multicol-count-non-integer-003.xht">multicol-count-non-integer-003.xht</a> <a class="wpt-live" href="http://wpt.live/css/css-multicol/multicol-count-non-integer-003.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-multicol/multicol-count-non-integer-003.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-001.xht" title="css/CSS2/values/numbers-units-001.xht">numbers-units-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-004.xht" title="css/CSS2/values/numbers-units-004.xht">numbers-units-004.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-004.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-004.xht"><small>(source)</small></a> </ul> </details> <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①"><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"><number></dfn>, and represent real numbers, possibly with a fractional component.</p> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-animations/animation-iteration-count-calc.html" title="css/css-animations/animation-iteration-count-calc.html">animation-iteration-count-calc.html</a> <a class="wpt-live" href="http://wpt.live/css/css-animations/animation-iteration-count-calc.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-animations/animation-iteration-count-calc.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-003.xht" title="css/CSS2/values/numbers-units-003.xht">numbers-units-003.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-003.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-003.xht"><small>(source)</small></a> </ul> </details> <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://drafts.csswg.org/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token①"><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"><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://drafts.csswg.org/css-syntax-3/#typedef-dimension-token" id="ref-for-typedef-dimension-token①"><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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/angle-units-003.html" title="css/css-values/angle-units-003.html">angle-units-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/angle-units-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/angle-units-003.html"><small>(source)</small></a> </ul> </details> <p>CSS uses <a class="production css" data-link-type="type" href="#typedef-dimension" id="ref-for-typedef-dimension"><dimension></a>s to specify distances (<a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value④"><length></a>), durations (<a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value②"><time></a>), frequencies (<a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value①"><frequency></a>), resolutions (<a class="production css" data-link-type="type" href="#resolution-value" id="ref-for-resolution-value①"><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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-serialization-002.html" title="css/css-values/calc-serialization-002.html">calc-serialization-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-serialization-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-serialization-002.html"><small>(source)</small></a> </ul> </details> <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②"><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"><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://drafts.csswg.org/css-syntax-3/#typedef-percentage-token" id="ref-for-typedef-percentage-token"><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://drafts.csswg.org/css-display-4/#containing-block" id="ref-for-containing-block">containing block</a>), or something else.</p> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-016.xht" title="css/CSS2/values/numbers-units-016.xht">numbers-units-016.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-016.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-016.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-017.xht" title="css/CSS2/values/numbers-units-017.xht">numbers-units-017.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-017.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-017.xht"><small>(source)</small></a> </ul> </details> <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③"><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://drafts.csswg.org/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"><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⑤"><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④"><percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑤"><percentage></a> will resolve to a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value⑥"><length></a>.</p> <dt data-md><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-frequency-percentage"><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②"><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⑥"><percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑦"><percentage></a> will resolve to a <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value③"><frequency></a>.</p> <dt data-md><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-angle-percentage"><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②"><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⑧"><percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value⑨"><percentage></a> will resolve to an <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value③"><angle></a>.</p> <dt data-md><dfn class="dfn-paneled css" data-dfn-type="type" data-export id="typedef-time-percentage"><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③"><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①⓪"><percentage></a> <c- p>]</c-></code>, where the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①①"><percentage></a> will resolve to a <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value④"><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://drafts.csswg.org/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⑦"><length></a> or a <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①②"><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://drafts.csswg.org/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①③"><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①④"><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 <<var>type</var>-percentage> productions can be added in the future as needed. A <number-percentage> will never be added, as <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value②"><number></a> and <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑤"><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⑧"><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"><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③"><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④"><number></span> or a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value⑨"><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⑤"><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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/mediaqueries/min-width-001.xht" title="css/mediaqueries/min-width-001.xht">min-width-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/mediaqueries/min-width-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/mediaqueries/min-width-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-005.xht" title="css/CSS2/values/numbers-units-005.xht">numbers-units-005.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-005.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-005.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-006.xht" title="css/CSS2/values/numbers-units-006.xht">numbers-units-006.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-006.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-006.xht"><small>(source)</small></a> </ul> </details> <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://drafts.csswg.org/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://drafts.csswg.org/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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-unit-analysis.html" title="css/css-values/calc-unit-analysis.html">calc-unit-analysis.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-unit-analysis.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-unit-analysis.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-circle-002.html" title="css/css-shapes/shape-outside/values/shape-outside-circle-002.html">shape-outside-circle-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-circle-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-circle-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-circle-004.html" title="css/css-shapes/shape-outside/values/shape-outside-circle-004.html">shape-outside-circle-004.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-circle-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-circle-004.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-ellipse-002.html" title="css/css-shapes/shape-outside/values/shape-outside-ellipse-002.html">shape-outside-ellipse-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-ellipse-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-ellipse-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-ellipse-004.html" title="css/css-shapes/shape-outside/values/shape-outside-ellipse-004.html">shape-outside-ellipse-004.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-ellipse-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-ellipse-004.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-inset-003.html" title="css/css-shapes/shape-outside/values/shape-outside-inset-003.html">shape-outside-inset-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-inset-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-inset-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-polygon-004.html" title="css/css-shapes/shape-outside/values/shape-outside-polygon-004.html">shape-outside-polygon-004.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-polygon-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-polygon-004.html"><small>(source)</small></a> </ul> </details> <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://drafts.csswg.org/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://drafts.csswg.org/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 caniuse-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. <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-rem-lang.html" title="css/css-values/calc-rem-lang.html">calc-rem-lang.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-rem-lang.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-rem-lang.html"><small>(source)</small></a> </ul> </details> <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://drafts.csswg.org/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. <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ex-unit-001.html" title="css/css-values/ex-unit-001.html">ex-unit-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ex-unit-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ex-unit-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ex-unit-002.html" title="css/css-values/ex-unit-002.html">ex-unit-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ex-unit-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ex-unit-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ex-unit-003.html" title="css/css-values/ex-unit-003.html">ex-unit-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ex-unit-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ex-unit-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-007.xht" title="css/CSS2/values/numbers-units-007.xht">numbers-units-007.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-007.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-007.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-009.xht" title="css/CSS2/values/numbers-units-009.xht">numbers-units-009.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-009.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-009.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-010.xht" title="css/CSS2/values/numbers-units-010.xht">numbers-units-010.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-010.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-010.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-011.xht" title="css/CSS2/values/numbers-units-011.xht">numbers-units-011.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-011.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-011.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-012.xht" title="css/CSS2/values/numbers-units-012.xht">numbers-units-012.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-012.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-012.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-013.xht" title="css/CSS2/values/numbers-units-013.xht">numbers-units-013.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-013.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-013.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-015.xht" title="css/CSS2/values/numbers-units-015.xht">numbers-units-015.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-015.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-015.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/numbers-units-019.xht" title="css/CSS2/values/numbers-units-019.xht">numbers-units-019.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/numbers-units-019.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/numbers-units-019.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-001.xht" title="css/CSS2/values/units-001.xht">units-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-002.xht" title="css/CSS2/values/units-002.xht">units-002.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-002.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-002.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-003.xht" title="css/CSS2/values/units-003.xht">units-003.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-003.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-003.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-004.xht" title="css/CSS2/values/units-004.xht">units-004.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-004.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-004.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-005.xht" title="css/CSS2/values/units-005.xht">units-005.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-005.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-005.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-ch-ex-lang.html" title="css/css-values/calc-ch-ex-lang.html">calc-ch-ex-lang.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-ch-ex-lang.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-ch-ex-lang.html"><small>(source)</small></a> </ul> </details> <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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-upright" id="ref-for-valdef-text-orientation-upright">upright</a>).</p> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-001.html" title="css/css-values/ch-unit-001.html">ch-unit-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-002.html" title="css/css-values/ch-unit-002.html">ch-unit-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-003.html" title="css/css-values/ch-unit-003.html">ch-unit-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-004.html" title="css/css-values/ch-unit-004.html">ch-unit-004.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-004.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-008.html" title="css/css-values/ch-unit-008.html">ch-unit-008.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-008.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-008.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-009.html" title="css/css-values/ch-unit-009.html">ch-unit-009.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-009.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-009.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-010.html" title="css/css-values/ch-unit-010.html">ch-unit-010.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-010.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-010.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-011.html" title="css/css-values/ch-unit-011.html">ch-unit-011.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-011.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-011.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-012.html" title="css/css-values/ch-unit-012.html">ch-unit-012.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-012.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-012.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-016.html" title="css/css-values/ch-unit-016.html">ch-unit-016.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-016.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-016.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ch-unit-017.html" title="css/css-values/ch-unit-017.html">ch-unit-017.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ch-unit-017.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ch-unit-017.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/line-break-ch-unit.html" title="css/css-values/line-break-ch-unit.html">line-break-ch-unit.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/line-break-ch-unit.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/line-break-ch-unit.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-ch-ex-lang.html" title="css/css-values/calc-ch-ex-lang.html">calc-ch-ex-lang.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-ch-ex-lang.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-ch-ex-lang.html"><small>(source)</small></a> </ul> </details> </dl> <p>When used outside the context of an element (such as in <a data-link-type="dfn" href="https://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/mediaqueries-5/#continuous-media" id="ref-for-continuous-media">continuous media</a>) or the <a data-link-type="dfn" href="https://drafts.csswg.org/css-page-3/#page-area" id="ref-for-page-area">page area</a> (for <a data-link-type="dfn" href="https://drafts.csswg.org/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://drafts.csswg.org/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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-calc-support-pct.html" title="css/css-values/vh-calc-support-pct.html">vh-calc-support-pct.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-calc-support-pct.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-calc-support-pct.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-calc-support.html" title="css/css-values/vh-calc-support.html">vh-calc-support.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-calc-support.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-calc-support.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-em-inherit.html" title="css/css-values/vh-em-inherit.html">vh-em-inherit.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-em-inherit.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-em-inherit.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-inherit.html" title="css/css-values/vh-inherit.html">vh-inherit.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-inherit.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-inherit.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-interpolate-pct.html" title="css/css-values/vh-interpolate-pct.html">vh-interpolate-pct.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-interpolate-pct.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-interpolate-pct.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-interpolate-px.html" title="css/css-values/vh-interpolate-px.html">vh-interpolate-px.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-interpolate-px.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-interpolate-px.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-interpolate-vh.html" title="css/css-values/vh-interpolate-vh.html">vh-interpolate-vh.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-interpolate-vh.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-interpolate-vh.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-support.html" title="css/css-values/vh-support.html">vh-support.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-support.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-support.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-support-margin.html" title="css/css-values/vh-support-margin.html">vh-support-margin.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-support-margin.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-support-margin.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-support-transform-origin.html" title="css/css-values/vh-support-transform-origin.html">vh-support-transform-origin.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-support-transform-origin.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-support-transform-origin.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-support-transform-translate.html" title="css/css-values/vh-support-transform-translate.html">vh-support-transform-translate.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-support-transform-translate.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-support-transform-translate.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-zero-support.html" title="css/css-values/vh-zero-support.html">vh-zero-support.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-zero-support.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-zero-support.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh_not_refreshing_on_chrome.html" title="css/css-values/vh_not_refreshing_on_chrome.html">vh_not_refreshing_on_chrome.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh_not_refreshing_on_chrome.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh_not_refreshing_on_chrome.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/viewport-relative-lengths-scaled-viewport.html" title="css/css-values/viewport-relative-lengths-scaled-viewport.html">viewport-relative-lengths-scaled-viewport.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/viewport-relative-lengths-scaled-viewport.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/viewport-relative-lengths-scaled-viewport.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/viewport-unit-011.html" title="css/css-values/viewport-unit-011.html">viewport-unit-011.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/viewport-unit-011.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/viewport-unit-011.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/viewport-units-css2-001.html" title="css/css-values/viewport-units-css2-001.html">viewport-units-css2-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/viewport-units-css2-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/viewport-units-css2-001.html"><small>(source)</small></a> </ul> </details> <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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/absolute-length-units-001.html" title="css/css-values/absolute-length-units-001.html">absolute-length-units-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/absolute-length-units-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/absolute-length-units-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/q-unit-case-insensitivity-001.html" title="css/css-values/q-unit-case-insensitivity-001.html">q-unit-case-insensitivity-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/q-unit-case-insensitivity-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/q-unit-case-insensitivity-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/q-unit-case-insensitivity-002.html" title="css/css-values/q-unit-case-insensitivity-002.html">q-unit-case-insensitivity-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/q-unit-case-insensitivity-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/q-unit-case-insensitivity-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-001.xht" title="css/CSS2/values/units-001.xht">units-001.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-001.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-001.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-006.xht" title="css/CSS2/values/units-006.xht">units-006.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-006.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-006.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-008.xht" title="css/CSS2/values/units-008.xht">units-008.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-008.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-008.xht"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/CSS2/values/units-009.xht" title="css/CSS2/values/units-009.xht">units-009.xht</a> <a class="wpt-live" href="http://wpt.live/css/CSS2/values/units-009.xht"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/CSS2/values/units-009.xht"><small>(source)</small></a> </ul> </details> <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'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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/absolute-length-units-001.html" title="css/css-values/absolute-length-units-001.html">absolute-length-units-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/absolute-length-units-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/absolute-length-units-001.html"><small>(source)</small></a> </ul> </details> <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④"><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①"><dimension></a>s denoted by <dfn class="dfn-paneled css" data-dfn-type="type" data-export id="angle-value"><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⑤"><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://drafts.csswg.org/css-images-3/#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⑥"><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⑦"><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⑧"><angle></span> type.</p> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/angle-units-001.html" title="css/css-values/angle-units-001.html">angle-units-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/angle-units-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/angle-units-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/angle-units-002.html" title="css/css-values/angle-units-002.html">angle-units-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/angle-units-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/angle-units-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/angle-units-003.html" title="css/css-values/angle-units-003.html">angle-units-003.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/angle-units-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/angle-units-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/angle-units-004.html" title="css/css-values/angle-units-004.html">angle-units-004.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/angle-units-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/angle-units-004.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/angle-units-005.html" title="css/css-values/angle-units-005.html">angle-units-005.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/angle-units-005.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/angle-units-005.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-angle-values.html" title="css/css-values/calc-angle-values.html">calc-angle-values.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-angle-values.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-angle-values.html"><small>(source)</small></a> </ul> </details> <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⑤"><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"><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⑥"><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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-time-values.html" title="css/css-values/calc-time-values.html">calc-time-values.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-time-values.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-time-values.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-transitions/transition-delay-001.html" title="css/css-transitions/transition-delay-001.html">transition-delay-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-transitions/transition-delay-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-transitions/transition-delay-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-transitions/transition-duration-001.html" title="css/css-transitions/transition-duration-001.html">transition-duration-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-transitions/transition-duration-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-transitions/transition-duration-001.html"><small>(source)</small></a> </ul> </details> <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④"><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"><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⑤"><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②"><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"><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③"><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://drafts.csswg.org/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④"><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⑤"><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://drafts.csswg.org/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://drafts.csswg.org/css-color-5/#typedef-color" id="ref-for-typedef-color"><color></a> type</span><a class="self-link" href="#colors"></a></h3> <p>The <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-color-5/#typedef-color" id="ref-for-typedef-color①"><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②"><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://drafts.csswg.org/css-images-3/#typedef-image" id="ref-for-typedef-image"><image></a> type</span><a class="self-link" href="#images"></a></h3> <p>The <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-images-3/#typedef-image" id="ref-for-typedef-image①"><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②"><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③"><image></span> as <a class="production css" data-link-type="type" href="#url-value" id="ref-for-url-value⑧"><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"><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①"><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://drafts.csswg.org/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②"><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"><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">&&</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①"><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②"><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③"><length-percentage></a> <c- p>]</c-> <a data-link-type="grammar" href="#comb-all" id="ref-for-comb-all①">&&</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④"><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://drafts.csswg.org/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①⓪"><length></a>s, or <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑥"><percentage></a>s, <a class="production css" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position③"><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://drafts.csswg.org/css-transforms-1/#propdef-transform-origin" id="ref-for-propdef-transform-origin">transform-origin</a> defines a 3D position as (effectively) <span class="css"><position> <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④"><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⑤"><position></span> followed by a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①①"><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://drafts.csswg.org/css-syntax-3/#typedef-function-token" id="ref-for-typedef-function-token"><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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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①②"><length></a>, <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value⑥"><frequency></a>, <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value⑨"><angle></a>, <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value⑦"><time></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑦"><percentage></a>, <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value⑥"><number></a>, or <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value⑥"><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://drafts.csswg.org/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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-in-calc.html" title="css/css-values/calc-in-calc.html">calc-in-calc.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-in-calc.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-in-calc.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-in-counter-001.xhtml" title="css/css-values/calc-in-counter-001.xhtml">calc-in-counter-001.xhtml</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-in-counter-001.xhtml"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-in-counter-001.xhtml"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-in-media-queries-001.html" title="css/css-values/calc-in-media-queries-001.html">calc-in-media-queries-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-in-media-queries-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-in-media-queries-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-in-media-queries-002.html" title="css/css-values/calc-in-media-queries-002.html">calc-in-media-queries-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-in-media-queries-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-in-media-queries-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-invalid-range-clamping.html" title="css/css-values/calc-invalid-range-clamping.html">calc-invalid-range-clamping.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-invalid-range-clamping.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-invalid-range-clamping.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-min-height.html" title="css/css-values/calc-min-height.html">calc-min-height.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-min-height.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-min-height.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-nesting.html" title="css/css-values/calc-nesting.html">calc-nesting.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-nesting.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-nesting.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-parenthesis-stack.html" title="css/css-values/calc-parenthesis-stack.html">calc-parenthesis-stack.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-parenthesis-stack.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-parenthesis-stack.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-background-image-gradient-1.html" title="css/css-values/calc-background-image-gradient-1.html">calc-background-image-gradient-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-background-image-gradient-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-background-image-gradient-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-background-linear-gradient-1.html" title="css/css-values/calc-background-linear-gradient-1.html">calc-background-linear-gradient-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-background-linear-gradient-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-background-linear-gradient-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-background-position-1.html" title="css/css-values/calc-background-position-1.html">calc-background-position-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-background-position-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-background-position-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-background-size-1.html" title="css/css-values/calc-background-size-1.html">calc-background-size-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-background-size-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-background-size-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-border-radius-1.html" title="css/css-values/calc-border-radius-1.html">calc-border-radius-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-border-radius-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-border-radius-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-height-block-1.html" title="css/css-values/calc-height-block-1.html">calc-height-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-height-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-height-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-height-table-1.html" title="css/css-values/calc-height-table-1.html">calc-height-table-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-height-table-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-height-table-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-margin-block-1.html" title="css/css-values/calc-margin-block-1.html">calc-margin-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-margin-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-margin-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-max-height-block-1.html" title="css/css-values/calc-max-height-block-1.html">calc-max-height-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-max-height-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-max-height-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-max-width-block-1.html" title="css/css-values/calc-max-width-block-1.html">calc-max-width-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-max-width-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-max-width-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-max-width-block-intrinsic-1.html" title="css/css-values/calc-max-width-block-intrinsic-1.html">calc-max-width-block-intrinsic-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-max-width-block-intrinsic-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-max-width-block-intrinsic-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-min-height-block-1.html" title="css/css-values/calc-min-height-block-1.html">calc-min-height-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-min-height-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-min-height-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-min-width-block-1.html" title="css/css-values/calc-min-width-block-1.html">calc-min-width-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-min-width-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-min-width-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-min-width-block-intrinsic-1.html" title="css/css-values/calc-min-width-block-intrinsic-1.html">calc-min-width-block-intrinsic-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-min-width-block-intrinsic-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-min-width-block-intrinsic-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-absolute-bottom-1.html" title="css/css-values/calc-offsets-absolute-bottom-1.html">calc-offsets-absolute-bottom-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-absolute-bottom-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-absolute-bottom-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-absolute-left-1.html" title="css/css-values/calc-offsets-absolute-left-1.html">calc-offsets-absolute-left-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-absolute-left-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-absolute-left-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-absolute-right-1.html" title="css/css-values/calc-offsets-absolute-right-1.html">calc-offsets-absolute-right-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-absolute-right-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-absolute-right-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-absolute-top-1.html" title="css/css-values/calc-offsets-absolute-top-1.html">calc-offsets-absolute-top-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-absolute-top-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-absolute-top-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-relative-bottom-1.html" title="css/css-values/calc-offsets-relative-bottom-1.html">calc-offsets-relative-bottom-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-relative-bottom-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-relative-bottom-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-relative-left-1.html" title="css/css-values/calc-offsets-relative-left-1.html">calc-offsets-relative-left-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-relative-left-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-relative-left-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-relative-right-1.html" title="css/css-values/calc-offsets-relative-right-1.html">calc-offsets-relative-right-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-relative-right-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-relative-right-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-offsets-relative-top-1.html" title="css/css-values/calc-offsets-relative-top-1.html">calc-offsets-relative-top-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-offsets-relative-top-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-offsets-relative-top-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-padding-block-1.html" title="css/css-values/calc-padding-block-1.html">calc-padding-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-padding-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-padding-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-text-indent-1.html" title="css/css-values/calc-text-indent-1.html">calc-text-indent-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-text-indent-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-text-indent-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-text-indent-intrinsic-1.html" title="css/css-values/calc-text-indent-intrinsic-1.html">calc-text-indent-intrinsic-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-text-indent-intrinsic-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-text-indent-intrinsic-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-transform-origin-1.html" title="css/css-values/calc-transform-origin-1.html">calc-transform-origin-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-transform-origin-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-transform-origin-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-vertical-align-1.html" title="css/css-values/calc-vertical-align-1.html">calc-vertical-align-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-vertical-align-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-vertical-align-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-width-block-1.html" title="css/css-values/calc-width-block-1.html">calc-width-block-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-width-block-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-width-block-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-width-block-intrinsic-1.html" title="css/css-values/calc-width-block-intrinsic-1.html">calc-width-block-intrinsic-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-width-block-intrinsic-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-width-block-intrinsic-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-width-table-auto-1.html" title="css/css-values/calc-width-table-auto-1.html">calc-width-table-auto-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-width-table-auto-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-width-table-auto-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-width-table-fixed-1.html" title="css/css-values/calc-width-table-fixed-1.html">calc-width-table-fixed-1.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-width-table-fixed-1.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-width-table-fixed-1.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/mediaqueries/mq-calc-001.html" title="css/mediaqueries/mq-calc-001.html">mq-calc-001.html</a> <a class="wpt-live" href="http://wpt.live/css/mediaqueries/mq-calc-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/mediaqueries/mq-calc-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/mediaqueries/mq-calc-002.html" title="css/mediaqueries/mq-calc-002.html">mq-calc-002.html</a> <a class="wpt-live" href="http://wpt.live/css/mediaqueries/mq-calc-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/mediaqueries/mq-calc-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/mediaqueries/mq-calc-003.html" title="css/mediaqueries/mq-calc-003.html">mq-calc-003.html</a> <a class="wpt-live" href="http://wpt.live/css/mediaqueries/mq-calc-003.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/mediaqueries/mq-calc-003.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/mediaqueries/mq-calc-004.html" title="css/mediaqueries/mq-calc-004.html">mq-calc-004.html</a> <a class="wpt-live" href="http://wpt.live/css/mediaqueries/mq-calc-004.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/mediaqueries/mq-calc-004.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/mediaqueries/mq-calc-005.html" title="css/mediaqueries/mq-calc-005.html">mq-calc-005.html</a> <a class="wpt-live" href="http://wpt.live/css/mediaqueries/mq-calc-005.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/mediaqueries/mq-calc-005.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/motion/offset-supports-calc.html" title="css/motion/offset-supports-calc.html">offset-supports-calc.html</a> <a class="wpt-live" href="http://wpt.live/css/motion/offset-supports-calc.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/motion/offset-supports-calc.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-circle-010.html" title="css/css-shapes/shape-outside/values/shape-outside-circle-010.html">shape-outside-circle-010.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-circle-010.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-circle-010.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-circle-011.html" title="css/css-shapes/shape-outside/values/shape-outside-circle-011.html">shape-outside-circle-011.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-circle-011.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-circle-011.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html" title="css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html">shape-outside-ellipse-010.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-ellipse-010.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-ellipse-011.html" title="css/css-shapes/shape-outside/values/shape-outside-ellipse-011.html">shape-outside-ellipse-011.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-ellipse-011.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-ellipse-011.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-inset-008.html" title="css/css-shapes/shape-outside/values/shape-outside-inset-008.html">shape-outside-inset-008.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-inset-008.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-inset-008.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-inset-009.html" title="css/css-shapes/shape-outside/values/shape-outside-inset-009.html">shape-outside-inset-009.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-inset-009.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-inset-009.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-shapes/shape-outside/values/shape-outside-polygon-006.html" title="css/css-shapes/shape-outside/values/shape-outside-polygon-006.html">shape-outside-polygon-006.html</a> <a class="wpt-live" href="http://wpt.live/css/css-shapes/shape-outside/values/shape-outside-polygon-006.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-shapes/shape-outside/values/shape-outside-polygon-006.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-transforms/transforms-support-calc.html" title="css/css-transforms/transforms-support-calc.html">transforms-support-calc.html</a> <a class="wpt-live" href="http://wpt.live/css/css-transforms/transforms-support-calc.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-transforms/transforms-support-calc.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-calc-support-pct.html" title="css/css-values/vh-calc-support-pct.html">vh-calc-support-pct.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-calc-support-pct.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-calc-support-pct.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/vh-calc-support.html" title="css/css-values/vh-calc-support.html">vh-calc-support.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/vh-calc-support.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/vh-calc-support.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-ch-ex-lang.html" title="css/css-values/calc-ch-ex-lang.html">calc-ch-ex-lang.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-ch-ex-lang.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-ch-ex-lang.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-in-color-001.html" title="css/css-values/calc-in-color-001.html">calc-in-color-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-in-color-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-in-color-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-in-font-feature-settings.html" title="css/css-values/calc-in-font-feature-settings.html">calc-in-font-feature-settings.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-in-font-feature-settings.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-in-font-feature-settings.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-rem-lang.html" title="css/css-values/calc-rem-lang.html">calc-rem-lang.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-rem-lang.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-rem-lang.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-rounding-001.html" title="css/css-values/calc-rounding-001.html">calc-rounding-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-rounding-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-rounding-001.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/ex-calc-expression-001.html" title="css/css-values/ex-calc-expression-001.html">ex-calc-expression-001.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/ex-calc-expression-001.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/ex-calc-expression-001.html"><small>(source)</small></a> </ul> </details> <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⑨"><<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"><calc-sum></a> <c- p>)</c-> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-sum"><calc-sum></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-product" id="ref-for-typedef-calc-product"><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①"><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"><calc-product></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-value" id="ref-for-typedef-calc-value"><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①"><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"><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"><calc-value></dfn> = <a class="production" data-link-type="type" href="#number-value" id="ref-for-number-value⑦"><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②"><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①⑧"><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①"><calc-sum></a> <c- p>)</c-> <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-calc-number-sum"><calc-number-sum></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-number-product" id="ref-for-typedef-calc-number-product"><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①"><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"><calc-number-product></dfn> = <a class="production" data-link-type="type" href="#typedef-calc-number-value" id="ref-for-typedef-calc-number-value①"><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②"><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③"><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"><calc-number-value></dfn> = <a class="production" data-link-type="type" href="#number-value" id="ref-for-number-value⑧"><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"><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://drafts.csswg.org/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://drafts.csswg.org/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①③"><length></a>, <a class="production css" data-link-type="type" href="#frequency-value" id="ref-for-frequency-value⑦"><frequency></a>, <a class="production css" data-link-type="type" href="#angle-value" id="ref-for-angle-value①⓪"><angle></a>, <a class="production css" data-link-type="type" href="#time-value" id="ref-for-time-value⑧"><time></a>, <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value①⑨"><percentage></a>, <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value⑨"><number></a>, or <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value⑦"><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://drafts.csswg.org/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token②"><number-token></a>s are of type <span class="production" id="ref-for-number-value①⓪"><number></span> or <span class="production" id="ref-for-integer-value⑧"><integer></span>. A <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-dimension-token" id="ref-for-typedef-dimension-token②"><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①④"><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①①"><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://drafts.csswg.org/css-syntax-3/#typedef-number-token" id="ref-for-typedef-number-token③"><number-token></a>s are always interpreted as <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①①"><number></a>s or <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value⑨"><integer></a>s, "unitless 0" <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑤"><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://drafts.csswg.org/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①②"><number></a>, a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-syntax-3/#typedef-percentage-token" id="ref-for-typedef-percentage-token①"><percentage-token></a> is treated as that type. For example, in the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/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①⑥"><length></a> type. A percentage only has the <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value②⓪"><percentage></a> type if in that context <span class="production" id="ref-for-percentage-value②①"><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②②"><percentage></a>s relative to <a class="production css" data-link-type="type" href="#number-value" id="ref-for-number-value①③"><number></a>s, such as in <a class="property css" data-link-type="property" href="https://drafts.csswg.org/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③"><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①④"><number></a> becomes a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑦"><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://drafts.csswg.org/css-text-4/#propdef-tab-size" id="ref-for-propdef-tab-size">tab-size</a>), <span class="production" id="ref-for-number-value①⑤"><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①⑥"><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://drafts.csswg.org/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①⑦"><number></a> and the other is an <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①⓪"><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①⑧"><number></span> and the other is an <span class="production" id="ref-for-integer-value①①"><integer></span>, resolve to <span class="production" id="ref-for-number-value①⑨"><number></span>. <li> At <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/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②⓪"><number></a>. If both sides are <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①②"><integer></a>, resolve to <span class="production" id="ref-for-integer-value①③"><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②①"><number></a>. If the left side is <a class="production css" data-link-type="type" href="#integer-value" id="ref-for-integer-value①④"><integer></a>, resolve to <span class="production" id="ref-for-number-value②②"><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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-unit-analysis.html" title="css/css-values/calc-unit-analysis.html">calc-unit-analysis.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-unit-analysis.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-unit-analysis.html"><small>(source)</small></a> </ul> </details> <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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/css-sizing-3/#valdef-width-auto" id="ref-for-valdef-width-auto">auto</a> had been specified.</p> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-background-position-002.html" title="css/css-values/calc-background-position-002.html">calc-background-position-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-background-position-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-background-position-002.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-letter-spacing.html" title="css/css-values/calc-letter-spacing.html">calc-letter-spacing.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-letter-spacing.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-letter-spacing.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-numbers.html" title="css/css-values/calc-numbers.html">calc-numbers.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-numbers.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-numbers.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-time-values.html" title="css/css-values/calc-time-values.html">calc-time-values.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-time-values.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-time-values.html"><small>(source)</small></a> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/getComputedStyle-border-radius-002.html" title="css/css-values/getComputedStyle-border-radius-002.html">getComputedStyle-border-radius-002.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/getComputedStyle-border-radius-002.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/getComputedStyle-border-radius-002.html"><small>(source)</small></a> </ul> </details> <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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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://drafts.csswg.org/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> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <ul class="wpt-tests-list"> <li class="wpt-test"><a class="wpt-name" href="https://wpt.fyi/results/css/css-values/calc-numbers.html" title="css/css-values/calc-numbers.html">calc-numbers.html</a> <a class="wpt-live" href="http://wpt.live/css/css-values/calc-numbers.html"><small>(live test)</small></a> <a class="wpt-source" href="https://github.com/web-platform-tests/wpt/blob/master/css/css-values/calc-numbers.html"><small>(source)</small></a> </ul> </details> <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 "about" 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 <<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://drafts.csswg.org/css-values-4/"><cite>CSS Values and Units Module Level 4</cite></a>.</p> <li data-md> <p>Added definition for <span class="css"><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⑥"><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"><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"><'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://drafts.csswg.org/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⑥"><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://drafts.csswg.org/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⑦"><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②③"><number></a> if it’s ambiguous whether it’s a <span class="production" id="ref-for-number-value②④"><number></span> or a <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑧"><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②⑤"><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⑨"><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②"><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⑤"><length-percentage></a> as a shorthand for <a class="production css" data-link-type="type" href="#length-value" id="ref-for-length-value①⑨"><length></a> | <a class="production css" data-link-type="type" href="#percentage-value" id="ref-for-percentage-value②③"><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②④"><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①③"><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="http://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://drafts.csswg.org/css-overflow-3/#propdef-overflow" id="ref-for-propdef-overflow">overflow</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/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://drafts.csswg.org/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①④"><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 <span class="css">string</span> or <span class="css">url</span> 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⑤"><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①⓪"><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①①"><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"><strong class=<c- s>"advisement"</c->></code>, like this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong></p> <details class="wpt-tests-block" dir="ltr" lang="en" open> <summary>Tests</summary> <p>Tests relating to the content of this specification may be documented in “Tests” blocks like this one. Any such block is non-normative.</p> <ul class="wpt-tests-list"></ul> <hr> </details> <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="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS style sheet</a>. <dt>renderer <dd>A <a href="http://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="http://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="http://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="http://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://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="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>. Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list.</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">&&</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"><angle></a><span>, in § 6.1</span> <li><a href="#typedef-angle-percentage"><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"><calc-number-product></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-number-sum"><calc-number-sum></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-number-value"><calc-number-value></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-product"><calc-product></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-sum"><calc-sum></a><span>, in § 8.1.1</span> <li><a href="#typedef-calc-value"><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"><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"><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"><frequency></a><span>, in § 6.3</span> <li><a href="#typedef-frequency-percentage"><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"><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"><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"><length></a><span>, in § 5</span> <li><a href="#typedef-length-percentage"><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"><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"><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"><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"><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"><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"><time></a><span>, in § 6.2</span> <li><a href="#typedef-time-percentage"><time-percentage></a><span>, in § 4.6</span> <li><a href="#turn">turn</a><span>, in § 6.1</span> <li><a href="#url-value"><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"><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="9bc55323">UA</span> </ul> <li> <a data-link-type="biblio">[CSS-ANIMATIONS-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="eda608e1">animation</span> <li><span class="dfn-paneled" id="d984b6fe">animation-name</span> <li><span class="dfn-paneled" id="c16b1855">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="49a5f65f">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="2589df91">orphans</span> </ul> <li> <a data-link-type="biblio">[CSS-CASCADE-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="4e55d7fb">@import</span> <li><span class="dfn-paneled" id="5d83727e">actual value</span> <li><span class="dfn-paneled" id="9cd25054">computed value</span> <li><span class="dfn-paneled" id="c388d253">inherit</span> <li><span class="dfn-paneled" id="4d7d3dcd">initial</span> <li><span class="dfn-paneled" id="1cf918c1">specified value</span> <li><span class="dfn-paneled" id="9e004c39">unset</span> <li><span class="dfn-paneled" id="a4eb3c57">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="218f0f24">hsl()</span> <li><span class="dfn-paneled" id="91bfbe18">opacity</span> <li><span class="dfn-paneled" id="dd998a01">rgba()</span> </ul> <li> <a data-link-type="biblio">[CSS-COLOR-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="1548047a"><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="6e9f0abf">disc</span> </ul> <li> <a data-link-type="biblio">[CSS-DISPLAY-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ea663a43">containing block</span> </ul> <li> <a data-link-type="biblio">[CSS-EASING-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="8095a819"><easing-function></span> <li><span class="dfn-paneled" id="f8a826f8">ease-in</span> <li><span class="dfn-paneled" id="baa03018">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="2c57f900">font</span> <li><span class="dfn-paneled" id="d65d17df">font-family</span> <li><span class="dfn-paneled" id="fdf6efd5">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="cc878a3a">fr</span> </ul> <li> <a data-link-type="biblio">[CSS-IMAGES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="539e4c80">image-resolution</span> </ul> <li> <a data-link-type="biblio">[CSS-OVERFLOW-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="8b3ca704">auto</span> <li><span class="dfn-paneled" id="86928bde">overflow</span> </ul> <li> <a data-link-type="biblio">[CSS-SIZING-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="0e5cedd7">auto</span> <li><span class="dfn-paneled" id="88643fe0">width</span> </ul> <li> <a data-link-type="biblio">[CSS-SYNTAX-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a63375cb"><dimension-token></span> <li><span class="dfn-paneled" id="af50aa62"><function-token></span> <li><span class="dfn-paneled" id="07308da5"><ident-token></span> <li><span class="dfn-paneled" id="92700be8"><number-token></span> <li><span class="dfn-paneled" id="4ffe613d"><percentage-token></span> <li><span class="dfn-paneled" id="6158d44a"><string-token></span> <li><span class="dfn-paneled" id="b7c8adc2"><url-token></span> <li><span class="dfn-paneled" id="02095ede">component value</span> <li><span class="dfn-paneled" id="41edad32">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="4356bfe3">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="0e0ffe72">center</span> <li><span class="dfn-paneled" id="8f605f43">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="5bc3d0ec">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="09f2cf3e">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="1ee7f091">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="86871698">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="2ef1aa7d">toggle()</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="3bd4bbe9">text-orientation</span> <li><span class="dfn-paneled" id="f49914d4">upright</span> <li><span class="dfn-paneled" id="d24165c7">vertical-lr</span> <li><span class="dfn-paneled" id="16b64b43">vertical-rl</span> <li><span class="dfn-paneled" id="385326d7">writing-mode</span> </ul> <li> <a data-link-type="biblio">[CSS22]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="8956a48a"><border-width></span> <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="f5eca8c9">background</span> <li><span class="dfn-paneled" id="f95a7c3b">background-attachment</span> <li><span class="dfn-paneled" id="d27a809f">background-position</span> <li><span class="dfn-paneled" id="73759fff">border-color</span> <li><span class="dfn-paneled" id="c9ecad15">border-width</span> <li><span class="dfn-paneled" id="6916104d">box-shadow</span> </ul> <li> <a data-link-type="biblio">[CSS3-IMAGES]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="998b9e6e"><image></span> <li><span class="dfn-paneled" id="d3f930a7">linear-gradient()</span> <li><span class="dfn-paneled" id="157236b0">object-position</span> </ul> <li> <a data-link-type="biblio">[CSS3PAGE]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="77448cd1">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="aba1ccaf">continuous media</span> <li><span class="dfn-paneled" id="bd3d9ccd">media query</span> <li><span class="dfn-paneled" id="758665a5">paged media</span> </ul> <li> <a data-link-type="biblio">[SELECTORS-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="53a193f1">*</span> </ul> <li> <a data-link-type="biblio">[SELECTORS-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="eb0095fe">+</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://drafts.csswg.org/css-2023/"><cite>CSS Snapshot 2023</cite></a>. URL: <a href="https://drafts.csswg.org/css-2023/">https://drafts.csswg.org/css-2023/</a> <dt id="biblio-css-cascade-5">[CSS-CASCADE-5] <dd>Elika Etemad; Miriam Suzanne; Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-cascade-5/"><cite>CSS Cascading and Inheritance Level 5</cite></a>. URL: <a href="https://drafts.csswg.org/css-cascade-5/">https://drafts.csswg.org/css-cascade-5/</a> <dt id="biblio-css-color-5">[CSS-COLOR-5] <dd>Chris Lilley; et al. <a href="https://drafts.csswg.org/css-color-5/"><cite>CSS Color Module Level 5</cite></a>. URL: <a href="https://drafts.csswg.org/css-color-5/">https://drafts.csswg.org/css-color-5/</a> <dt id="biblio-css-counter-styles-3">[CSS-COUNTER-STYLES-3] <dd>Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-counter-styles/"><cite>CSS Counter Styles Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-counter-styles/">https://drafts.csswg.org/css-counter-styles/</a> <dt id="biblio-css-display-4">[CSS-DISPLAY-4] <dd><a href="https://drafts.csswg.org/css-display-4/"><cite>CSS Display Module Level 4</cite></a>. Editor's Draft. URL: <a href="https://drafts.csswg.org/css-display-4/">https://drafts.csswg.org/css-display-4/</a> <dt id="biblio-css-fonts-4">[CSS-FONTS-4] <dd>Chris Lilley. <a href="https://drafts.csswg.org/css-fonts-4/"><cite>CSS Fonts Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-fonts-4/">https://drafts.csswg.org/css-fonts-4/</a> <dt id="biblio-css-images-4">[CSS-IMAGES-4] <dd>Tab Atkins Jr.; Elika Etemad; Lea Verou. <a href="https://drafts.csswg.org/css-images-4/"><cite>CSS Images Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-images-4/">https://drafts.csswg.org/css-images-4/</a> <dt id="biblio-css-sizing-3">[CSS-SIZING-3] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://drafts.csswg.org/css-sizing-3/"><cite>CSS Box Sizing Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-sizing-3/">https://drafts.csswg.org/css-sizing-3/</a> <dt id="biblio-css-syntax-3">[CSS-SYNTAX-3] <dd>Tab Atkins Jr.; Simon Sapin. <a href="https://drafts.csswg.org/css-syntax/"><cite>CSS Syntax Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-syntax/">https://drafts.csswg.org/css-syntax/</a> <dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4] <dd>Elika Etemad; Koji Ishii. <a href="https://drafts.csswg.org/css-writing-modes-4/"><cite>CSS Writing Modes Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-writing-modes-4/">https://drafts.csswg.org/css-writing-modes-4/</a> <dt id="biblio-css2">[CSS2] <dd>Bert Bos; et al. <a href="https://drafts.csswg.org/css2/"><cite>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</cite></a>. URL: <a href="https://drafts.csswg.org/css2/">https://drafts.csswg.org/css2/</a> <dt id="biblio-css22">[CSS22] <dd>Bert Bos. <a href="https://drafts.csswg.org/css2/"><cite>Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification</cite></a>. URL: <a href="https://drafts.csswg.org/css2/">https://drafts.csswg.org/css2/</a> <dt id="biblio-css3-background">[CSS3-BACKGROUND] <dd>Elika Etemad; Brad Kemper. <a href="https://drafts.csswg.org/css-backgrounds/"><cite>CSS Backgrounds and Borders Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-backgrounds/">https://drafts.csswg.org/css-backgrounds/</a> <dt id="biblio-css3-fonts">[CSS3-FONTS] <dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://drafts.csswg.org/css-fonts-3/"><cite>CSS Fonts Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-fonts-3/">https://drafts.csswg.org/css-fonts-3/</a> <dt id="biblio-css3-images">[CSS3-IMAGES] <dd>Tab Atkins Jr.; Elika Etemad; Lea Verou. <a href="https://drafts.csswg.org/css-images-3/"><cite>CSS Images Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-images-3/">https://drafts.csswg.org/css-images-3/</a> <dt id="biblio-css3color">[CSS3COLOR] <dd>Tantek Çelik; Chris Lilley; David Baron. <a href="https://drafts.csswg.org/css-color-3/"><cite>CSS Color Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-color-3/">https://drafts.csswg.org/css-color-3/</a> <dt id="biblio-css3page">[CSS3PAGE] <dd>Elika Etemad. <a href="https://drafts.csswg.org/css-page-3/"><cite>CSS Paged Media Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-page-3/">https://drafts.csswg.org/css-page-3/</a> <dt id="biblio-cssom">[CSSOM] <dd>Daniel Glazman; Emilio Cobos Álvarez. <a href="https://drafts.csswg.org/cssom/"><cite>CSS Object Model (CSSOM)</cite></a>. URL: <a href="https://drafts.csswg.org/cssom/">https://drafts.csswg.org/cssom/</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://drafts.csswg.org/mediaqueries-5/"><cite>Media Queries Level 5</cite></a>. URL: <a href="https://drafts.csswg.org/mediaqueries-5/">https://drafts.csswg.org/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://drafts.csswg.org/selectors-3/"><cite>Selectors Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/selectors-3/">https://drafts.csswg.org/selectors-3/</a> <dt id="biblio-selectors-4">[SELECTORS-4] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://drafts.csswg.org/selectors/"><cite>Selectors Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/selectors/">https://drafts.csswg.org/selectors/</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://drafts.csswg.org/css-animations/"><cite>CSS Animations Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-animations/">https://drafts.csswg.org/css-animations/</a> <dt id="biblio-css-box-4">[CSS-BOX-4] <dd>Elika Etemad. <a href="https://drafts.csswg.org/css-box-4/"><cite>CSS Box Model Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-box-4/">https://drafts.csswg.org/css-box-4/</a> <dt id="biblio-css-break-3">[CSS-BREAK-3] <dd>Rossen Atanassov; Elika Etemad. <a href="https://drafts.csswg.org/css-break/"><cite>CSS Fragmentation Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-break/">https://drafts.csswg.org/css-break/</a> <dt id="biblio-css-cascade-3">[CSS-CASCADE-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-cascade-3/"><cite>CSS Cascading and Inheritance Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-cascade-3/">https://drafts.csswg.org/css-cascade-3/</a> <dt id="biblio-css-color-4">[CSS-COLOR-4] <dd>Chris Lilley; Tab Atkins Jr.; Lea Verou. <a href="https://drafts.csswg.org/css-color-4/"><cite>CSS Color Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-color-4/">https://drafts.csswg.org/css-color-4/</a> <dt id="biblio-css-easing-2">[CSS-EASING-2] <dd><a href="https://drafts.csswg.org/css-easing/"><cite>CSS Easing Functions Level 2</cite></a>. URL: <a href="https://drafts.csswg.org/css-easing/">https://drafts.csswg.org/css-easing/</a> <dt id="biblio-css-grid-1">[CSS-GRID-1] <dd>Tab Atkins Jr.; et al. <a href="https://drafts.csswg.org/css-grid/"><cite>CSS Grid Layout Module Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-grid/">https://drafts.csswg.org/css-grid/</a> <dt id="biblio-css-grid-2">[CSS-GRID-2] <dd>Tab Atkins Jr.; Elika Etemad; Rossen Atanassov. <a href="https://drafts.csswg.org/css-grid-2/"><cite>CSS Grid Layout Module Level 2</cite></a>. URL: <a href="https://drafts.csswg.org/css-grid-2/">https://drafts.csswg.org/css-grid-2/</a> <dt id="biblio-css-overflow-3">[CSS-OVERFLOW-3] <dd>Elika Etemad; Florian Rivoal. <a href="https://drafts.csswg.org/css-overflow-3/"><cite>CSS Overflow Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-overflow-3/">https://drafts.csswg.org/css-overflow-3/</a> <dt id="biblio-css-text-3">[CSS-TEXT-3] <dd>Elika Etemad; Koji Ishii; Florian Rivoal. <a href="https://drafts.csswg.org/css-text-3/"><cite>CSS Text Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-text-3/">https://drafts.csswg.org/css-text-3/</a> <dt id="biblio-css-text-4">[CSS-TEXT-4] <dd>Elika Etemad; et al. <a href="https://drafts.csswg.org/css-text-4/"><cite>CSS Text Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-text-4/">https://drafts.csswg.org/css-text-4/</a> <dt id="biblio-css-text-decor-4">[CSS-TEXT-DECOR-4] <dd>Elika Etemad; Koji Ishii. <a href="https://drafts.csswg.org/css-text-decor-4/"><cite>CSS Text Decoration Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-text-decor-4/">https://drafts.csswg.org/css-text-decor-4/</a> <dt id="biblio-css-transforms-1">[CSS-TRANSFORMS-1] <dd>Simon Fraser; et al. <a href="https://drafts.csswg.org/css-transforms/"><cite>CSS Transforms Module Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-transforms/">https://drafts.csswg.org/css-transforms/</a> <dt id="biblio-css-ui-4">[CSS-UI-4] <dd>Florian Rivoal. <a href="https://drafts.csswg.org/css-ui-4/"><cite>CSS Basic User Interface Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-ui-4/">https://drafts.csswg.org/css-ui-4/</a> <dt id="biblio-css-values-4">[CSS-VALUES-4] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://drafts.csswg.org/css-values-4/"><cite>CSS Values and Units Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-values-4/">https://drafts.csswg.org/css-values-4/</a> <dt id="biblio-css-values-5">[CSS-VALUES-5] <dd>Tab Atkins Jr.; Elika Etemad; Miriam Suzanne. <a href="https://drafts.csswg.org/css-values-5/"><cite>CSS Values and Units Module Level 5</cite></a>. 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://drafts.csswg.org/mediaqueries-4/"><cite>Media Queries Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/mediaqueries-4/">https://drafts.csswg.org/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> <details class="mdn-anno unpositioned" data-anno-for="calc-notation"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/calc()" title="The calc() CSS function lets you perform calculations when specifying CSS property values. It can be used with <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> values.">calc()</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>59+</span></span><span class="safari yes"><span>Safari</span><span>12+</span></span><span class="chrome yes"><span>Chrome</span><span>66+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/clamp" title="The clamp() CSS function clamps a middle value within a range of values between a defined minimum bound and a maximum bound. The function takes three parameters: a minimum value, a preferred value, and a maximum allowed value.">clamp</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>75+</span></span><span class="safari yes"><span>Safari</span><span>13.1+</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/max" title="The max() CSS function lets you set the largest (most positive) value from a list of comma-separated expressions as the value of a CSS property value. The max() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.">max</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>75+</span></span><span class="safari yes"><span>Safari</span><span>11.1+</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/min" title="The min() CSS function lets you set the smallest (most negative) value from a list of comma-separated expressions as the value of a CSS property value. The min() function can be used anywhere a <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> is allowed.">min</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>75+</span></span><span class="safari yes"><span>Safari</span><span>11.1+</span></span><span class="chrome yes"><span>Chrome</span><span>79+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="urls"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/url()" title="The url() CSS function is used to include a file. The parameter is an absolute URL, a relative URL, a blob URL, or a data URL. The url() function can be passed as a parameter of another CSS functions, like the attr() function. Depending on the property for which it is a value, the resource sought can be an image, font, or a stylesheet. The url() functional notation is the value for the <url> data type.">url()</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>7+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>8+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/url" title="The url() CSS function is used to include a file. The parameter is an absolute URL, a relative URL, a blob URL, or a data URL. The url() function can be passed as a parameter of another CSS functions, like the attr() function. Depending on the property for which it is a value, the resource sought can be an image, font, or a stylesheet. The url() functional notation is the value for the <url> data type.">url</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="lengths"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/length" title="The <length> CSS data type represents a distance value. Lengths can be used in numerous CSS properties, such as width, height, margin, padding, border-width, font-size, and text-shadow.">length</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>53+</span></span><span class="safari yes"><span>Safari</span><span>13.1+</span></span><span class="chrome yes"><span>Chrome</span><span>42+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>56+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/length" title="The <length> CSS data type represents a distance value. Lengths can be used in numerous CSS properties, such as width, height, margin, padding, border-width, font-size, and text-shadow.">length</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="mixed-percentages"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/angle-percentage" title="The <angle-percentage> CSS data type represents a value that can be either a <angle> or a <percentage>.">angle-percentage</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.6+</span></span><span class="safari yes"><span>Safari</span><span>4+</span></span><span class="chrome yes"><span>Chrome</span><span>2+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>2+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/frequency-percentage" title="The <frequency-percentage> CSS data type represents a value that can be either a <frequency> or a <percentage>. Frequency values, e.g. the pitch of a speaking voice, are not currently used in any CSS properties.">frequency-percentage</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/length-percentage" title="The <length-percentage> CSS data type represents a value that can be either a <length> or a <percentage>.">length-percentage</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/time-percentage" title="The <time-percentage> CSS data type represents a value that can be either a <time> or a <percentage>.">time-percentage</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>4+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10.1+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>2+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="angles"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/angle" title="The <angle> CSS data type represents an angle value expressed in degrees, gradians, radians, or turns. It is used, for example, in <gradient>s and in some transform functions.">angle</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.6+</span></span><span class="safari yes"><span>Safari</span><span>4+</span></span><span class="chrome yes"><span>Chrome</span><span>2+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>2+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="dimensions"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/dimension" title="The <dimension> CSS data type represents a <number> with a unit attached to it, for example 10px.">dimension</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>5+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="frequency"> <summary><b class="less-than-two-engines-flag" title="This feature is in less than two current engines.">⚠</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/frequency" title="The <frequency> CSS data type represents a frequency dimension, such as the pitch of a speaking voice. It is not currently used in any CSS properties.">frequency</a></p> <p class="less-than-two-engines-text">In no current engines.</p> <div class="support"> <span class="firefox no"><span>Firefox</span><span>None</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome no"><span>Chrome</span><span>None</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink no"><span>Edge</span><span>None</span></span> <hr> <span class="edge no"><span>Edge (Legacy)</span><span>?</span></span><span class="ie no"><span>IE</span><span>None</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="integers"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/integer" title="The <integer> CSS data type is a special type of <number> that represents a whole number, whether positive or negative. Integers can be used in numerous CSS properties, such as column-count, counter-increment, grid-column, grid-row, and z-index.">integer</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="numbers"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/number" title="The <number> CSS data type represents a number, being either an integer or a number with a fractional component.">number</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>2+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>5+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="percentages"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/percentage" title="The <percentage> CSS data type represents a percentage value. It is often used to define a size as relative to an element's parent object. Numerous properties can use percentages, such as width, height, margin, padding, and font-size.">percentage</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="position"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position_value" title="The <position> (or <bg-position>) CSS data type denotes a two-dimensional coordinate used to set a location relative to an element box. It is used in the background-position and offset-anchor properties.">position_value</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>4+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android no"><span>Opera Mobile</span><span>?</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="resolution"> <summary><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/resolution" title="The <resolution> CSS data type, used for describing resolutions in media queries, denotes the pixel density of an output device, i.e., its resolution.">resolution</a></p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>8+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>29+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>9.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android no"><span>Android WebView</span><span>?</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="strings"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/string" title="The <string> CSS data type represents a sequence of characters. Strings are used in numerous CSS properties, such as content, font-family, and quotes.">string</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>1+</span></span><span class="safari yes"><span>Safari</span><span>1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>3.5+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>3+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>37+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="mdn-anno unpositioned" data-anno-for="time"> <summary><b class="all-engines-flag" title="This feature is in all current engines.">✔</b><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/time" title="The <time> CSS data type represents a time value expressed in seconds or milliseconds. It is used in animation, transition, and related properties.">time</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>4+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>10.1+</span></span><span class="edge_blink yes"><span>Edge</span><span>79+</span></span> <hr> <span class="edge yes"><span>Edge (Legacy)</span><span>12+</span></span><span class="ie yes"><span>IE</span><span>9+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios no"><span>iOS Safari</span><span>?</span></span><span class="chrome_android no"><span>Chrome for Android</span><span>?</span></span><span class="webview_android yes"><span>Android WebView</span><span>2+</span></span><span class="samsunginternet_android no"><span>Samsung Internet</span><span>?</span></span><span class="opera_android yes"><span>Opera Mobile</span><span>10.1+</span></span> </div> </div> </details> <details class="caniuse-status unpositioned" data-anno-for="rem" data-deco> <summary>CanIUse</summary> <p class="support"><b>Support:</b><span class="android yes"><span>Android Browser</span><span>2.1+</span></span><span class="baidu yes"><span>Baidu Browser</span><span>13.52+</span></span><span class="bb yes"><span>Blackberry Browser</span><span>7+</span></span><span class="chrome yes"><span>Chrome</span><span>4+</span></span><span class="and_chr yes"><span>Chrome for Android</span><span>131+</span></span><span class="edge yes"><span>Edge</span><span>12+</span></span><span class="firefox yes"><span>Firefox</span><span>3.6+</span></span><span class="and_ff yes"><span>Firefox for Android</span><span>132+</span></span><span class="ie yes"><span>IE</span><span>11+</span></span><span class="ie_mob yes"><span>IE Mobile</span><span>10+</span></span><span class="kaios yes"><span>KaiOS Browser</span><span>2.5+</span></span><span class="opera yes"><span>Opera</span><span>11.6+</span></span><span class="op_mini yes"><span>Opera Mini</span><span>All</span></span><span class="op_mob yes"><span>Opera Mobile</span><span>12+</span></span><span class="and_qq yes"><span>QQ Browser</span><span>14.9+</span></span><span class="safari yes"><span>Safari</span><span>5+</span></span><span class="ios_saf yes"><span>Safari on iOS</span><span>6.0+</span></span><span class="samsung yes"><span>Samsung Internet</span><span>4+</span></span><span class="and_uc yes"><span>UC Browser for Android</span><span>15.5+</span></span></p> <p class="caniuse">Source: <a href="https://caniuse.com/#feat=rem">caniuse.com</a> as of 2024-11-24</p> </details> <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 = { "02095ede": {"dfnID":"02095ede","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://drafts.csswg.org/css-syntax-3/#component-value"}, "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"}, "07308da5": {"dfnID":"07308da5","dfnText":"<ident-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-ident-token"}],"title":"3. \nTextual Data Types"}],"url":"https://drafts.csswg.org/css-syntax-3/#typedef-ident-token"}, "09f2cf3e": {"dfnID":"09f2cf3e","dfnText":"transform-origin","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-transform-origin"}],"title":"7.3. \n2D Positioning: the <position> type"}],"url":"https://drafts.csswg.org/css-transforms-1/#propdef-transform-origin"}, "0e0ffe72": {"dfnID":"0e0ffe72","dfnText":"center","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-center"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-text-4/#valdef-text-align-center"}, "0e5cedd7": {"dfnID":"0e5cedd7","dfnText":"auto","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-width-auto"}],"title":"8.1.3. \nComputed Value"}],"url":"https://drafts.csswg.org/css-sizing-3/#valdef-width-auto"}, "1548047a": {"dfnID":"1548047a","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://drafts.csswg.org/css-color-5/#typedef-color"}, "157236b0": {"dfnID":"157236b0","dfnText":"object-position","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-object-position"}],"title":"\nChanges"}],"url":"https://drafts.csswg.org/css-images-3/#propdef-object-position"}, "16b64b43": {"dfnID":"16b64b43","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://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-rl"}, "1cf918c1": {"dfnID":"1cf918c1","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://drafts.csswg.org/css-cascade-5/#specified-value"}, "1ee7f091": {"dfnID":"1ee7f091","dfnText":"outline-color","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-outline-color"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-ui-4/#propdef-outline-color"}, "218f0f24": {"dfnID":"218f0f24","dfnText":"hsl()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-hsl"}],"title":"4.6. \nMixing Percentages and Dimensions"}],"url":"https://drafts.csswg.org/css-color-4/#funcdef-hsl"}, "2589df91": {"dfnID":"2589df91","dfnText":"orphans","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-orphans"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-break-3/#propdef-orphans"}, "2c57f900": {"dfnID":"2c57f900","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://drafts.csswg.org/css-fonts-4/#propdef-font"}, "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"}, "385326d7": {"dfnID":"385326d7","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://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode"}, "3bd4bbe9": {"dfnID":"3bd4bbe9","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://drafts.csswg.org/css-writing-modes-4/#propdef-text-orientation"}, "41edad32": {"dfnID":"41edad32","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://drafts.csswg.org/css-syntax-3/#consume-a-url-token"}, "4356bfe3": {"dfnID":"4356bfe3","dfnText":"text-align","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-text-align"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-text-3/#propdef-text-align"}, "49a5f65f": {"dfnID":"49a5f65f","dfnText":"padding-top","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-padding-top"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-box-4/#propdef-padding-top"}, "4d7d3dcd": {"dfnID":"4d7d3dcd","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://drafts.csswg.org/css-cascade-5/#valdef-all-initial"}, "4e55d7fb": {"dfnID":"4e55d7fb","dfnText":"@import","external":true,"refSections":[{"refs":[{"id":"ref-for-at-ruledef-import"}],"title":"3.4. \nResource Locators: the <url> type"}],"url":"https://drafts.csswg.org/css-cascade-5/#at-ruledef-import"}, "4ffe613d": {"dfnID":"4ffe613d","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://drafts.csswg.org/css-syntax-3/#typedef-percentage-token"}, "539e4c80": {"dfnID":"539e4c80","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://drafts.csswg.org/css-images-4/#propdef-image-resolution"}, "53a193f1": {"dfnID":"53a193f1","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://drafts.csswg.org/selectors-3/#x"}, "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"}, "5bc3d0ec": {"dfnID":"5bc3d0ec","dfnText":"text-decoration","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-text-decoration"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-text-decor-4/#propdef-text-decoration"}, "5d83727e": {"dfnID":"5d83727e","dfnText":"actual value","external":true,"refSections":[{"refs":[{"id":"ref-for-actual-value"}],"title":"5. \nDistance Units: the <length> type"}],"url":"https://drafts.csswg.org/css-cascade-5/#actual-value"}, "6158d44a": {"dfnID":"6158d44a","dfnText":"<string-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-string-token"}],"title":"3.3. \nQuoted Strings: the <string> type"}],"url":"https://drafts.csswg.org/css-syntax-3/#typedef-string-token"}, "6916104d": {"dfnID":"6916104d","dfnText":"box-shadow","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-box-shadow"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-box-shadow"}, "6e9f0abf": {"dfnID":"6e9f0abf","dfnText":"disc","external":true,"refSections":[{"refs":[{"id":"ref-for-disc"}],"title":"2.1. \nComponent Value Types"}],"url":"https://drafts.csswg.org/css-counter-styles-3/#disc"}, "73759fff": {"dfnID":"73759fff","dfnText":"border-color","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-border-color"}],"title":"2.1. \nComponent Value Types"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-border-color"}, "758665a5": {"dfnID":"758665a5","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://drafts.csswg.org/mediaqueries-5/#paged-media"}, "77448cd1": {"dfnID":"77448cd1","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://drafts.csswg.org/css-page-3/#page-area"}, "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"}, "8095a819": {"dfnID":"8095a819","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://drafts.csswg.org/css-easing-2/#typedef-easing-function"}, "86871698": {"dfnID":"86871698","dfnText":"coordinating list property","external":true,"refSections":[{"refs":[{"id":"ref-for-coordinating-list-property"}],"title":"2.1. \nComponent Value Types"}],"url":"https://drafts.csswg.org/css-values-4/#coordinating-list-property"}, "86928bde": {"dfnID":"86928bde","dfnText":"overflow","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow"}],"title":"\nChanges"}],"url":"https://drafts.csswg.org/css-overflow-3/#propdef-overflow"}, "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"}, "88643fe0": {"dfnID":"88643fe0","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://drafts.csswg.org/css-sizing-3/#propdef-width"}, "8956a48a": {"dfnID":"8956a48a","dfnText":"<border-width>","external":true,"refSections":[{"refs":[{"id":"ref-for-value-def-border-width"}],"title":"2.1. \nComponent Value Types"}],"url":"https://drafts.csswg.org/css2/#value-def-border-width"}, "8b3ca704": {"dfnID":"8b3ca704","dfnText":"auto","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-auto"}],"title":"\nChanges"}],"url":"https://drafts.csswg.org/css-overflow-3/#valdef-overflow-auto"}, "8f605f43": {"dfnID":"8f605f43","dfnText":"tab-size","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-tab-size"}],"title":"8.1.2. \nType Checking"}],"url":"https://drafts.csswg.org/css-text-4/#propdef-tab-size"}, "91bfbe18": {"dfnID":"91bfbe18","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://drafts.csswg.org/css-color-4/#propdef-opacity"}, "92700be8": {"dfnID":"92700be8","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://drafts.csswg.org/css-syntax-3/#typedef-number-token"}, "998b9e6e": {"dfnID":"998b9e6e","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://drafts.csswg.org/css-images-3/#typedef-image"}, "9bc55323": {"dfnID":"9bc55323","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://drafts.csswg.org/css-2023/#user-agent"}, "9cd25054": {"dfnID":"9cd25054","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://drafts.csswg.org/css-cascade-5/#computed-value"}, "9e004c39": {"dfnID":"9e004c39","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://drafts.csswg.org/css-cascade-5/#valdef-all-unset"}, "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"}, "a4eb3c57": {"dfnID":"a4eb3c57","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://drafts.csswg.org/css-cascade-5/#used-value"}, "a63375cb": {"dfnID":"a63375cb","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://drafts.csswg.org/css-syntax-3/#typedef-dimension-token"}, "aba1ccaf": {"dfnID":"aba1ccaf","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://drafts.csswg.org/mediaqueries-5/#continuous-media"}, "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"}, "af50aa62": {"dfnID":"af50aa62","dfnText":"<function-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-function-token"}],"title":"8. \nFunctional Notations"}],"url":"https://drafts.csswg.org/css-syntax-3/#typedef-function-token"}, "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"}, "b7c8adc2": {"dfnID":"b7c8adc2","dfnText":"<url-token>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-url-token"}],"title":"3.4. \nResource Locators: the <url> type"}],"url":"https://drafts.csswg.org/css-syntax-3/#typedef-url-token"}, "baa03018": {"dfnID":"baa03018","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://drafts.csswg.org/css-easing-2/#valdef-cubic-bezier-easing-function-ease-out"}, "bd3d9ccd": {"dfnID":"bd3d9ccd","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://drafts.csswg.org/mediaqueries-5/#media-query"}, "bearing-angle": {"dfnID":"bearing-angle","dfnText":"bearing angle","external":false,"refSections":[],"url":"#bearing-angle"}, "c16b1855": {"dfnID":"c16b1855","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://drafts.csswg.org/css-animations-1/#propdef-animation-timing-function"}, "c388d253": {"dfnID":"c388d253","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://drafts.csswg.org/css-cascade-5/#valdef-all-inherit"}, "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"}, "c9ecad15": {"dfnID":"c9ecad15","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://drafts.csswg.org/css-backgrounds-3/#propdef-border-width"}, "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"}, "cc878a3a": {"dfnID":"cc878a3a","dfnText":"fr","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-flex-fr"}],"title":"4. \nNumeric Data Types"}],"url":"https://drafts.csswg.org/css-grid-2/#valdef-flex-fr"}, "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"}, "d24165c7": {"dfnID":"d24165c7","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://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-lr"}, "d27a809f": {"dfnID":"d27a809f","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://drafts.csswg.org/css-backgrounds-3/#propdef-background-position"}, "d3f930a7": {"dfnID":"d3f930a7","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://drafts.csswg.org/css-images-3/#funcdef-linear-gradient"}, "d65d17df": {"dfnID":"d65d17df","dfnText":"font-family","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-font-family"}],"title":"2.6. \nProperty Value Examples"}],"url":"https://drafts.csswg.org/css-fonts-4/#propdef-font-family"}, "d984b6fe": {"dfnID":"d984b6fe","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://drafts.csswg.org/css-animations-1/#propdef-animation-name"}, "dd998a01": {"dfnID":"dd998a01","dfnText":"rgba()","external":true,"refSections":[{"refs":[{"id":"ref-for-funcdef-rgba"}],"title":"8. \nFunctional Notations"}],"url":"https://drafts.csswg.org/css-color-4/#funcdef-rgba"}, "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"}, "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"}, "ea663a43": {"dfnID":"ea663a43","dfnText":"containing block","external":true,"refSections":[{"refs":[{"id":"ref-for-containing-block"}],"title":"4.5. \nPercentages: the <percentage> type"}],"url":"https://drafts.csswg.org/css-display-4/#containing-block"}, "eb0095fe": {"dfnID":"eb0095fe","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://drafts.csswg.org/selectors-4/#selectordef-adjacent"}, "eda608e1": {"dfnID":"eda608e1","dfnText":"animation","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-animation"}],"title":"3.2. \nAuthor-defined Identifiers: the <custom-ident> type"}],"url":"https://drafts.csswg.org/css-animations-1/#propdef-animation"}, "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"}, "f49914d4": {"dfnID":"f49914d4","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://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-upright"}, "f5eca8c9": {"dfnID":"f5eca8c9","dfnText":"background","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-background"}],"title":"2.1. \nComponent Value Types"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-background"}, "f8a826f8": {"dfnID":"f8a826f8","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://drafts.csswg.org/css-easing-2/#valdef-cubic-bezier-easing-function-ease-in"}, "f95a7c3b": {"dfnID":"f95a7c3b","dfnText":"background-attachment","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-background-attachment"}],"title":"2.1. \nComponent Value Types"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-background-attachment"}, "fdf6efd5": {"dfnID":"fdf6efd5","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://drafts.csswg.org/css-fonts-4/#propdef-font-size"}, "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://drafts.csswg.org/css-color-5/#typedef-color": "Expands to: <alpha-value> | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | 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 | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | 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 | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | transparent | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen", "https://drafts.csswg.org/css-easing-2/#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-position-annos */ "use strict"; { function repositionAnnoPanels(){ const panels = [...document.querySelectorAll("[data-anno-for]")]; hydratePanels(panels); let vSoFar = 0; for(const panel of panels.sort(cmpTops)) { if(panel.top < vSoFar) { panel.top = vSoFar; panel.style.top = vSoFar + "px"; } vSoFar = panel.top + panel.height + 15; } } function hydratePanels(panels) { const main = document.querySelector("main"); let mainRect; if(main) mainRect = main.getBoundingClientRect(); // First display them all, if they're not already visible. for(const panel of panels) { panel.classList.remove("unpositioned"); } // Measure them all for(const panel of panels) { const dfn = document.getElementById(panel.getAttribute("data-anno-for")); if(!dfn) { console.log("Can't find the annotation panel target:", panel); continue; } panel.dfn = dfn; panel.top = window.scrollY + dfn.getBoundingClientRect().top; let panelRect = panel.getBoundingClientRect(); panel.height = panelRect.height; if(main) { panel.overlappingMain = panelRect.left < mainRect.right; } else { panel.overlappingMain = false; } } // And finally position them for(const panel of panels) { const dfn = panel.dfn; if(!dfn) continue; panel.style.top = panel.top + "px"; panel.classList.toggle("overlapping-main", panel.overlappingMain); } } function cmpTops(a,b) { return a.top - b.top; } window.addEventListener("load", repositionAnnoPanels); window.addEventListener("resize", repositionAnnoPanels); } </script> <script>/* Boilerplate: script-ref-hints */ "use strict"; { let refsData = { "#Hz": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"anchor","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": {"displayText":"<angle>","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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"&&","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"&&","type":"grammar","url":"#comb-all"}, "#comb-comma": {"displayText":",","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":",","type":"grammar","url":"#comb-comma"}, "#comb-one": {"displayText":"|","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"|","type":"grammar","url":"#comb-one"}, "#compatible-units": {"displayText":"compatible","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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"dimension","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"dimension","type":"dfn","url":"#dimension"}, "#dpcm": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"font-relative lengths","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": {"displayText":"<frequency>","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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"<custom-ident>","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": {"displayText":"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": {"displayText":"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": {"displayText":"<integer>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<integer>","type":"type","url":"#integer-value"}, "#kHz": {"displayText":"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": {"displayText":"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": {"displayText":"<length>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<length>","type":"type","url":"#length-value"}, "#mm": {"displayText":"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": {"displayText":"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": {"displayText":"#","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"#","type":"grammar","url":"#mult-comma"}, "#mult-opt": {"displayText":"?","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": {"displayText":"*","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"*","type":"grammar","url":"#mult-zero-plus"}, "#number": {"displayText":"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": {"displayText":"<number>","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": {"displayText":"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": {"displayText":"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": {"displayText":"<percentage>","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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"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": {"displayText":"<resolution>","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": {"displayText":"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": {"displayText":"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": {"displayText":"<string>","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": {"displayText":"<time>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<time>","type":"type","url":"#time-value"}, "#turn": {"displayText":"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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"<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": {"displayText":"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": {"displayText":"<url>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-values","spec":"css-values-3","status":"local","text":"<url>","type":"type","url":"#url-value"}, "#vh": {"displayText":"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": {"displayText":"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": {"displayText":"pixel 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": {"displayText":"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": {"displayText":"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": {"displayText":"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-2023/#user-agent": {"displayText":"UA","export":false,"for_":[],"level":"2023","normative":true,"shortname":"css","spec":"css-2023","status":"current","text":"ua","type":"dfn","url":"https://drafts.csswg.org/css-2023/#user-agent"}, "https://drafts.csswg.org/css-animations-1/#propdef-animation": {"displayText":"animation","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-animations","spec":"css-animations-1","status":"current","text":"animation","type":"property","url":"https://drafts.csswg.org/css-animations-1/#propdef-animation"}, "https://drafts.csswg.org/css-animations-1/#propdef-animation-name": {"displayText":"animation-name","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-animations","spec":"css-animations-1","status":"current","text":"animation-name","type":"property","url":"https://drafts.csswg.org/css-animations-1/#propdef-animation-name"}, "https://drafts.csswg.org/css-animations-1/#propdef-animation-timing-function": {"displayText":"animation-timing-function","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-animations","spec":"css-animations-1","status":"current","text":"animation-timing-function","type":"property","url":"https://drafts.csswg.org/css-animations-1/#propdef-animation-timing-function"}, "https://drafts.csswg.org/css-backgrounds-3/#propdef-background": {"displayText":"background","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"background","type":"property","url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-background"}, "https://drafts.csswg.org/css-backgrounds-3/#propdef-background-attachment": {"displayText":"background-attachment","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"background-attachment","type":"property","url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-background-attachment"}, "https://drafts.csswg.org/css-backgrounds-3/#propdef-background-position": {"displayText":"background-position","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"background-position","type":"property","url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-background-position"}, "https://drafts.csswg.org/css-backgrounds-3/#propdef-border-color": {"displayText":"border-color","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"border-color","type":"property","url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-border-color"}, "https://drafts.csswg.org/css-backgrounds-3/#propdef-border-width": {"displayText":"border-width","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"border-width","type":"property","url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-border-width"}, "https://drafts.csswg.org/css-backgrounds-3/#propdef-box-shadow": {"displayText":"box-shadow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"box-shadow","type":"property","url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-box-shadow"}, "https://drafts.csswg.org/css-box-4/#propdef-padding-top": {"displayText":"padding-top","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"current","text":"padding-top","type":"property","url":"https://drafts.csswg.org/css-box-4/#propdef-padding-top"}, "https://drafts.csswg.org/css-break-3/#propdef-orphans": {"displayText":"orphans","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-break","spec":"css-break-3","status":"current","text":"orphans","type":"property","url":"https://drafts.csswg.org/css-break-3/#propdef-orphans"}, "https://drafts.csswg.org/css-cascade-5/#actual-value": {"displayText":"actual value","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"actual value","type":"dfn","url":"https://drafts.csswg.org/css-cascade-5/#actual-value"}, "https://drafts.csswg.org/css-cascade-5/#at-ruledef-import": {"displayText":"@import","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"@import","type":"at-rule","url":"https://drafts.csswg.org/css-cascade-5/#at-ruledef-import"}, "https://drafts.csswg.org/css-cascade-5/#computed-value": {"displayText":"computed value","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"computed value","type":"dfn","url":"https://drafts.csswg.org/css-cascade-5/#computed-value"}, "https://drafts.csswg.org/css-cascade-5/#specified-value": {"displayText":"specified value","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"specified value","type":"dfn","url":"https://drafts.csswg.org/css-cascade-5/#specified-value"}, "https://drafts.csswg.org/css-cascade-5/#used-value": {"displayText":"used value","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"used value","type":"dfn","url":"https://drafts.csswg.org/css-cascade-5/#used-value"}, "https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit": {"displayText":"inherit","export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"inherit","type":"value","url":"https://drafts.csswg.org/css-cascade-5/#valdef-all-inherit"}, "https://drafts.csswg.org/css-cascade-5/#valdef-all-initial": {"displayText":"initial","export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"initial","type":"value","url":"https://drafts.csswg.org/css-cascade-5/#valdef-all-initial"}, "https://drafts.csswg.org/css-cascade-5/#valdef-all-unset": {"displayText":"unset","export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"unset","type":"value","url":"https://drafts.csswg.org/css-cascade-5/#valdef-all-unset"}, "https://drafts.csswg.org/css-color-4/#funcdef-hsl": {"displayText":"hsl()","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-color","spec":"css-color-4","status":"current","text":"hsl()","type":"function","url":"https://drafts.csswg.org/css-color-4/#funcdef-hsl"}, "https://drafts.csswg.org/css-color-4/#funcdef-rgba": {"displayText":"rgba()","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-color","spec":"css-color-4","status":"current","text":"rgba()","type":"function","url":"https://drafts.csswg.org/css-color-4/#funcdef-rgba"}, "https://drafts.csswg.org/css-color-4/#propdef-opacity": {"displayText":"opacity","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-color","spec":"css-color-4","status":"current","text":"opacity","type":"property","url":"https://drafts.csswg.org/css-color-4/#propdef-opacity"}, "https://drafts.csswg.org/css-color-5/#typedef-color": {"displayText":"<color>","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-color","spec":"css-color-5","status":"current","text":"<color>","type":"type","url":"https://drafts.csswg.org/css-color-5/#typedef-color"}, "https://drafts.csswg.org/css-counter-styles-3/#disc": {"displayText":"disc","export":true,"for_":["<counter-style-name>"],"level":"3","normative":true,"shortname":"css-counter-styles","spec":"css-counter-styles-3","status":"current","text":"disc","type":"value","url":"https://drafts.csswg.org/css-counter-styles-3/#disc"}, "https://drafts.csswg.org/css-display-4/#containing-block": {"displayText":"containing block","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"containing block","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#containing-block"}, "https://drafts.csswg.org/css-easing-2/#typedef-easing-function": {"displayText":"<easing-function>","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-easing","spec":"css-easing-2","status":"current","text":"<easing-function>","type":"type","url":"https://drafts.csswg.org/css-easing-2/#typedef-easing-function"}, "https://drafts.csswg.org/css-easing-2/#valdef-cubic-bezier-easing-function-ease-in": {"displayText":"ease-in","export":true,"for_":["<cubic-bezier-easing-function>"],"level":"2","normative":true,"shortname":"css-easing","spec":"css-easing-2","status":"current","text":"ease-in","type":"value","url":"https://drafts.csswg.org/css-easing-2/#valdef-cubic-bezier-easing-function-ease-in"}, "https://drafts.csswg.org/css-easing-2/#valdef-cubic-bezier-easing-function-ease-out": {"displayText":"ease-out","export":true,"for_":["<cubic-bezier-easing-function>"],"level":"2","normative":true,"shortname":"css-easing","spec":"css-easing-2","status":"current","text":"ease-out","type":"value","url":"https://drafts.csswg.org/css-easing-2/#valdef-cubic-bezier-easing-function-ease-out"}, "https://drafts.csswg.org/css-fonts-4/#propdef-font": {"displayText":"font","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"current","text":"font","type":"property","url":"https://drafts.csswg.org/css-fonts-4/#propdef-font"}, "https://drafts.csswg.org/css-fonts-4/#propdef-font-family": {"displayText":"font-family","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"current","text":"font-family","type":"property","url":"https://drafts.csswg.org/css-fonts-4/#propdef-font-family"}, "https://drafts.csswg.org/css-fonts-4/#propdef-font-size": {"displayText":"font-size","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"current","text":"font-size","type":"property","url":"https://drafts.csswg.org/css-fonts-4/#propdef-font-size"}, "https://drafts.csswg.org/css-grid-2/#valdef-flex-fr": {"displayText":"fr","export":true,"for_":["<flex>"],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"current","text":"fr","type":"value","url":"https://drafts.csswg.org/css-grid-2/#valdef-flex-fr"}, "https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient": {"displayText":"linear-gradient()","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-images","spec":"css-images-3","status":"current","text":"linear-gradient()","type":"function","url":"https://drafts.csswg.org/css-images-3/#funcdef-linear-gradient"}, "https://drafts.csswg.org/css-images-3/#propdef-object-position": {"displayText":"object-position","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-images","spec":"css-images-3","status":"current","text":"object-position","type":"property","url":"https://drafts.csswg.org/css-images-3/#propdef-object-position"}, "https://drafts.csswg.org/css-images-3/#typedef-image": {"displayText":"<image>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-images","spec":"css-images-3","status":"current","text":"<image>","type":"type","url":"https://drafts.csswg.org/css-images-3/#typedef-image"}, "https://drafts.csswg.org/css-images-4/#propdef-image-resolution": {"displayText":"image-resolution","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-images","spec":"css-images-4","status":"current","text":"image-resolution","type":"property","url":"https://drafts.csswg.org/css-images-4/#propdef-image-resolution"}, "https://drafts.csswg.org/css-overflow-3/#propdef-overflow": {"displayText":"overflow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"current","text":"overflow","type":"property","url":"https://drafts.csswg.org/css-overflow-3/#propdef-overflow"}, "https://drafts.csswg.org/css-overflow-3/#valdef-overflow-auto": {"displayText":"auto","export":true,"for_":["overflow","overflow-x","overflow-y"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"current","text":"auto","type":"value","url":"https://drafts.csswg.org/css-overflow-3/#valdef-overflow-auto"}, "https://drafts.csswg.org/css-page-3/#page-area": {"displayText":"page area","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-page","spec":"css-page-3","status":"current","text":"page area","type":"dfn","url":"https://drafts.csswg.org/css-page-3/#page-area"}, "https://drafts.csswg.org/css-sizing-3/#propdef-width": {"displayText":"width","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"current","text":"width","type":"property","url":"https://drafts.csswg.org/css-sizing-3/#propdef-width"}, "https://drafts.csswg.org/css-sizing-3/#valdef-width-auto": {"displayText":"auto","export":true,"for_":["width","height","min-width","min-height"],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"current","text":"auto","type":"value","url":"https://drafts.csswg.org/css-sizing-3/#valdef-width-auto"}, "https://drafts.csswg.org/css-syntax-3/#component-value": {"displayText":"component value","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"component value","type":"dfn","url":"https://drafts.csswg.org/css-syntax-3/#component-value"}, "https://drafts.csswg.org/css-syntax-3/#consume-a-url-token": {"displayText":"consume a url token","export":false,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"consume a url token","type":"dfn","url":"https://drafts.csswg.org/css-syntax-3/#consume-a-url-token"}, "https://drafts.csswg.org/css-syntax-3/#typedef-dimension-token": {"displayText":"<dimension-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<dimension-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-dimension-token"}, "https://drafts.csswg.org/css-syntax-3/#typedef-function-token": {"displayText":"<function-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<function-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-function-token"}, "https://drafts.csswg.org/css-syntax-3/#typedef-ident-token": {"displayText":"<ident-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<ident-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-ident-token"}, "https://drafts.csswg.org/css-syntax-3/#typedef-number-token": {"displayText":"<number-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<number-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-number-token"}, "https://drafts.csswg.org/css-syntax-3/#typedef-percentage-token": {"displayText":"<percentage-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<percentage-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-percentage-token"}, "https://drafts.csswg.org/css-syntax-3/#typedef-string-token": {"displayText":"<string-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<string-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-string-token"}, "https://drafts.csswg.org/css-syntax-3/#typedef-url-token": {"displayText":"<url-token>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-syntax","spec":"css-syntax-3","status":"current","text":"<url-token>","type":"type","url":"https://drafts.csswg.org/css-syntax-3/#typedef-url-token"}, "https://drafts.csswg.org/css-text-3/#propdef-text-align": {"displayText":"text-align","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"current","text":"text-align","type":"property","url":"https://drafts.csswg.org/css-text-3/#propdef-text-align"}, "https://drafts.csswg.org/css-text-4/#propdef-tab-size": {"displayText":"tab-size","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"current","text":"tab-size","type":"property","url":"https://drafts.csswg.org/css-text-4/#propdef-tab-size"}, "https://drafts.csswg.org/css-text-4/#valdef-text-align-center": {"displayText":"center","export":true,"for_":["text-align"],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"current","text":"center","type":"value","url":"https://drafts.csswg.org/css-text-4/#valdef-text-align-center"}, "https://drafts.csswg.org/css-text-decor-4/#propdef-text-decoration": {"displayText":"text-decoration","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text-decor","spec":"css-text-decor-4","status":"current","text":"text-decoration","type":"property","url":"https://drafts.csswg.org/css-text-decor-4/#propdef-text-decoration"}, "https://drafts.csswg.org/css-transforms-1/#propdef-transform-origin": {"displayText":"transform-origin","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-transforms","spec":"css-transforms-1","status":"current","text":"transform-origin","type":"property","url":"https://drafts.csswg.org/css-transforms-1/#propdef-transform-origin"}, "https://drafts.csswg.org/css-ui-4/#propdef-outline-color": {"displayText":"outline-color","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-ui","spec":"css-ui-4","status":"current","text":"outline-color","type":"property","url":"https://drafts.csswg.org/css-ui-4/#propdef-outline-color"}, "https://drafts.csswg.org/css-values-4/#coordinating-list-property": {"displayText":"coordinating list property","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"coordinating list property","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#coordinating-list-property"}, "https://drafts.csswg.org/css-values-5/#funcdef-attr": {"displayText":"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": {"displayText":"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-writing-modes-4/#propdef-text-orientation": {"displayText":"text-orientation","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"text-orientation","type":"property","url":"https://drafts.csswg.org/css-writing-modes-4/#propdef-text-orientation"}, "https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode": {"displayText":"writing-mode","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"writing-mode","type":"property","url":"https://drafts.csswg.org/css-writing-modes-4/#propdef-writing-mode"}, "https://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-upright": {"displayText":"upright","export":true,"for_":["text-orientation"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"upright","type":"value","url":"https://drafts.csswg.org/css-writing-modes-4/#valdef-text-orientation-upright"}, "https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-lr": {"displayText":"vertical-lr","export":true,"for_":["writing-mode"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"vertical-lr","type":"value","url":"https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-lr"}, "https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-rl": {"displayText":"vertical-rl","export":true,"for_":["writing-mode"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"vertical-rl","type":"value","url":"https://drafts.csswg.org/css-writing-modes-4/#valdef-writing-mode-vertical-rl"}, "https://drafts.csswg.org/css2/#propdef-line-height": {"displayText":"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://drafts.csswg.org/css2/#value-def-border-width": {"displayText":"<border-width>","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"<border-width>","type":"type","url":"https://drafts.csswg.org/css2/#value-def-border-width"}, "https://drafts.csswg.org/mediaqueries-5/#continuous-media": {"displayText":"continuous media","export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"current","text":"continuous media","type":"dfn","url":"https://drafts.csswg.org/mediaqueries-5/#continuous-media"}, "https://drafts.csswg.org/mediaqueries-5/#media-query": {"displayText":"media query","export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"current","text":"media query","type":"dfn","url":"https://drafts.csswg.org/mediaqueries-5/#media-query"}, "https://drafts.csswg.org/mediaqueries-5/#paged-media": {"displayText":"paged media","export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"current","text":"paged media","type":"dfn","url":"https://drafts.csswg.org/mediaqueries-5/#paged-media"}, "https://drafts.csswg.org/selectors-3/#x": {"displayText":"*","export":true,"for_":[],"level":"3","normative":true,"shortname":"selectors","spec":"selectors-3","status":"current","text":"*","type":"selector","url":"https://drafts.csswg.org/selectors-3/#x"}, "https://drafts.csswg.org/selectors-4/#selectordef-adjacent": {"displayText":"+","export":true,"for_":[],"level":"4","normative":true,"shortname":"selectors","spec":"selectors-4","status":"current","text":"+","type":"selector","url":"https://drafts.csswg.org/selectors-4/#selectordef-adjacent"}, "https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-history-pushstate": {"displayText":"pushState(data, unused, url)","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": {"displayText":"base","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": {"displayText":"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": {"displayText":"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"}, }; function mkRefHint(link, ref) { const linkText = link.textContent; let dfnTextElements = ''; if (ref.displayText.toLowerCase() != linkText.toLowerCase()) { // Give the original term if it's being displayed in a different way. // But allow casing differences, they're insignificant. dfnTextElements = mk.li({}, mk.b({}, "Term: "), mk.span({}, ref.displayText) ); } 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> <script>/* Boilerplate: script-wpt */ "use strict"; { let wptData = { "paths": ["/css/CSS2/","/css/css-animations/","/css/css-multicol/","/css/css-shapes/","/css/css-transforms/","/css/css-transitions/","/css/css-values/","/css/mediaqueries/","/css/motion/"], }; document.addEventListener("DOMContentLoaded", async ()=>{ if(wptData.paths.length == 0) return; const runsUrl = "https://wpt.fyi/api/runs?label=master&label=stable&max-count=1&product=chrome&product=firefox&product=safari&product=edge"; const runs = await (await fetch(runsUrl)).json(); let testResults = []; for(const pathPrefix of wptData.paths) { const pathResults = await (await fetch("https://wpt.fyi/api/search", { method:"POST", headers:{ "Content-Type":"application/json", }, body: JSON.stringify({ "run_ids": runs.map(x=>x.id), "query": {"path": pathPrefix}, }) })).json(); testResults = testResults.concat(pathResults.results); } const browsers = runs.map(x=>({name:x.browser_name, version:x.browser_version, passes:0, total: 0})); const resultsFromPath = new Map(testResults.map(result=>{ const testPath = result.test; const passes = result.legacy_status.map(x=>[x.passes, x.total]); return [testPath, passes]; })); const seenTests = new Set(); document.querySelectorAll(".wpt-name").forEach(nameEl=>{ const passData = resultsFromPath.get("/" + nameEl.getAttribute("title")); if(!passData) { console.log("Couldn't find test in results:", nameEl); return } const numTests = passData[0][1]; if(numTests > 1) { nameEl.insertAdjacentElement("beforeend", mk.small({}, ` (${numTests} tests)`)); } if(passData == undefined) return; const resultsEl = mk.span({"class":"wpt-results"}, ...passData.map((p,i) => mk.span( { "title": `${browsers[i].name} ${p[0]}/${p[1]}`, "class": "wpt-result", "style": `background: conic-gradient(forestgreen ${p[0]/p[1]*360}deg, darkred 0deg);`, })), ); nameEl.insertAdjacentElement("afterend", resultsEl); // Only update the summary pass/total count if we haven't seen this // test before, to support authors listing the same test multiple times // in a spec. if (!seenTests.has(nameEl.getAttribute("title"))) { seenTests.add(nameEl.getAttribute("title")); passData.forEach((p,i) => { browsers[i].passes += p[0]; browsers[i].total += p[1]; }); } }); const overview = document.querySelector(".wpt-overview"); if(overview) { overview.appendChild(mk.ul({}, ...browsers.map(formatWptResult))); document.head.appendChild(mk.style({}, `.wpt-overview ul { display: flex; flex-flow: row wrap; gap: .2em; justify-content: start; list-style: none; padding: 0; margin: 0;} .wpt-overview li { padding: .25em 1em; color: black; text-align: center; } .wpt-overview img { height: 1.5em; height: max(1.5em, 32px); background: transparent; } .wpt-overview .browser { font-weight: bold; } .wpt-overview .passes-none { background: #e57373; } .wpt-overview .passes-hardly { background: #ffb74d; } .wpt-overview .passes-a-few { background: #ffd54f; } .wpt-overview .passes-half { background: #fff176; } .wpt-overview .passes-lots { background: #dce775; } .wpt-overview .passes-most { background: #aed581; } .wpt-overview .passes-all { background: #81c784; }`)); } }); function formatWptResult({name, version, passes, total}) { const passRate = passes/total; let passClass = ""; if(passRate == 0) passClass = "passes-none"; else if(passRate < .2) passClass = "passes-hardly"; else if(passRate < .4) passClass = "passes-a-few"; else if(passRate < .6) passClass = "passes-half"; else if(passRate < .8) passClass = "passes-lots"; else if(passRate < 1) passClass = "passes-most"; else passClass = "passes-all"; name = name[0].toUpperCase() + name.slice(1); const shortVersion = /^\d+/.exec(version); const icon = [] if(name == "Chrome") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/chrome_64x64.png"})); if(name == "Edge") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/edge_64x64.png"})); if(name == "Safari") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/safari_64x64.png"})); if(name == "Firefox") icon.push(mk.img({alt:"", src:"https://wpt.fyi/static/firefox_64x64.png"})); return mk.li({"class":passClass}, mk.nobr({'class':'browser'}, ...icon, ` ${name} ${shortVersion}`), mk.br(), mk.nobr({'class':'pass-rate'}, `${passes}/${total}`) ); } } </script>