CINXE.COM

CSS Overflow 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 Overflow 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 60c422380, updated Thu Feb 20 19:11:22 2025 -0800" name="generator"> <link href="https://www.w3.org/TR/css-overflow-3/" rel="canonical"> <link href="https://drafts.csswg.org/csslogo.ico" rel="icon"> <meta content="00a4565adc80e6981e7fdefb92480d41c0f5ffea" 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> .awesome-table td { padding: 5px; } .awesome-table { color: #000; background: #fff; margin: auto; } </style> <style> .data.complex tbody th:last-of-type { border-right: solid black 2px; } .data.complex tbody tr:nth-of-type(2n) td, .data.complex tbody tr:nth-of-type(2n) th:not([rowspan]) { background: rgba(127, 127, 127, 0.25); } </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/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 Overflow 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="2025-01-29">29 January 2025</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-overflow-3/">https://drafts.csswg.org/css-overflow-3/</a> <dt>Latest published version: <dd><a href="https://www.w3.org/TR/css-overflow-3/">https://www.w3.org/TR/css-overflow-3/</a> <dt>Previous Versions: <dd><a href="https://www.w3.org/TR/2021/WD-css-overflow-3-20211223/" rel="prev">https://www.w3.org/TR/2021/WD-css-overflow-3-20211223/</a> <dt>Feedback: <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-overflow-3">CSSWG Issues Repository</a> <dd><a href="#issues-index">Inline In Spec</a> <dt class="editor">Editors: <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>) <dd class="editor p-author h-card vcard" data-editor-id="43241"><a class="p-name fn u-url url" href="http://florian.rivoal.net/">Florian Rivoal</a> (<span class="p-org org">On behalf of Bloomberg</span>) <dt class="editor">Former Editor: <dd class="editor p-author h-card vcard" data-editor-id="15393"><a class="p-name fn u-url url" href="https://dbaron.org/">L. David Baron</a> (<a class="p-org org" href="https://www.mozilla.org/">Mozilla</a>) <dt>Suggest an Edit for this Spec: <dd><a href="https://github.com/w3c/csswg-drafts/blob/main/css-overflow-3/Overview.bs">GitHub Editor</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> © 2025 <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 module contains the features of CSS relating to scrollable overflow handling in visual media. This level is focused on completing a precise specification for the existing overflow features, including the <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow">overflow</a> property and its longhands; and the <a class="property css" data-link-type="property" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow">text-overflow</a> property. A few additional features introduced in support of <a data-link-type="biblio" href="#biblio-css-contain-1" title="CSS Containment Module Level 1">[CSS-CONTAIN-1]</a> and <a data-link-type="biblio" href="#biblio-css-contain-2" title="CSS Containment Module Level 2">[CSS-CONTAIN-2]</a> are also defined: <span class="css" id="ref-for-propdef-overflow①">overflow: clip</span> and the <a class="property css" data-link-type="property" href="#propdef-overflow-clip-margin" id="ref-for-propdef-overflow-clip-margin">overflow-clip-margin</a> property.</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-overflow” in the title, like this: “[css-overflow] <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-overflow%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>The description of <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow②">overflow</a> and its longhands is considered significantly more complete and correct than previous working drafts or than <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>, but a few questions and issues remain open. <span class="css" id="ref-for-propdef-overflow③">overflow: clip</span> and <a class="property css" data-link-type="property" href="#propdef-overflow-clip-margin" id="ref-for-propdef-overflow-clip-margin①">overflow-clip-margin</a> are rather new, and lack implementation experience. <a class="property css" data-link-type="property" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow①">text-overflow</a> is stable, is unchanged form its earlier definition in <a data-link-type="biblio" href="#biblio-css-ui-3" title="CSS Basic User Interface Module Level 3 (CSS3 UI)">[CSS-UI-3]</a>. While not yet fully validated by implementation experience, the design of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef-line-clamp" id="ref-for-propdef-line-clamp">line-clamp</a> and its longhands is considered roughly complete. Earlier versions of this specification included experimental new ideas for handling overflow by creating new boxes using fragmentation. These ideas are not abandoned; they are merely <a href="https://drafts.csswg.org/css-overflow-4/">deferred until Level 4</a>. Work will resume on fragmented overflow once this level stabilizes completed.</p> </div> <div data-fill-with="at-risk"> <p>The following features are at-risk, and may be dropped during the CR period: </p> <ul> <li>the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef-max-lines" id="ref-for-propdef-max-lines">max-lines</a> property </ul> <p>“At-risk” is a W3C Process term-of-art, and does not necessarily imply that the feature is in danger of being dropped or delayed. It means that the WG believes the feature may have difficulty being interoperably implemented in a timely manner, and marking it as such allows the WG to drop the feature if necessary when transitioning to the Proposed Rec stage, without having to publish a new Candidate Rec without the feature first.</p> </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="#values"><span class="secno">1.1</span> <span class="content"> Value Definitions</span></a> <li><a href="#placement"><span class="secno">1.2</span> <span class="content"> Module Interactions</span></a> </ol> <li> <a href="#overflow-concepts"><span class="secno">2</span> <span class="content"> Overflow Concepts and Terminology</span></a> <ol class="toc"> <li><a href="#ink"><span class="secno">2.1</span> <span class="content">Ink Overflow</span></a> <li><a href="#scrollable"><span class="secno">2.2</span> <span class="content"> Scrollable Overflow</span></a> <li><a href="#scrolling"><span class="secno">2.3</span> <span class="content"> Scrolling Overflow</span></a> </ol> <li> <a href="#overflow-properties"><span class="secno">3</span> <span class="content"> Scrolling and Clipping Overflow</span></a> <ol class="toc"> <li> <a href="#overflow-control"><span class="secno">3.1</span> <span class="content"> Managing Overflow: the <span class="property">overflow-x</span>, <span class="property">overflow-y</span>, and <span class="property">overflow</span> properties</span></a> <ol class="toc"> <li><a href="#scroll-visibility"><span class="secno">3.1.1</span> <span class="content"> Interaction of <span class="property">visibility</span> and <span class="property">overflow</span></span></a> <li><a href="#corner-clipping"><span class="secno">3.1.2</span> <span class="content"> Interaction of <span class="property">border-radius</span> and <span class="property">overflow</span></span></a> <li><a href="#static-media"><span class="secno">3.1.3</span> <span class="content"> Overflow in Print and Other Static Media</span></a> </ol> <li><a href="#overflow-clip-margin"><span class="secno">3.2</span> <span class="content"> Expanding Clipping Bounds: the <span class="property">overflow-clip-margin</span> property</span></a> <li><a href="#overflow-propagation"><span class="secno">3.3</span> <span class="content"> Overflow Viewport Propagation</span></a> <li><a href="#smooth-scrolling"><span class="secno">3.4</span> <span class="content"> Smooth Scrolling: the <span class="property">scroll-behavior</span> Property</span></a> </ol> <li> <a href="#scrollbar-layout"><span class="secno">4</span> <span class="content"> Scrollbars and Layout</span></a> <ol class="toc"> <li><a href="#scrollbar-sizing"><span class="secno">4.1</span> <span class="content"> Scrollbar Contributions to Sizing</span></a> <li><a href="#scrollbar-gutter-property"><span class="secno">4.2</span> <span class="content"> Reserving space for the scrollbar: the <span class="property">scrollbar-gutter</span> property</span></a> </ol> <li> <a href="#auto-ellipsis"><span class="secno">5</span> <span class="content"> Automatic Ellipses</span></a> <ol class="toc"> <li><a href="#text-overflow"><span class="secno">5.1</span> <span class="content"> Overflow Ellipsis: the <span class="property">text-overflow</span> property</span></a> </ol> <li><a href="#priv"><span class="secno"></span> <span class="content">Appendix A. Privacy Considerations</span></a> <li><a href="#sec"><span class="secno"></span> <span class="content">Appendix B. Security Considerations</span></a> <li> <a href="#changes"><span class="secno"></span> <span class="content">Appendix C. Changes</span></a> <ol class="toc"> <li><a href="#changes-since-2021-12-02"><span class="secno"></span> <span class="content"> Changes from the <span>2021-12-02 Working Draft</span></span></a> <li><a href="#changes-since-2020-06-03"><span class="secno"></span> <span class="content"> Changes from the <span>2020-06-03 Working Draft</span></span></a> <li><a href="#changes-since-2018-07-31"><span class="secno"></span> <span class="content"> Changes from the <span>2018-07-31 Working Draft</span></span></a> <li><a href="#old-changes"><span class="secno"></span> <span class="content"> Changes Prior to the <span>2018-07-31 Working Draft</span></span></a> </ol> <li><a href="#acknowledgments"><span class="secno"></span> <span class="content"> Acknowledgments</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> <li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a> <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a> </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>In CSS Level 1 <a data-link-type="biblio" href="#biblio-css1" title="Cascading Style Sheets, level 1">[CSS1]</a>, placing more content than would fit inside an element with a specified size was generally an authoring error. Doing so caused the content to extend outside the bounds of the element, which would likely cause that content to overlap with other elements.</p> <p>CSS Level 2 <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> introduced the <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow④">overflow</a> property, which allows authors to have overflow be handled by scrolling, which means it is no longer an authoring error. It also allows authors to specify that overflow is handled by clipping, which makes sense when the author’s intent is that the content not be shown.</p> <p>This specification introduces the long-standing de-facto <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x">overflow-x</a> and <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y">overflow-y</a> properties, adds a <a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip">clip</a> value, and defines overflow handling more fully.</p> <p>[Something something <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef-max-lines" id="ref-for-propdef-max-lines①">max-lines</a>.]</p> <p class="note" role="note"><span class="marker">Note:</span> This specification also reproduces the definition of the <a class="property css" data-link-type="property" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow②">text-overflow</a> property previously defined in <a data-link-type="biblio" href="#biblio-css-ui-3" title="CSS Basic User Interface Module Level 3 (CSS3 UI)">[CSS-UI-3]</a>, with no addition or modification, in order to present <span class="property" id="ref-for-propdef-text-overflow③">text-overflow</span> and <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef-block-ellipsis" id="ref-for-propdef-block-ellipsis">block-ellipsis</a> together.</p> <h3 class="heading settled" data-level="1.1" id="values"><span class="secno">1.1. </span><span class="content"> Value Definitions</span><a class="self-link" href="#values"></a></h3> <p>This specification follows the <a href="https://www.w3.org/TR/CSS2/about.html#property-defs">CSS property definition conventions</a> from <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> using the <a href="https://www.w3.org/TR/css-values-3/#value-defs">value definition syntax</a> from <a data-link-type="biblio" href="#biblio-css-values-3" title="CSS Values and Units Module Level 3">[CSS-VALUES-3]</a>. Value types not defined in this specification are defined in CSS Values &amp; Units <span title="CSS Values and Units Module Level 3">[CSS-VALUES-3]</span>. Combination with other CSS modules may expand the definitions of these value types.</p> <p>In addition to the property-specific values listed in their definitions, all properties defined in this specification also accept the <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-wide-keywords" id="ref-for-css-wide-keywords">CSS-wide keywords</a> as their property value. For readability they have not been repeated explicitly.</p> <h3 class="heading settled" data-level="1.2" id="placement"><span class="secno">1.2. </span><span class="content"> Module Interactions</span><a class="self-link" href="#placement"></a></h3> <p>This module replaces (supersedes) and extends features defined in <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> section <a href="https://www.w3.org/TR/CSS2/visufx.html#overflow-clipping">11.1 Overflow and clipping</a> and <a data-link-type="biblio" href="#biblio-css-ui-3" title="CSS Basic User Interface Module Level 3 (CSS3 UI)">[CSS-UI-3]</a> section <a href="https://www.w3.org/TR/css-ui-3/#text-overflow">5.2. Overflow Ellipsis: the text-overflow property</a>.</p> <h2 class="heading settled" data-level="2" id="overflow-concepts"><span class="secno">2. </span><span class="content"> Overflow Concepts and Terminology</span><a class="self-link" href="#overflow-concepts"></a></h2> <p>CSS uses the term <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="overflow">overflow</dfn> to describe the contents of a box that extend outside one of that box’s edges (i.e., its <i>content edge</i>, <i>padding edge</i>, <i>border edge</i>, or <i>margin edge</i>). The term might be interpreted as elements or features that cause this overflow, the non-rectangular region occupied by these features, or, more commonly, as the minimal rectangle that bounds that region. A box’s overflow is computed based on the layout and styling of the box itself and of all descendants whose <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#containing-block-chain" id="ref-for-containing-block-chain">containing block chain</a> includes the box.</p> <p>In most cases, <a data-link-type="dfn" href="#overflow" id="ref-for-overflow">overflow</a> can be computed for any box from the bounds and properties of that box itself, plus the <span id="ref-for-overflow①">overflow</span> of each of its children. However, this is not always the case; for example, when <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-transforms-2/#propdef-transform-style" id="ref-for-propdef-transform-style">transform-style: preserve-3d</a> <a data-link-type="biblio" href="#biblio-css3-transforms" title="CSS Transforms Module Level 1">[CSS3-TRANSFORMS]</a> is used on some of the children, any of their descendants with <span class="css" id="ref-for-propdef-transform-style①">transform-style: preserve-3d</span> must also be examined.</p> <p>There are two different types of overflow, which are used for different purposes by the UA:</p> <ul> <li><a data-link-type="dfn" href="#ink-overflow" id="ref-for-ink-overflow">ink overflow</a> <li><a data-link-type="dfn" href="#scrollable-overflow" id="ref-for-scrollable-overflow">scrollable overflow</a> </ul> <h3 class="heading settled" data-level="2.1" id="ink"><span class="secno">2.1. </span><span class="content">Ink Overflow</span><a class="self-link" href="#ink"></a></h3> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="ink-overflow">ink overflow</dfn> of a box is the part of that box and its contents that creates a visual effect outside of the box’s border box. Ink overflow is the overflow of painting effects defined to not affect layout or otherwise extend the <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region">scrollable overflow area</a>, such as <a href="https://www.w3.org/TR/css-backgrounds/#box-shadow">box shadows</a>, <a href>border images</a>, <a href="https://www.w3.org/TR/css-text-decor-3/">text decoration</a>, overhanging glyphs (with negative side bearings, or with ascenders/descenders extending outside the em box), <a href="https://www.w3.org/TR/css-ui-3/#outline-props">outlines</a>, etc.</p> <p>Since some effects in CSS (for example, the blurs in <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-text-decor-4/#propdef-text-shadow" id="ref-for-propdef-text-shadow">text-shadow</a> <a data-link-type="biblio" href="#biblio-css-text-3" title="CSS Text Module Level 3">[CSS-TEXT-3]</a> and <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> <a data-link-type="biblio" href="#biblio-css-backgrounds-3" title="CSS Backgrounds and Borders Module Level 3">[CSS-BACKGROUNDS-3]</a>, which are theoretically infinite) do not define what visual extent they cover, the extent of the <a data-link-type="dfn" href="#ink-overflow" id="ref-for-ink-overflow①">ink overflow</a> is undefined.</p> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="ink overflow region | ink overflow area" id="ink-overflow-region">ink overflow area</dfn> is the non-rectangular area occupied by the <a data-link-type="dfn" href="#ink-overflow" id="ref-for-ink-overflow②">ink overflow</a> of a box and its contents, and the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="ink-overflow-rectangle">ink overflow rectangle</dfn> is the minimal rectangle whose axes are aligned to the box’s axes and that contains the <a data-link-type="dfn" href="#ink-overflow-region" id="ref-for-ink-overflow-region">ink overflow area</a>. Note that the <a data-link-type="dfn" href="#ink-overflow-rectangle" id="ref-for-ink-overflow-rectangle">ink overflow rectangle</a> is a rectangle in the box’s coordinate system, but might be non-rectangular in other coordinate systems due to transforms. <a data-link-type="biblio" href="#biblio-css3-transforms" title="CSS Transforms Module Level 1">[CSS3-TRANSFORMS]</a></p> <p>Any overflow of <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#replaced-element" id="ref-for-replaced-element">replaced</a> content is always <a data-link-type="dfn" href="#ink-overflow" id="ref-for-ink-overflow③">ink overflow</a> (as opposed to <a data-link-type="dfn" href="#scrollable-overflow" id="ref-for-scrollable-overflow①">scrollable overflow</a>).</p> <h3 class="heading settled" data-level="2.2" id="scrollable"><span class="secno">2.2. </span><span class="content"> Scrollable Overflow</span><a class="self-link" href="#scrollable"></a></h3> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scrollable-overflow">scrollable overflow</dfn> of a box is the set of things extending outside of that box’s padding edge for which a scrolling mechanism needs to be provided.</p> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="scrollable overflow region | scrollable overflow area" id="scrollable-overflow-region">scrollable overflow area</dfn> is the non-rectangular region occupied by the <a data-link-type="dfn" href="#scrollable-overflow" id="ref-for-scrollable-overflow②">scrollable overflow</a>, and the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scrollable-overflow-rectangle">scrollable overflow rectangle</dfn> is the minimal rectangle whose axes are aligned to the box’s axes and that contains the <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region①">scrollable overflow area</a>.</p> <p>The <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region②">scrollable overflow area</a> is the union of:</p> <ul> <li> The <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container">scroll container</a>’s own <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#padding-box" id="ref-for-padding-box">padding box</a>. <li> All <a data-link-type="dfn" href="https://drafts.csswg.org/css-inline-3/#line-box" id="ref-for-line-box">line boxes</a> directly contained by the <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①">scroll container</a>. <li> The border boxes of all boxes for which it is the containing block and whose border boxes are positioned not wholly in the <a data-link-type="dfn" href="#negative-scrollable-overflow-region" id="ref-for-negative-scrollable-overflow-region">negative scrollable overflow region</a>, accounting for transforms by projecting each box onto the plane of the element that establishes its <a data-link-type="dfn" href="https://drafts.csswg.org/css-transforms-2/#3d-rendering-context" id="ref-for-3d-rendering-context">3D rendering context</a>. <a data-link-type="biblio" href="#biblio-css3-transforms" title="CSS Transforms Module Level 1">[CSS3-TRANSFORMS]</a> <p class="issue" id="issue-df7ef6c3"><a class="self-link" href="#issue-df7ef6c3"></a> Is this description of handling transforms sufficiently accurate?</p> <p>Border boxes with zero area do not affect the <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region③">scrollable overflow area</a>.</p> <li> The margin areas of <a data-link-type="dfn" href="https://drafts.csswg.org/css-grid-2/#grid-item" id="ref-for-grid-item">grid item</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-item" id="ref-for-flex-item">flex item</a> boxes for which the box establishes a containing block. <p>The UA may <em>additionally</em> include the margin areas of other boxes for which the box establishes a containing block; however, the conditions under which such margin areas are included is undefined in this level. <span class="issue" id="issue-b9c7269c"><a class="self-link" href="#issue-b9c7269c"></a>This needs further testing and investigation; is therefore deferred in this draft.</span></p> <li> The <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region④">scrollable overflow areas</a> of all of the above boxes (including zero-area boxes and accounting for transforms as described above), provided they themselves have <a class="css" data-link-type="propdesc" href="#propdef-overflow" id="ref-for-propdef-overflow⑤">overflow: visible</a> (i.e. do not themselves trap the overflow) and that <a data-link-type="dfn" href="#scrollable-overflow" id="ref-for-scrollable-overflow③">scrollable overflow</a> is not already clipped (e.g. by the <a class="property css" data-link-type="property" href="https://drafts.fxtf.org/css-masking-1/#propdef-clip" id="ref-for-propdef-clip">clip</a> property or the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-contain-2/#propdef-contain" id="ref-for-propdef-contain">contain</a> property). <p class="note" role="note"><span class="marker">Note:</span> The <span class="css">mask-*</span> properties <a data-link-type="biblio" href="#biblio-css-masking-1" title="CSS Masking Module Level 1">[CSS-MASKING-1]</a> do not affect the <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region⑤">scrollable overflow area</a>.</p> <p class="issue" id="issue-b127a295"><a class="self-link" href="#issue-b127a295"></a> Need to evaluate what should/should not clip <a data-link-type="dfn" href="#scrollable-overflow" id="ref-for-scrollable-overflow④">scrollable overflow</a>. <a href="https://github.com/w3c/csswg-drafts/issues/8607">[Issue #8607]</a></p> <li> Additional padding added to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#css-end" id="ref-for-css-end">end</a>-side of the <a data-link-type="dfn" href="#scrollable-overflow-rectangle" id="ref-for-scrollable-overflow-rectangle">scrollable overflow rectangle</a> as necessary to enable a scroll position that satisfies the requirements of <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-align-3/#propdef-place-content" id="ref-for-propdef-place-content">place-content: end</a> alignment. <p class="note" role="note"><span class="marker">Note:</span> This padding represents, within the <a data-link-type="dfn" href="#scrollable-overflow-rectangle" id="ref-for-scrollable-overflow-rectangle①">scrollable overflow rectangle</a>, the box’s own padding so that when its content is scrolled to the end, there is padding between the end-edge of its in-flow (or floated) content and the border edge of the box. It typically ends up being exactly the same size as the box’s own padding, except in a few cases—​such as when an out-of-flow positioned element, or the visible overflow of a descendent, has already increased the size of the <span id="ref-for-scrollable-overflow-rectangle②">scrollable overflow rectangle</span> outside the conceptual “content edge” of the <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container②">scroll container</a>’s content.</p> <figure> <img height="404" src="images/scroll-align-padding.jpg" width="917"> <figcaption> Issue: Replace this image with a proper SVG. </figcaption> </figure> </ul> <p>Additionally, due to Web-compatibility constraints (caused by authors exploiting legacy bugs to surreptitiously hide content from visual readers but not search engines and/or speech output), UAs must clip any content in the <a data-link-type="dfn" href="#negative-scrollable-overflow-region" id="ref-for-negative-scrollable-overflow-region①">negative scrollable overflow region</a> (thereby behaving as if they had no <a data-link-type="dfn" href="#scrollable-overflow" id="ref-for-scrollable-overflow⑤">scrollable overflow</a> on the wrong side of the <a data-link-type="dfn" href="#scroll-origin" id="ref-for-scroll-origin">scroll origin</a>).</p> <p class="note" role="note"><span class="marker">Note:</span> The <a data-link-type="dfn" href="#scrollable-overflow-rectangle" id="ref-for-scrollable-overflow-rectangle③">scrollable overflow rectangle</a> is always a rectangle in the box’s own coordinate system, but might be non-rectangular in other coordinate systems due to transforms <a data-link-type="biblio" href="#biblio-css3-transforms" title="CSS Transforms Module Level 1">[CSS3-TRANSFORMS]</a>. This means scrollbars can sometimes appear when not actually necessary.</p> <h3 class="heading settled" data-level="2.3" id="scrolling"><span class="secno">2.3. </span><span class="content"> Scrolling Overflow</span><a class="self-link" href="#scrolling"></a></h3> <p>A box’s <a data-link-type="dfn" href="#overflow" id="ref-for-overflow②">overflow</a> can be visible or clipped. CSS also allows a box to be a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scroll-container">scroll container</dfn> that allows clipped parts of its <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region⑥">scrollable overflow area</a> to be scrolled into view. The visual “viewport” of a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container③">scroll container</a> (through which the <span id="ref-for-scrollable-overflow-region⑦">scrollable overflow area</span> can be viewed) coincides with its padding box, and is called the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scrollport">scrollport</dfn>. A box’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="nearest-scrollport">nearest scrollport</dfn> is the <a data-link-type="dfn" href="#scrollport" id="ref-for-scrollport">scrollport</a> of its nearest <span id="ref-for-scroll-container④">scroll container</span> ancestor.</p> <p>Scrolling operations can be initiated by the user (for example, by manipulating a scrollbar, swiping a touchscreen, or using keyboard controls) or by script (<span class="non-normative">for example, by the <code class="idl"><a data-link-type="idl" href="https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview" id="ref-for-dom-element-scrollintoview">scrollIntoView()</a></code> or <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus" id="ref-for-dom-window-focus">focus()</a></code> APIs</span>). The initial position of the <a data-link-type="dfn" href="#scrollable-overflow-rectangle" id="ref-for-scrollable-overflow-rectangle④">scrollable overflow rectangle</a> within the <a data-link-type="dfn" href="#scrollport" id="ref-for-scrollport①">scrollport</a> before any scrolling operations take effect is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="initial-scroll-position">initial scroll position</dfn>. The <a data-link-type="dfn" href="#initial-scroll-position" id="ref-for-initial-scroll-position">initial scroll position</a> is typically dependent on the <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container⑤">scroll container</a>’s <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#writing-mode" id="ref-for-writing-mode">writing mode</a>, and, unless otherwise specified, coincides with its <a data-link-type="dfn" href="#scroll-origin-position" id="ref-for-scroll-origin-position">scroll origin position</a>. However, the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-align-3/#propdef-align-content" id="ref-for-propdef-align-content">align-content</a> and <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-align-3/#propdef-justify-content" id="ref-for-propdef-justify-content">justify-content</a> properties <a data-link-type="biblio" href="#biblio-css-align-3" title="CSS Box Alignment Module Level 3">[CSS-ALIGN-3]</a> as well as the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-scroll-snap-2/#propdef-scroll-initial-target" id="ref-for-propdef-scroll-initial-target">scroll-initial-target</a> property <a data-link-type="biblio" href="#biblio-css-scroll-snap-2" title="CSS Scroll Snap Module Level 2">[CSS-SCROLL-SNAP-2]</a> can be used to change the <span id="ref-for-initial-scroll-position①">initial scroll position</span>, see <a href="https://drafts.csswg.org/css-align-3/#overflow-scroll-position"><cite>CSS Box Alignment 3</cite> § 5.3 Overflow and Scroll Positions</a>.</p> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scroll-position">scroll position</dfn> is a particular alignment of the <a data-link-type="dfn" href="#scrollable-overflow-rectangle" id="ref-for-scrollable-overflow-rectangle⑤">scrollable overflow rectangle</a> within its <a data-link-type="dfn" href="#scrollport" id="ref-for-scrollport②">scrollport</a>. It is associated with a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scroll-offset">scroll offset</dfn> which is its distance from the <a data-link-type="dfn" href="#scroll-origin" id="ref-for-scroll-origin①">scroll origin</a>.</p> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scroll-origin">scroll origin</dfn> is the anchor coordinate of the <a data-link-type="dfn" href="#scrollable-overflow-rectangle" id="ref-for-scrollable-overflow-rectangle⑥">scrollable overflow rectangle</a>, from which the <span id="ref-for-scrollable-overflow-rectangle⑦">scrollable overflow rectangle</span> expands. Unless otherwise specified, it is the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#block-start" id="ref-for-block-start">block-start</a> <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-start" id="ref-for-inline-start">inline-start</a> corner of the <span id="ref-for-scrollable-overflow-rectangle⑧">scrollable overflow rectangle</span>. (For example, in a <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#flex-container" id="ref-for-flex-container">flex container</a> it is the <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#main-start" id="ref-for-main-start">main-start</a> <a data-link-type="dfn" href="https://drafts.csswg.org/css-flexbox-1/#cross-start" id="ref-for-cross-start">cross-start</a> corner.) The area beyond the <a data-link-type="dfn" href="#scroll-origin" id="ref-for-scroll-origin②">scroll origin</a> in either axis is considered the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="negative-scrollable-overflow-region">negative scrollable overflow region</dfn>: content rendered here is not accessible to the reader, see <a href="#scrollable">§ 2.2 Scrollable Overflow</a>. A <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container⑥">scroll container</a> is said to be scrolled to its <span id="ref-for-scroll-origin③">scroll origin</span> when its <span id="ref-for-scroll-origin④">scroll origin</span> coincides with the corresponding corner of its <a data-link-type="dfn" href="#scrollport" id="ref-for-scrollport③">scrollport</a>. This <a data-link-type="dfn" href="#scroll-position" id="ref-for-scroll-position">scroll position</a>, the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scroll-origin-position">scroll origin position</dfn>, usually, but not always, coincides with the <a data-link-type="dfn" href="#initial-scroll-position" id="ref-for-initial-scroll-position②">initial scroll position</a>.</p> <div class="example" id="example-2f32d53b"><a class="self-link" href="#example-2f32d53b"></a> For example, the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-align-3/#propdef-align-content" id="ref-for-propdef-align-content①">align-content</a> and <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-align-3/#propdef-justify-content" id="ref-for-propdef-justify-content①">justify-content</a> properties <a data-link-type="biblio" href="#biblio-css-align-3" title="CSS Box Alignment Module Level 3">[CSS-ALIGN-3]</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap" id="ref-for-scroll-snap">scroll snapping</a> <a data-link-type="biblio" href="#biblio-css-scroll-snap-1" title="CSS Scroll Snap Module Level 1">[CSS-SCROLL-SNAP-1]</a> can change the <a data-link-type="dfn" href="#initial-scroll-position" id="ref-for-initial-scroll-position③">initial scroll position</a> away from the <a data-link-type="dfn" href="#scroll-origin-position" id="ref-for-scroll-origin-position①">scroll origin position</a>. </div> <p class="issue" id="issue-ba58968a"><a class="self-link" href="#issue-ba58968a"></a> Check whether things like <a data-link-type="dfn" href="https://drafts.csswg.org/css-align-3/#baseline-alignment" id="ref-for-baseline-alignment">baseline alignment</a> depend on the <a data-link-type="dfn" href="#initial-scroll-position" id="ref-for-initial-scroll-position④">initial scroll position</a> or the <a data-link-type="dfn" href="#scroll-origin-position" id="ref-for-scroll-origin-position②">scroll origin position</a>.</p> <p class="issue" id="issue-223d3747"><a class="self-link" href="#issue-223d3747"></a> This doesn’t define a coordinate system for <a data-link-type="dfn" href="#scroll-offset" id="ref-for-scroll-offset">scroll offsets</a>. Whether they increase downward/rightward, block/inline-axis endward, or away from the <a data-link-type="dfn" href="#scroll-origin" id="ref-for-scroll-origin⑤">scroll origin</a> is not defined. Should each API define its coordinate model?</p> <p>The root viewport, which scrolls the page <a data-link-type="dfn" href="https://svgwg.org/svg2-draft/coords.html#TermCanvas" id="ref-for-TermCanvas">canvas</a>, uses the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#principal-writing-mode" id="ref-for-principal-writing-mode">principal writing mode</a> for determining its <a data-link-type="dfn" href="#scroll-origin" id="ref-for-scroll-origin⑥">scroll origin</a> and <a data-link-type="dfn" href="#initial-scroll-position" id="ref-for-initial-scroll-position⑤">initial scroll position</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> In the case where a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container⑦">scroll container</a> (or one of its ancestors) is the target of a graphical transform, the UA might need to take this transform into account when mapping user inputs to scrolling operations. For instance, on a touch screen where the user scrolls by directly dragging the content, the transform would be expected to be taken into account to match the direction of scrolling to the gesture. On the other hand, other user inputs (such as the Page Down key, or a 1D scroll wheel) might be more naturally interpreted ignoring the transform. Choosing the appropriate behavior for each scrolling mechanism is the responsibility of the UA.</p> <h2 class="heading settled" data-level="3" id="overflow-properties"><span class="secno">3. </span><span class="content"> Scrolling and Clipping Overflow</span><a class="self-link" href="#overflow-properties"></a></h2> <h3 class="heading settled" data-level="3.1" id="overflow-control"><span class="secno">3.1. </span><span class="content"> Managing Overflow: the <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x①">overflow-x</a>, <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y①">overflow-y</a>, and <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow⑥">overflow</a> properties</span><a class="self-link" href="#overflow-control"></a></h3> <p>These properties specify whether a box’s <a data-link-type="dfn" href="#overflow" id="ref-for-overflow③">overflow</a> is clipped, and if so, whether it is a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container⑧">scroll container</a>.</p> <table class="def propdef" data-link-for-hint="overflow-x"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-overflow-x">overflow-x</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-overflow-y">overflow-y</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-overflow-block">overflow-block</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-overflow-inline">overflow-inline</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">visible <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one">|</a> hidden <span id="ref-for-comb-one①">|</span> clip <span id="ref-for-comb-one②">|</span> scroll <span id="ref-for-comb-one③">|</span> auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td><a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible">visible</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>block containers <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>, flex containers <a data-link-type="biblio" href="#biblio-css3-flexbox" title="CSS Flexible Box Layout Module Level 1">[CSS3-FLEXBOX]</a>, grid containers <a data-link-type="biblio" href="#biblio-css3-grid-layout" title="CSS Grid Layout Module Level 1">[CSS3-GRID-LAYOUT]</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>no <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>usually specified value, but see text <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete <tr> <th><a href="https://drafts.csswg.org/css-logical-1/#logical-property-group" id="1cb7bf200">Logical property group:</a> <td><a class="css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow⑦">overflow</a> </table> <p>The <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x②">overflow-x</a> property specifies the handling of <a data-link-type="dfn" href="#overflow" id="ref-for-overflow④">overflow</a> in the horizontal axis (i.e., overflow from the left and right sides of the box), and the <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y②">overflow-y</a> property specifies the handling of <span id="ref-for-overflow⑤">overflow</span> in the vertical axis (i.e., overflow from the top and bottom sides of the box).</p> <p>The <a class="property css" data-link-type="property" href="#propdef-overflow-block" id="ref-for-propdef-overflow-block">overflow-block</a> and <a class="property css" data-link-type="property" href="#propdef-overflow-inline" id="ref-for-propdef-overflow-inline">overflow-inline</a> properties likewise specify the handling of <a data-link-type="dfn" href="#overflow" id="ref-for-overflow⑥">overflow</a> in the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#block-axis" id="ref-for-block-axis">block</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-axis" id="ref-for-inline-axis">inline</a> axis, respectively</p> <p>These four properties form a <a data-link-type="dfn" href="https://drafts.csswg.org/css-logical-1/#logical-property-group" id="ref-for-logical-property-group">logical property group</a> together with the <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow⑧">overflow</a> <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#shorthand-property" id="ref-for-shorthand-property">shorthand</a>, and interact as defined in <a href="https://drafts.csswg.org/css-logical-1/#box"><cite>CSS Logical Properties 1</cite> § 4 Flow-Relative Box Model Properties</a>.</p> <table class="def propdef" data-link-for-hint="overflow"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-overflow">overflow</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod"><a class="production css" data-link-type="property" href="#propdef-overflow-block" id="ref-for-propdef-overflow-block①">&lt;'overflow-block'></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-num-range" id="ref-for-mult-num-range">{1,2}</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>visible <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>block containers <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>, flex containers <a data-link-type="biblio" href="#biblio-css3-flexbox" title="CSS Flexible Box Layout Module Level 1">[CSS3-FLEXBOX]</a>, and grid containers <a data-link-type="biblio" href="#biblio-css3-grid-layout" title="CSS Grid Layout Module Level 1">[CSS3-GRID-LAYOUT]</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>no <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>see individual properties <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar </table> <p>The <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow⑨">overflow</a> property is a <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#shorthand-property" id="ref-for-shorthand-property①">shorthand property</a> that sets the specified values of <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x③">overflow-x</a> and <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y③">overflow-y</a> in that order. If the second value is omitted, it is copied from the first.</p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="overflow, overflow-x, overflow-y" data-dfn-type="value" data-export id="valdef-overflow-visible">visible</dfn> <dd> There is no special handling of overflow, that is, the box’s content is rendered outside the box if positioned there. The box is not a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container⑨">scroll container</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="overflow, overflow-x, overflow-y" data-dfn-type="value" data-export id="valdef-overflow-hidden">hidden</dfn> <dd> This value indicates that the box’s content is clipped to its <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#padding-box" id="ref-for-padding-box①">padding box</a> and that the UA must not provide any scrolling user interface to view the content outside the clipping region, nor allow scrolling by direct intervention of the user, such as dragging on a touch screen or using the scrolling wheel on a mouse. However, the content must still be scrollable programmatically, for example using the mechanisms defined in <a data-link-type="biblio" href="#biblio-cssom-view" title="CSSOM View Module">[CSSOM-VIEW]</a>, and the box is therefore still a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①⓪">scroll container</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="overflow, overflow-x, overflow-y" data-dfn-type="value" data-export id="valdef-overflow-clip">clip</dfn> <dd> This value indicates that the box’s content is clipped to its <a data-link-type="dfn" href="#overflow-clip-edge" id="ref-for-overflow-clip-edge">overflow clip edge</a> and that no scrolling user interface should be provided by the UA to view the content outside the clipping region. In addition, unlike <a class="css" data-link-type="propdesc" href="#propdef-overflow" id="ref-for-propdef-overflow①⓪">overflow: hidden</a> which still allows programmatic scrolling, <span class="css" id="ref-for-propdef-overflow①①">overflow: clip</span> forbids scrolling entirely, through any mechanism, and therefore the box is not a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①①">scroll container</a>. <p>Unlike <a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden">hidden</a>, this value <strong>does not</strong> cause the element to establish a new formatting context.</p> <p class="note" role="note"><span class="marker">Note:</span> Authors who also want the box to establish a formatting context may use <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-display-3/#propdef-display" id="ref-for-propdef-display">display: flow-root</a> together with <a class="css" data-link-type="propdesc" href="#propdef-overflow" id="ref-for-propdef-overflow①②">overflow: clip</a>.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="overflow, overflow-x, overflow-y" data-dfn-type="value" data-export id="valdef-overflow-scroll">scroll</dfn> <dd> This value indicates that the content is clipped to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#padding-box" id="ref-for-padding-box②">padding box</a>, but can be scrolled into view (and therefore the box is a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①②">scroll container</a>). Furthermore, if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism should be displayed whether or not any of its content is clipped. This avoids any problem with scrollbars appearing and disappearing in a dynamic environment. When the target medium is <span class="css">print</span>, overflowing content may be printed; it is not defined where it may be printed. <dt><dfn class="dfn-paneled css" data-dfn-for="overflow, overflow-x, overflow-y" data-dfn-type="value" data-export id="valdef-overflow-auto">auto</dfn> <dd> Like <a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll">scroll</a> when the box has <a data-link-type="dfn" href="#scrollable-overflow" id="ref-for-scrollable-overflow⑥">scrollable overflow</a>; like <a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden①">hidden</a> otherwise. Thus, if the user agent uses a scrolling mechanism that is visible on the screen (such as a scroll bar or a panner), that mechanism will only be displayed if there is overflow. </dl> <p>The <a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll①">scroll</a>, <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto">auto</a>, and <a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden②">hidden</a> values are known as the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="scrollable overflow value" id="scrollable-overflow-value">scrollable values</dfn> of <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow①③">overflow</a>. The <a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible①">visible</a> and <a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip①">clip</a> values are known as the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="non-scrollable overflow value" id="non-scrollable-overflow-value">non-scrollable values</dfn>.</p> <p>The <a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible②">visible</a>/<a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip②">clip</a> values of <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow①④">overflow</a> compute to <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto①">auto</a>/<a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden③">hidden</a> (respectively) if one of <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x④">overflow-x</a> or <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y④">overflow-y</a> is neither <span class="css" id="ref-for-valdef-overflow-visible③">visible</span> nor <span class="css" id="ref-for-valdef-overflow-clip③">clip</span>. On <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#replaced-element" id="ref-for-replaced-element①">replaced elements</a>, a <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#computed-value" id="ref-for-computed-value">computed</a> <span class="css" id="ref-for-valdef-overflow-hidden④">hidden</span> value further resolves to a <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#used-value" id="ref-for-used-value">used value</a> of <span class="css" id="ref-for-valdef-overflow-clip④">clip</span>.</p> <p>If the computed value of <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow①⑤">overflow</a> on a <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#block-box" id="ref-for-block-box">block box</a> is neither <a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible④">visible</a> nor <a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip⑤">clip</a> nor a combination thereof, it <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#establish-an-independent-formatting-context" id="ref-for-establish-an-independent-formatting-context">establishes an independent formatting context</a> for its contents.</p> <p>User agents must also support the <dfn class="dfn-paneled css" data-dfn-for="overflow, overflow-x, overflow-y, overflow-block, overflow-inline" data-dfn-type="value" data-export id="valdef-overflow-overlay">overlay</dfn> keyword as a <a data-link-type="dfn" href="https://drafts.csswg.org/css-cascade-5/#css-legacy-value-alias" id="ref-for-css-legacy-value-alias">legacy value alias</a> of <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto②">auto</a>.</p> <h4 class="heading settled" data-level="3.1.1" id="scroll-visibility"><span class="secno">3.1.1. </span><span class="content"> Interaction of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-display-4/#propdef-visibility" id="ref-for-propdef-visibility">visibility</a> and <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow①⑥">overflow</a></span><a class="self-link" href="#scroll-visibility"></a></h4> <p>If the computed value of the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-display-4/#propdef-visibility" id="ref-for-propdef-visibility①">visibility</a> property is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-display-4/#valdef-visibility-hidden" id="ref-for-valdef-visibility-hidden">hidden</a> (or <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-display-4/#valdef-visibility-collapse" id="ref-for-valdef-visibility-collapse">collapse</a> when it has the same effect as <span class="css" id="ref-for-valdef-visibility-hidden①">hidden</span>), and <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow①⑦">overflow</a> is either <a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll②">scroll</a> or <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto③">auto</a>, then:</p> <ul> <li data-md> <p>The user agent must not make any scrolling mechanism visible. To the extent that the scrolling mechanism that would normally be visible in the absence of <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-display-4/#propdef-visibility" id="ref-for-propdef-visibility②">visibility: hidden</a> affects layout, it continues to do so, but is not painted.</p> <li data-md> <p>As would be the case with <a class="css" data-link-type="propdesc" href="#propdef-overflow" id="ref-for-propdef-overflow①⑧">overflow: hidden</a>, scrolling directly triggered by user interactions is disabled, but programmatic scrolling continues to take effect.</p> <li data-md> <p>The lack of interactive direct scrolling is enforced even if the user interacts (e.g. with a mouse scrolling wheel) with a descendent of the <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-display-4/#propdef-visibility" id="ref-for-propdef-visibility③">visibility: hidden</a> <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①③">scroll container</a> that is itself set to <span class="css" id="ref-for-propdef-visibility④">visibility: visible</span>.</p> </ul> <h4 class="heading settled" data-level="3.1.2" id="corner-clipping"><span class="secno">3.1.2. </span><span class="content"> Interaction of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-radius" id="ref-for-propdef-border-radius">border-radius</a> and <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow①⑨">overflow</a></span><a class="self-link" href="#corner-clipping"></a></h4> <p>As mentioned in <a href="https://drafts.csswg.org/css-backgrounds-3/#corner-clipping"><cite>CSS Backgrounds 3</cite> § 4.3 Corner Clipping</a>, the clipping region established by <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow②⓪">overflow</a> can be rounded:</p> <ul> <li data-md> <p>When <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x⑤">overflow-x</a> and <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y⑤">overflow-y</a> compute to <a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden⑤">hidden</a>, <a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll③">scroll</a>, or <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto④">auto</a>, the clipping region is rounded based on the border radius, adjusted to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#padding-edge" id="ref-for-padding-edge">padding edge</a>, as described in <a href="https://drafts.csswg.org/css-backgrounds-3/#corner-shaping"><cite>CSS Backgrounds 3</cite> § 4.2 Corner Shaping</a>.</p> <li data-md> <p>When both <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x⑥">overflow-x</a> and <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y⑥">overflow-y</a> compute to <a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip⑥">clip</a>, the clipping region is rounded as described in <a href="#overflow-clip-margin">§ 3.2 Expanding Clipping Bounds: the overflow-clip-margin property</a>.</p> <li data-md> <p>However, when one of <a class="property css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x⑦">overflow-x</a> or <a class="property css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y⑦">overflow-y</a> computes to <a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip⑦">clip</a> and the other computes to <a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible⑤">visible</a>, the clipping region is not rounded.</p> </ul> <h4 class="heading settled" data-level="3.1.3" id="static-media"><span class="secno">3.1.3. </span><span class="content"> Overflow in Print and Other Static Media</span><a class="self-link" href="#static-media"></a></h4> <p class="advisement"> Since scrolling is not possible in static media (such as print) authors should be careful to make content accessible in such media, for example by using <span class="css">@media print, (update: none) { … }</span> to adjust layout such that all relevant content is simultaneously visible. </p> <p>On <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①④">scroll containers</a> in non-interactive media with an <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow②①">overflow</a> value of <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto⑤">auto</a> or <a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll④">scroll</a> (but not <a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden⑥">hidden</a>) UAs may display an indication of any scrollable overflow, such as by displaying scrollbars or an ellipsis.</p> <p class="note" role="note"><span class="marker">Note:</span> Not all <a data-link-type="dfn" href="https://drafts.csswg.org/mediaqueries-5/#paged-media" id="ref-for-paged-media">paged media</a> is non-interactive: for example, e-book readers paginate content, but are interactive.</p> <h3 class="heading settled" data-level="3.2" id="overflow-clip-margin"><span class="secno">3.2. </span><span class="content"> Expanding Clipping Bounds: the <a class="property css" data-link-type="property" href="#propdef-overflow-clip-margin" id="ref-for-propdef-overflow-clip-margin②">overflow-clip-margin</a> property</span><a class="self-link" href="#overflow-clip-margin"></a></h3> <table class="def propdef" data-link-for-hint="overflow-clip-margin"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-overflow-clip-margin">overflow-clip-margin</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-box-4/#typedef-visual-box" id="ref-for-typedef-visual-box">&lt;visual-box></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-any" id="ref-for-comb-any">||</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#length-value" id="ref-for-length-value">&lt;length [0,∞]></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td><span class="css">0px</span> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>boxes to which <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow②②">overflow</a> applies <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>no <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>the computed <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#length-value" id="ref-for-length-value①">&lt;length></a> and a <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-box-4/#typedef-visual-box" id="ref-for-typedef-visual-box①">&lt;visual-box></a> keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>per computed value if the <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-box-4/#typedef-visual-box" id="ref-for-typedef-visual-box②">&lt;visual-box></a> values match; otherwise discrete </table> <p>This property defines the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="overflow-clip-edge">overflow clip edge</dfn> of the box, i.e. precisely <em>how far</em> outside its bounds the box’s content is allowed to paint before being clipped by effects (such as <a class="css" data-link-type="propdesc" href="#propdef-overflow" id="ref-for-propdef-overflow②③">overflow: clip</a>, above) that are defined to clip to the box’s <a data-link-type="dfn" href="#overflow-clip-edge" id="ref-for-overflow-clip-edge①">overflow clip edge</a>.</p> <p>Values are defined as follows:</p> <dl> <dt data-md><dfn class="dfn-paneled css" data-dfn-for="overflow-clip-margin" data-dfn-type="value" data-export id="valdef-overflow-clip-margin-visual-box"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-box-4/#typedef-visual-box" id="ref-for-typedef-visual-box③">&lt;visual-box></a></dfn> <dd data-md> <p>Specifies the box edge to use as the <a data-link-type="dfn" href="#overflow-clip-edge" id="ref-for-overflow-clip-edge②">overflow clip edge</a> origin, i.e. when the specified offset is zero.</p> <p>If omitted, defaults to <span class="css">padding-box</span>.</p> <dt data-md><dfn class="dfn-paneled css" data-dfn-for="overflow-clip-margin" data-dfn-type="value" data-export id="valdef-overflow-clip-margin-length-0"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#length-value" id="ref-for-length-value②">&lt;length [0,∞]></a></dfn> <dd data-md> <p>The specified offset dictates how much the <a data-link-type="dfn" href="#overflow-clip-edge" id="ref-for-overflow-clip-edge③">overflow clip edge</a> is expanded from the specified box edge Negative values are invalid. Defaults to zero if omitted.</p> </dl> <p>The <a data-link-type="dfn" href="#overflow-clip-edge" id="ref-for-overflow-clip-edge④">overflow clip edge</a> is shaped in the corners exactly the same way as an <a data-link-type="dfn" href="https://drafts.csswg.org/css-backgrounds-3/#box-shadow-outer-box-shadow" id="ref-for-box-shadow-outer-box-shadow">outer box-shadow</a> with a spread radius of the same cumulative offset from the box’s <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#border-edge" id="ref-for-border-edge">border edge</a>. See <a href="https://drafts.csswg.org/css-backgrounds-3/#corner-shaping"><cite>CSS Backgrounds 3</cite> § 4.2 Corner Shaping</a> and <a href="https://drafts.csswg.org/css-backgrounds-3/#shadow-shape"><cite>CSS Backgrounds 3</cite> § 6.1.1 Shadow Shape, Spread, and Knockout</a>, noting in particular the formula for outsets beyond the <span id="ref-for-border-edge①">border edge</span>.</p> <p class="note" role="note"><span class="marker">Note:</span> This property has no effect on boxes with <a class="css" data-link-type="propdesc" href="#propdef-overflow" id="ref-for-propdef-overflow②④">overflow: hidden</a> or <span class="css" id="ref-for-propdef-overflow②⑤">overflow: scroll</span>, which are not defined to use the <a data-link-type="dfn" href="#overflow-clip-edge" id="ref-for-overflow-clip-edge⑤">overflow clip edge</a>.</p> <h3 class="heading settled" data-level="3.3" id="overflow-propagation"><span class="secno">3.3. </span><span class="content"> Overflow Viewport Propagation</span><a class="self-link" href="#overflow-propagation"></a></h3> <p>UAs must apply the <span class="css">overflow-*</span> values set on the root element to the <a data-link-type="dfn" href="https://w3c.github.io/epub-specs/epub33/core/#dfn-viewport" id="ref-for-dfn-viewport">viewport</a> when the root element’s <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-display-3/#propdef-display" id="ref-for-propdef-display①">display</a> value is not <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-display-4/#valdef-display-none" id="ref-for-valdef-display-none">none</a>. However, when the root element is an <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a> <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/semantics.html#the-html-element" id="ref-for-the-html-element">html</a></code> element (including <a href="https://html.spec.whatwg.org/multipage/introduction.html#html-vs-xhtml">XML syntax for HTML</a>) whose <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow②⑥">overflow</a> value is <a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible⑥">visible</a> (in both axes), and that element has as a child a <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element">body</a></code> element whose <span class="property" id="ref-for-propdef-display②">display</span> value is also not <span class="css" id="ref-for-valdef-display-none①">none</span>, user agents must instead apply the <span class="css">overflow-*</span> values of the first such child element to the viewport. The element from which the value is propagated must then have a used <span class="property" id="ref-for-propdef-overflow②⑦">overflow</span> value of <span class="css" id="ref-for-valdef-overflow-visible⑦">visible</span>.</p> <p class="note" role="note"><span class="marker">Note:</span> Using <a data-link-type="dfn" href="https://drafts.csswg.org/css-contain-2/#containment" id="ref-for-containment">containment</a> on the HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/semantics.html#the-html-element" id="ref-for-the-html-element①">html</a></code> or <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element①">body</a></code> elements disables this special handling of the HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element②">body</a></code> element. See the <a href="https://drafts.csswg.org/css-contain-1/#contain-property"><cite>CSS Containment 1</cite> § 2 Strong Containment: the contain property</a> for details.</p> <p class="note" role="note"><span class="marker">Note:</span> <a class="css" data-link-type="propdesc" href="#propdef-overflow" id="ref-for-propdef-overflow②⑧">overflow: hidden</a> on the root element might not clip everything outside the <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#initial-containing-block" id="ref-for-initial-containing-block">Initial Containing Block</a> if the ICB is smaller than the viewport, which can happen on mobile.</p> <p>If <a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible⑧">visible</a> is applied to the viewport, it must be interpreted as <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto⑥">auto</a>. If <a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip⑧">clip</a> is applied to the viewport, it must be interpreted as <a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden⑦">hidden</a>.</p> <h3 class="heading settled caniuse-paneled" data-level="3.4" id="smooth-scrolling"><span class="secno">3.4. </span><span class="content"> Smooth Scrolling: the <a class="property css" data-link-type="property" href="#propdef-scroll-behavior" id="ref-for-propdef-scroll-behavior">scroll-behavior</a> Property</span><a class="self-link" href="#smooth-scrolling"></a></h3> <table class="def propdef" data-link-for-hint="scroll-behavior"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scroll-behavior">scroll-behavior</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one④">|</a> smooth <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td><a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①⑤">scroll containers</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>no <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified value <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>not animatable </table> <p>The <a class="property css" data-link-type="property" href="#propdef-scroll-behavior" id="ref-for-propdef-scroll-behavior①">scroll-behavior</a> property specifies the scrolling behavior for a <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①⑥">scroll container</a>, when scrolling happens due to navigation, scrolling APIs <a data-link-type="biblio" href="#biblio-cssom-view" title="CSSOM View Module">[CSSOM-VIEW]</a>, or scroll snapping operations not initiated by the user <a data-link-type="biblio" href="#biblio-css-scroll-snap-1" title="CSS Scroll Snap Module Level 1">[CSS-SCROLL-SNAP-1]</a>. Any other scrolls, e.g. those that are performed by the user, are not affected by this property. When this property is specified on the root element, it applies to the <a data-link-type="dfn" href="https://w3c.github.io/epub-specs/epub33/core/#dfn-viewport" id="ref-for-dfn-viewport①">viewport</a> instead.</p> <p class="note" role="note"><span class="marker">Note:</span> The <a class="property css" data-link-type="property" href="#propdef-scroll-behavior" id="ref-for-propdef-scroll-behavior②">scroll-behavior</a> property of the HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element③">body</a></code> element is <em>not</em> propagated to the viewport.</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-behavior" data-dfn-type="value" data-export id="valdef-scroll-behavior-auto">auto</dfn> <dd> The <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①⑦">scroll container</a> is scrolled in an <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-view-1/#concept-instant-scroll" id="ref-for-concept-instant-scroll">instant</a> fashion. <dt><dfn class="dfn-paneled css" data-dfn-for="scroll-behavior" data-dfn-type="value" data-export id="valdef-scroll-behavior-smooth">smooth</dfn> <dd> The <a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①⑧">scroll container</a> is scrolled in a <a data-link-type="dfn" href="https://drafts.csswg.org/cssom-view-1/#concept-smooth-scroll" id="ref-for-concept-smooth-scroll">smooth</a> fashion using a user-agent-defined timing function over a user-agent-defined period of time. User agents should follow platform conventions, if any. </dl> <p>User agents may ignore this property. </p> <h2 class="heading settled" data-level="4" id="scrollbar-layout"><span class="secno">4. </span><span class="content"> Scrollbars and Layout</span><a class="self-link" href="#scrollbar-layout"></a></h2> <h3 class="heading settled" data-level="4.1" id="scrollbar-sizing"><span class="secno">4.1. </span><span class="content"> Scrollbar Contributions to Sizing</span><a class="self-link" href="#scrollbar-sizing"></a></h3> <p>When reserving space for a scrollbar placed at the edge of an element’s box, the reserved space is inserted between the inner border edge and the outer padding edge. For the purpose of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-backgrounds-3/#background-positioning-area" id="ref-for-background-positioning-area">background positioning area</a> and <a data-link-type="dfn" href="https://drafts.csswg.org/css-backgrounds-4/#background-painting-area" id="ref-for-background-painting-area">background painting area</a> however, this reserved space is considered to be part of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#padding-box" id="ref-for-padding-box③">padding box</a>.</p> <div class="example" id="example-eb6b07cc"> <a class="self-link" href="#example-eb6b07cc"></a> In the following document fragment, both an absolutely-positioned element and a background image are positioned to the top right of the box. <pre class="highlight"><c- p>&lt;</c-><c- f>style</c-><c- p>></c-> <c- f>article</c-> <c- p>{</c-> <c- k>background</c-><c- p>:</c-> <c- kc>top</c-> <c- kc>right</c-> <c- kc>no-repeat</c-> url<c- p>(</c-><c- sx>circle.png</c-><c- p>);</c-> <c- k>position</c-><c- p>:</c-> <c- kc>relative</c-><c- p>;</c-> <c- k>overflow</c-><c- p>:</c-> <c- kc>auto</c-><c- p>;</c-> <c- p>}</c-> <c- f>aside</c-> <c- p>{</c-> <c- k>position</c-><c- p>:</c-> <c- kc>absolute</c-><c- p>;</c-> <c- k>top</c-><c- p>:</c-> <c- mi>0</c-><c- p>;</c-> <c- k>right</c-><c- p>:</c-> <c- mi>0</c-><c- p>;</c-> <c- p>}</c-> <c- p>&lt;/</c-><c- f>style</c-><c- p>></c-> <c- p>&lt;</c-><c- f>article</c-><c- p>></c-> <c- p>&lt;</c-><c- f>aside</c-><c- p>></c->×<c- p>&lt;/</c-><c- f>aside</c-><c- p>></c-> <c- p>&lt;/</c-><c- f>article</c-><c- p>></c-> </pre> <p>If no scrollbars are present on <code>&lt;article></code>, they will both coincide in the top right padding edge corner. However, if scrollbars are present then <code>&lt;aside></code> will be completely visible, on the right padding-box edge adjacent to the scrollbars; whereas the background image will be tucked underneath the scrollbars, in the top right corner of the scrollbar-extended <a data-link-type="dfn" href="https://drafts.csswg.org/css-backgrounds-3/#background-positioning-area" id="ref-for-background-positioning-area①">background positioning area</a>.</p> </div> <p>When the box is intrinsically sized, this reserved space is added to the size of its contents. It is otherwise subtracted from space allotted to the <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#content-area" id="ref-for-content-area">content area</a>. To the extent that the presence of scrollbars can affect sizing, UAs must start with the assumption that no scrollbars are needed, and recalculate sizes if it turns out they are.</p> <div class="example" id="example-4d3316b1"> <a class="self-link" href="#example-4d3316b1"></a> In the following document fragment, the outer <code>&lt;article></code> has <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-sizing-3/#propdef-height" id="ref-for-propdef-height">height: auto</a>, but <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-sizing-3/#propdef-max-height" id="ref-for-propdef-max-height">max-height: 5em</a>. The inner <code>&lt;section></code> has large margins and would normally just fit: <pre class="highlight">... article { overflow: auto; max-height: 5em; width: max-content; } section { margin: 2em; line-height: 1 } ... <c- p>&lt;</c-><c- f>article</c-><c- p>></c-> <c- p>&lt;</c-><c- f>section</c-><c- p>></c-> This section has big margins. <c- p>&lt;/</c-><c- f>section</c-><c- p>></c-> <c- p>&lt;/</c-><c- f>article</c-><c- p>></c-> </pre> <p>If we assumed that <code>&lt;article></code> needed scrollbars, then the height of <code>&lt;section></code>, including the single line of text and twice 2em of margins, adds up to 5em plus a scrollbar. Since that is greater than 5em, the maximum allowed height, it seems we made the right assumption and d1 indeed needs scrollbars.</p> <p>However, we should have started by assuming that no scrollbars are needed. In that case the content height of <code>&lt;article></code> is exactly the maximum height of 5em, proving that the assumption was correct and <code>&lt;article></code> indeed should not have scrollbars.</p> </div> <h3 class="heading settled" data-level="4.2" id="scrollbar-gutter-property"><span class="secno">4.2. </span><span class="content"> Reserving space for the scrollbar: the <a class="property css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter">scrollbar-gutter</a> property</span><a class="self-link" href="#scrollbar-gutter-property"></a></h3> <p>The space between the inner border edge and the outer padding edge which user agents may reserve to display the scrollbar is called the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="scrollbar-gutter">scrollbar gutter</dfn>.</p> <p>The <a class="property css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter①">scrollbar-gutter</a> property gives control to the author over the presence of <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter">scrollbar gutters</a> separately from the ability to control the presence of scrollbars provided by the <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow②⑨">overflow</a> property.</p> <table class="def propdef" data-link-for-hint="scrollbar-gutter"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-scrollbar-gutter">scrollbar-gutter</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑤">|</a> stable <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-all" id="ref-for-comb-all">&amp;&amp;</a> both-edges<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td><a data-link-type="dfn" href="#scroll-container" id="ref-for-scroll-container①⑨">scroll containers</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>no <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword(s) <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property affects the presence of <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter①">scrollbar gutters</a> placed at the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-start" id="ref-for-inline-start①">inline start</a> edge or <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-end" id="ref-for-inline-end">inline end</a> edge of the box.</p> <p>The presence of a <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter②">scrollbar gutter</a> at the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#block-start" id="ref-for-block-start①">block start</a> edge and <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#block-end" id="ref-for-block-end">block end</a> edge of the box cannot be controlled in this level, and is determined the same way as the presence of <span id="ref-for-scrollbar-gutter③">scrollbar gutters</span> placed at the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-start" id="ref-for-inline-start②">inline start</a> edge or <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#inline-end" id="ref-for-inline-end①">inline end</a> edge of the box when <a class="property css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter②">scrollbar-gutter</a> is <a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-auto" id="ref-for-valdef-scrollbar-gutter-auto">auto</a>.</p> <p>Scrollbars which by default are placed over the content box and do not cause <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter④">scrollbar gutters</a> to be created are called <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="overlay-scrollbars">overlay scrollbars</dfn>. Such scrollbars are usually partially transparent, revealing the content behind them if any. Their appearance and size may vary based on whether and how the user is interacting with them.</p> <p>Scrollbars which are always placed in a <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter⑤">scrollbar gutter</a>, consuming space when present, are called <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="classic-scrollbars">classic scrollbars</dfn>. Such scrollbars are usually opaque.</p> <p>Whether <a data-link-type="dfn" href="#classic-scrollbars" id="ref-for-classic-scrollbars">classic scrollbars</a> or <a data-link-type="dfn" href="#overlay-scrollbars" id="ref-for-overlay-scrollbars">overlay scrollbars</a> are used, the appearance and size of the scrollbar, and whether scrollbars appear on the start or end edge of the box, is UA defined.</p> <p class="note" role="note"><span class="marker">Note:</span> Which side a scrollbar appears on may depend on operating system conventions, <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#bidirectionality" id="ref-for-bidirectionality">bidirectionality</a>, or other ergonomic considerations.</p> <p>In the case of <a data-link-type="dfn" href="#classic-scrollbars" id="ref-for-classic-scrollbars①">classic scrollbars</a>, the width of the <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter⑥">scrollbar gutter</a>, if present (see below), is the same as the width of the scrollbar. In the case of <a data-link-type="dfn" href="#overlay-scrollbars" id="ref-for-overlay-scrollbars①">overlay scrollbars</a>, no <span id="ref-for-scrollbar-gutter⑦">scrollbar gutter</span> is present.</p> <p class="note" role="note"><span class="marker">Note:</span> There are known use cases that could be addressed by enabling <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter⑧">scrollbar gutters</a> for <a data-link-type="dfn" href="#overlay-scrollbars" id="ref-for-overlay-scrollbars②">overlay scrollbars</a>, but no satisfactory design has been agreed to so far. This could be addressed by future extensions of this property. See <a href="https://drafts.csswg.org/css-overflow-4/#sbg-ext"><cite>CSS Overflow 4</cite> § A Possible extensions for scrollbar-gutter</a>.</p> <p>The values of this property have the following meaning:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="scrollbar-gutter" data-dfn-type="value" data-export id="valdef-scrollbar-gutter-auto">auto</dfn> <dd><a data-link-type="dfn" href="#classic-scrollbars" id="ref-for-classic-scrollbars②">Classic scrollbars</a> consume space by creating a <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter⑨">scrollbar gutter</a> when <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③⓪">overflow</a> is <a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll⑤">scroll</a>, or when <span class="property" id="ref-for-propdef-overflow③①">overflow</span> is <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto⑦">auto</a> and the box is overflowing. <a data-link-type="dfn" href="#overlay-scrollbars" id="ref-for-overlay-scrollbars③">Overlay scrollbars</a> do not consume space. <dt><dfn class="dfn-paneled css" data-dfn-for="scrollbar-gutter" data-dfn-type="value" data-export id="valdef-scrollbar-gutter-stable">stable</dfn> <dd> The <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter①⓪">scrollbar gutter</a> is present for <a data-link-type="dfn" href="#classic-scrollbars" id="ref-for-classic-scrollbars③">classic scrollbars</a> when <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③②">overflow</a> is <a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden⑧">hidden</a>, <a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll⑥">scroll</a>, or <a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto⑧">auto</a>, regardless of whether the box is actually overflowing. <a data-link-type="dfn" href="#overlay-scrollbars" id="ref-for-overlay-scrollbars④">Overlay scrollbars</a> do not consume space. <p class="note" role="note"><span class="marker">Note:</span> This does not change whether the scrollbar itself is visible, only the presence of a gutter is affected.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="scrollbar-gutter" data-dfn-type="value" data-export id="valdef-scrollbar-gutter-both-edges">both-edges</dfn> <dd>If a <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter①①">scrollbar gutter</a> would be present on one of the inline start edge or the inline end edge of the box, another <span id="ref-for-scrollbar-gutter①②">scrollbar gutter</span> must be present on the opposite edge as well. </dl> <p>When the <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter①③">scrollbar gutter</a> is present but the scrollbar is not, or the scrollbar is transparent or otherwise does not fully obscure the <span id="ref-for-scrollbar-gutter①④">scrollbar gutter</span>, the background of the <span id="ref-for-scrollbar-gutter①⑤">scrollbar gutter</span> must be painted as an extension of the padding.</p> <p>As for the <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③③">overflow</a> property, when <a class="property css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter③">scrollbar-gutter</a> is set on the root element, the user agent must apply it to the viewport instead, and the used value on the root element itself is <span class="css" id="ref-for-propdef-scrollbar-gutter④">scrollbar-gutter: auto</span>. However, unlike the <span class="property" id="ref-for-propdef-overflow③④">overflow</span> property, the user agent must not propagate <span class="property" id="ref-for-propdef-scrollbar-gutter⑤">scrollbar-gutter</span> from the HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/sections.html#the-body-element" id="ref-for-the-body-element④">body</a></code> element.</p> <div class="note" role="note"> Note: The following table summarizes the interaction of <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③⑤">overflow</a> and <a class="property css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter⑥">scrollbar-gutter</a> showing in which case space is reserved for a <a data-link-type="dfn" href="#classic-scrollbars" id="ref-for-classic-scrollbars④">classic scrollbar</a>’s <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter①⑥">scrollbar gutter</a>. <table class="data complex"> <caption> Should a <a data-link-type="dfn" href="#classic-scrollbars" id="ref-for-classic-scrollbars⑤">classic scrollbar</a>’s <a data-link-type="dfn" href="#scrollbar-gutter" id="ref-for-scrollbar-gutter①⑦">scrollbar gutter</a> be present?</caption> <thead> <tr> <th><a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③⑥">overflow</a> <th><a class="property css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter⑦">scrollbar-gutter</a> <th>Overflowing <th>Not overflowing <tbody> <tr> <th rowspan="2"><a class="css" data-link-type="maybe" href="#valdef-overflow-scroll" id="ref-for-valdef-overflow-scroll⑦">scroll</a> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-auto" id="ref-for-valdef-scrollbar-gutter-auto①">auto</a> <td>yes <td>yes <tr> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-stable" id="ref-for-valdef-scrollbar-gutter-stable">stable</a> <td>yes <td>yes <tr> <th rowspan="2"><a class="css" data-link-type="maybe" href="#valdef-overflow-auto" id="ref-for-valdef-overflow-auto⑨">auto</a> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-auto" id="ref-for-valdef-scrollbar-gutter-auto②">auto</a> <td>yes <td> <tr> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-stable" id="ref-for-valdef-scrollbar-gutter-stable①">stable</a> <td>yes <td>yes <tr> <th rowspan="2"><a class="css" data-link-type="maybe" href="#valdef-overflow-hidden" id="ref-for-valdef-overflow-hidden⑨">hidden</a> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-auto" id="ref-for-valdef-scrollbar-gutter-auto③">auto</a> <td> <td> <tr> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-stable" id="ref-for-valdef-scrollbar-gutter-stable②">stable</a> <td>yes <td>yes <tr> <th rowspan="2"><a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible⑨">visible</a>, <a class="css" data-link-type="maybe" href="#valdef-overflow-clip" id="ref-for-valdef-overflow-clip⑨">clip</a> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-auto" id="ref-for-valdef-scrollbar-gutter-auto④">auto</a> <td> <td> <tr> <th><a class="css" data-link-type="maybe" href="#valdef-scrollbar-gutter-stable" id="ref-for-valdef-scrollbar-gutter-stable③">stable</a> <td> <td> </table> </div> <h2 class="heading settled" data-level="5" id="auto-ellipsis"><span class="secno">5. </span><span class="content"> Automatic Ellipses</span><a class="self-link" href="#auto-ellipsis"></a></h2> <h3 class="heading settled caniuse-paneled" data-level="5.1" id="text-overflow"><span class="secno">5.1. </span><span class="content"> Overflow Ellipsis: the <a class="property css" data-link-type="property" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow④">text-overflow</a> property</span><a class="self-link" href="#text-overflow"></a></h3> <table class="def propdef" data-link-for-hint="text-overflow"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-overflow">text-overflow</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">clip <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-4/#comb-one" id="ref-for-comb-one⑥">|</a> ellipsis <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>clip <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>block containers <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>no <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>N/A <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>per grammar <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property specifies rendering when inline content overflows its <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#css-end" id="ref-for-css-end①">end</a> line box edge in the inline progression direction of its block container element ("the block") that has <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③⑦">overflow</a> other than <a class="css" data-link-type="maybe" href="#valdef-overflow-visible" id="ref-for-valdef-overflow-visible①⓪">visible</a>.</p> <p>Text can overflow for example when it is prevented from wrapping (e.g. due to <code class="lang-css highlight"><c- k>white-space</c-><c- p>:</c-> nowrap</code> or a single word is too long to fit). Values have the following meanings:</p> <dl class="valuedef"> <dt><dfn class="dfn-paneled css" data-dfn-for="text-overflow" data-dfn-type="value" data-export id="overflow-clip">clip</dfn> <dd> Clip inline content that overflows its block container element. Characters may be only partially rendered. <dt><dfn class="dfn-paneled css" data-dfn-for="text-overflow" data-dfn-type="value" data-export id="overflow-ellipsis">ellipsis</dfn> <dd> Render an ellipsis character (U+2026) to represent clipped inline content. Implementations may substitute a more language, script, or writing-mode appropriate ellipsis character, or three dots "..." if the ellipsis character is unavailable. </dl> <p>The term "character" is used in this property definition for better readability and means "grapheme cluster" <a data-link-type="biblio" href="#biblio-uax29" title="Unicode Text Segmentation">[UAX29]</a> for implementation purposes.</p> <p>For the ellipsis value implementations must hide characters and <a href="https://www.w3.org/TR/CSS2/visuren.html#inline-boxes"> atomic inline-level elements</a> at the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-4/#css-end" id="ref-for-css-end②">end</a> edge of the line as necessary to fit the ellipsis, and place the ellipsis immediately adjacent to the <span id="ref-for-css-end③">end</span> edge of the remaining inline content. The first character or <a href="https://www.w3.org/TR/CSS2/visuren.html#inline-boxes"> atomic inline-level element</a> on a line must be clipped rather than ellipsed.</p> <div class="example" id="example-7153ff61"> <a class="self-link" href="#example-7153ff61"></a> <h4 class="no-num no-toc heading settled" id="bidi-ellipsis"><span class="content">Bidi ellipsis examples</span><a class="self-link" href="#bidi-ellipsis"></a></h4> <p>These examples demonstrate which characters get hidden to make room for the ellipsis in a bidi situation: those visually at the end edge of the line.</p> <p>Sample CSS:</p> <pre class="highlight">div <c- p>{</c-> <c- k>font-family</c-><c- p>:</c-> monospace<c- p>;</c-> <c- k>white-space</c-><c- p>:</c-> pre<c- p>;</c-> <c- k>overflow</c-><c- p>:</c-> hidden<c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- m>9</c-><c- k>ch</c-><c- p>;</c-> <c- k>text-overflow</c-><c- p>:</c-> ellipsis<c- p>;</c-> <c- p>}</c-> </pre> <p>Sample HTML fragments, renderings, and your browser:</p> <table class="awesome-table data"> <thead> <tr> <th>HTML <th>Reference rendering <th>Your Browser <tbody> <tr> <td><code class="highlight"><c- p>&lt;</c-><c- f>div</c-><c- p>></c->שלום 123456<c- p>&lt;/</c-><c- f>div</c-><c- p>></c-></code> <td> <div style="font-family:monospace">123456 ם…</div> <td> <div style="font-family: monospace; white-space: pre; overflow: hidden; width: 9ch; text-overflow: ellipsis">שלום 123456</div> <tr> <td><code class="highlight"><c- p>&lt;</c-><c- f>div</c-> <c- e>dir</c-><c- o>=</c-><c- s>rtl</c-><c- p>></c->שלום 123456<c- p>&lt;/</c-><c- f>div</c-><c- p>></c-></code> <td> <div style="font-family:monospace">…456 שלום</div> <td> <div dir="rtl" style="font-family: monospace; white-space: pre; overflow: hidden; width: 9ch; text-overflow: ellipsis">שלום 123456</div> </table> </div> <h4 class="no-num no-toc heading settled" id="ellipsing-details"><span class="content"> ellipsing details</span><a class="self-link" href="#ellipsing-details"></a></h4> <ul> <li> Ellipsing only affects rendering and must not affect layout nor dispatching of pointer events: The UA should dispatch any pointer event on the ellipsis to the elided element, as if <a class="property css" data-link-type="property" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow⑤">text-overflow</a> had been <span class="css">none</span>. <li> The ellipsis is styled and baseline-aligned according to the block. <li> Ellipsing occurs after relative positioning and other graphical transformations. <li> If there is insufficient space for the ellipsis, then clip the rendering of the ellipsis itself (on the same side that neutral characters on the line would have otherwise been clipped with the <span class="css">text-overflow:clip</span> value). </ul> <h4 class="no-num no-toc heading settled" id="ellipsis-interaction"><span class="content"> user interaction with ellipsis</span><a class="self-link" href="#ellipsis-interaction"></a></h4> <ul> <li> When the user is interacting with content (e.g. editing, selecting, scrolling), the user agent may treat <a class="css" data-link-type="propdesc" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow⑥">text-overflow: ellipsis</a> as <span class="css" id="ref-for-propdef-text-overflow⑦">text-overflow: clip</span>. <li>Selecting the ellipsis should select the ellipsed text. If all of the ellipsed text is selected, UAs should show selection of the ellipsis. Behavior of partially-selected ellipsed text is up to the UA. </ul> <div class="example" id="example-cb85f151"> <a class="self-link" href="#example-cb85f151"></a> <p style="display:none">Example(s): </p> <h4 class="no-num no-toc heading settled" id="text-overflow-examples"><span class="content">text-overflow examples</span><a class="self-link" href="#text-overflow-examples"></a></h4> <p>These examples demonstrate setting the text-overflow of a block container element that has text which overflows its dimensions:</p> <p>sample CSS for a div:</p> <pre class="highlight">div <c- p>{</c-> <c- k>font-family</c-><c- p>:</c->Helvetica<c- p>,</c->sans-serif<c- p>;</c-> <c- k>line-height</c-><c- p>:</c-><c- m>1.1</c-><c- p>;</c-> <c- k>width</c-><c- p>:</c-><c- m>3.1</c-><c- k>em</c-><c- p>;</c-> <c- k>padding</c-><c- p>:</c-><c- m>.2</c-><c- k>em</c-><c- p>;</c-> <c- k>border</c-><c- p>:</c->solid <c- m>.1</c-><c- k>em</c-> black<c- p>;</c-> <c- k>margin</c-><c- p>:</c-><c- m>1</c-><c- k>em</c-> <c- m>0</c-><c- p>;</c-> <c- p>}</c-> </pre> <p>sample HTML fragments, renderings, and your browser:</p> <table class="awesome-table"> <tbody> <tr> <th>HTML <th>sample rendering <th>your browser <tr> <td> <pre class="highlight"><c- p>&lt;</c-><c- f>div</c-><c- p>></c-> CSS IS AWESOME, YES <c- p>&lt;/</c-><c- f>div</c-><c- p>></c-> </pre> <td> <object data="images/cssisawesome.png" type="image/png"> First, a box with text drawing outside of it. </object> <td> <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1;">CSS IS AWESOME, YES</div> <tr> <td> <pre class="highlight"><c- p>&lt;</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"</c-><strong><c- s>text-overflow:clip;</c-></strong><c- s> overflow:hidden"</c-><c- p>></c-> CSS IS AWESOME, YES <c- p>&lt;/</c-><c- f>div</c-><c- p>></c-> </pre> <td> <object data="images/cssisaweso.png" type="image/png"> Second, a similar box with the text clipped outside the box. </object> <td> <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1; overflow:hidden;text-overflow:clip;">CSS IS AWESOME, YES</div> <tr> <td> <pre class="highlight"><c- p>&lt;</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"</c-><strong><c- s>text-overflow:ellipsis;</c-></strong><c- s> overflow:hidden"</c-><c- p>></c-> CSS IS AWESOME, YES <c- p>&lt;/</c-><c- f>div</c-><c- p>></c-> </pre> <td> <object data="images/cssisaw.png" type="image/png"> Third, a similar box with an ellipsis representing the clipped text. </object> <td> <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1; overflow:hidden;text-overflow:ellipsis;">CSS IS AWESOME, YES</div> <tr> <td> <pre class="highlight"><c- p>&lt;</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"</c-><strong><c- s>text-overflow:ellipsis;</c-></strong><c- s> overflow:hidden"</c-><c- p>></c-> NESTED <c- p>&lt;</c-><c- f>p</c-><c- p>></c->PARAGRAPH<c- p>&lt;/</c-><c- f>p</c-><c- p>></c-> WON’T ELLIPSE. <c- p>&lt;/</c-><c- f>div</c-><c- p>></c-> </pre> <td> <object data="images/nes.png" type="image/png"> Fourth, a box with a nested paragraph demonstrating anonymous block boxes equivalency and non-inheritance into a nested element. </object> <td> <div style="width:3.1em; border:solid .1em black; margin:1em 0; padding:.2em; font-family:Helvetica,sans-serif; line-height:1.1; overflow:hidden;text-overflow:ellipsis;"> NESTED <p>PARAGRAPH</p> WON’T ELLIPSE. </div> </table> </div> <p class="note" role="note"><span class="marker">Note:</span> the side of the line that the ellipsis is placed depends on the <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction">direction</a> of the block. E.g. an overflow hidden right-to-left (<code class="lang-css highlight"><c- k>direction</c-><c- p>:</c-> rtl</code>) block clips inline content on the <a data-link-type="dfn" href="https://drafts.csswg.org/css-writing-modes-3/#physical-left" id="ref-for-physical-left">left</a> side, thus would place a text-overflow ellipsis on the <span id="ref-for-physical-left①">left</span> to represent that clipped content.</p> <h4 class="no-num no-toc heading settled" id="ellipsis-scrolling"><span class="content"> ellipsis interaction with scrolling interfaces</span><a class="self-link" href="#ellipsis-scrolling"></a></h4> <p>This section applies to elements with text-overflow other than <span class="css">text-overflow:clip</span> (non-clip text-overflow) and overflow:scroll.</p> <p>When an element with non-clip text-overflow has overflow of scroll in the inline progression dimension of the text, and the browser provides a mechanism for scrolling (e.g. a scrollbar on the element, or a touch interface to swipe-scroll, etc.), there are additional implementation details that provide a better user experience:</p> <p>When an element is scrolled (e.g. by the user, DOM manipulation), more of the element’s content is shown. The value of text-overflow should not affect whether more of the element’s content is shown or not. If a non-clip text-overflow is set, then as more content is scrolled into view, implementations should show whatever additional content fits, only truncating content which would otherwise be clipped (or is necessary to make room for the ellipsis/string), until the element is scrolled far enough to display the edge of the content at which point that content should be displayed rather than an ellipsis/string.</p> <div class="example" id="example-45d2531f"> <a class="self-link" href="#example-45d2531f"></a> <p>This example uses text-overflow on an element with overflow scroll to demonstrate the above described behavior.</p> <p>sample CSS:</p> <pre class="highlight">div.crawlbar <c- p>{</c-> <c- k>text-overflow</c-><c- p>:</c-> ellipsis<c- p>;</c-> <c- k>height</c-><c- p>:</c-> <c- m>2</c-><c- k>em</c-><c- p>;</c-> <c- k>overflow</c-><c- p>:</c-> scroll<c- p>;</c-> <c- k>white-space</c-><c- p>:</c-> nowrap<c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- m>15</c-><c- k>em</c-><c- p>;</c-> <c- k>border</c-><c- p>:</c-><c- m>1</c-><c- k>em</c-> solid black<c- p>;</c-> <c- p>}</c-> </pre> <p>sample HTML fragment:</p> <pre class="highlight"><c- p>&lt;</c-><c- f>div</c-> <c- e>class</c-><c- o>=</c-><c- s>"crawlbar"</c-><c- p>></c-> CSS is awesome, especially when you can scroll to see extra text instead of just having it overlap other text by default. <c- p>&lt;/</c-><c- f>div</c-><c- p>></c-> </pre> <p>demonstration of sample CSS and HTML:</p> <div style="text-overflow: ellipsis; height: 2em; overflow: scroll; white-space: nowrap; width: 15em; border:1em solid black;"> CSS is awesome, especially when you can scroll to see extra text instead of just having it overlap other text by default. </div> </div> <p>While the content is being scrolled, implementations may adjust their rendering of ellipses (e.g. align to the box edge rather than line edge).</p> <h2 class="no-num non-normative heading settled" id="priv"><span class="content">Appendix A. Privacy Considerations</span><a class="self-link" href="#priv"></a></h2> <p>This specification introduces no new privacy concerns.</p> <h2 class="no-num non-normative heading settled" id="sec"><span class="content">Appendix B. Security Considerations</span><a class="self-link" href="#sec"></a></h2> <p>This specification introduces no new security concerns.</p> <h2 class="no-num non-normative heading settled" id="changes"><span class="content">Appendix C. Changes</span><a class="self-link" href="#changes"></a></h2> <p>This appendix is <em>informative</em>.</p> <h3 class="heading settled" id="changes-since-2021-12-02"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2021/WD-css-overflow-3-20211202/">2021-12-02 Working Draft</a></span><a class="self-link" href="#changes-since-2021-12-02"></a></h3> <ul> <li data-md> <p>Require end-edge <a data-link-type="dfn" href="https://drafts.csswg.org/css-box-4/#padding" id="ref-for-padding">padding</a> to be included in the <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region⑧">scrollable overflow area</a> of <a data-link-type="dfn" href="https://drafts.csswg.org/css-display-4/#block-container" id="ref-for-block-container">block containers</a>; this was previously optional for <span id="ref-for-block-container①">block containers</span> with <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-align-3/#valdef-justify-content-normal" id="ref-for-valdef-justify-content-normal">normal</a> <a data-link-type="dfn" href="https://drafts.csswg.org/css-align-3/#content-distribute" id="ref-for-content-distribute">content distribution</a>, pending Web-compatibility investigations. (<a href="https://github.com/w3c/csswg-drafts/issues/129#issuecomment-1113489051">Issue 129</a>)</p> <li data-md> <p>More precisely define the interaction of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef--webkit-line-clamp" id="ref-for-propdef--webkit-line-clamp">-webkit-line-clamp</a> and the various <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef-line-clamp" id="ref-for-propdef-line-clamp①">line-clamp</a> longhands. See <a href="https://drafts.csswg.org/css-overflow-4/#webkit-line-clamp"><cite>CSS Overflow 4</cite> § 5.1.1 Legacy compatibility</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/6842">Issue 6842</a>)</p> <li data-md> <p>Clarified that <a data-link-type="dfn" href="https://drafts.csswg.org/css-break-4/#region-break" id="ref-for-region-break">region breaks</a> are what trigger discarding of subsequent content for <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-overflow-4/#propdef-continue" id="ref-for-propdef-continue">continue: discard</a> (and that other types of breaks do not); and gave examples of what triggers a <span id="ref-for-region-break①">region break</span> on such a box.</p> <li data-md> <p>Minor clarifications:</p> <ul> <li data-md> <p>Annotate <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage">&lt;length-percentage></a> value definitions using <a data-link-type="dfn" href="https://drafts.csswg.org/css-values-4/#css-bracketed-range-notation" id="ref-for-css-bracketed-range-notation">CSS bracketed range notation</a>.</p> </ul> </ul> <h3 class="heading settled" id="changes-since-2020-06-03"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2020/WD-css-overflow-3-20200603/">2020-06-03 Working Draft</a></span><a class="self-link" href="#changes-since-2020-06-03"></a></h3> <ul> <li data-md> <p>Moved the <a class="property css" data-link-type="property" href="#propdef-scroll-behavior" id="ref-for-propdef-scroll-behavior③">scroll-behavior</a> property from <a data-link-type="biblio" href="#biblio-cssom-view" title="CSSOM View Module">[CSSOM-VIEW]</a> to this specification.</p> <li data-md> <p>Adopted the <a class="property css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter⑧">scrollbar-gutter</a> property, previously defined in <a data-link-type="biblio" href="#biblio-css-overflow-4" title="CSS Overflow Module Level 4">[CSS-OVERFLOW-4]</a>.</p> <li data-md> <p>Added box-edge keywords to <a class="property css" data-link-type="property" href="#propdef-overflow-clip-margin" id="ref-for-propdef-overflow-clip-margin③">overflow-clip-margin</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/5801">Issue 5801</a>)</p> <li data-md> <p>Clarified interaction of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-backgrounds-3/#propdef-border-radius" id="ref-for-propdef-border-radius①">border-radius</a> and <a class="property css" data-link-type="property" href="#propdef-overflow-clip-margin" id="ref-for-propdef-overflow-clip-margin④">overflow-clip-margin</a>.</p> <li data-md> <p>Added note about user scrolling gestures vs. transforms.</p> <li data-md> <p>Tightened up requirements around incorporating margins, padding, and zero-area boxes into the <a data-link-type="dfn" href="#scrollable-overflow-region" id="ref-for-scrollable-overflow-region⑨">scrollable overflow area</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/129">Issue 129</a>, <a href="https://github.com/w3c/csswg-drafts/issues/4791">Issue 4791</a>)</p> <li data-md> <p>More precisely defined impact of scrollbars on layout. (<a href="https://github.com/w3c/csswg-drafts/issues/3348">Issue 3348</a>)</p> <li data-md> <p>Handle various edge cases involving <a class="property css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③⑧">overflow</a> propagation to the viewport. (<a href="https://github.com/w3c/csswg-drafts/issues/3779">Issue 3779</a>, <a href="https://github.com/w3c/csswg-drafts/issues/5913">Issue 5913</a>)</p> <li data-md> <p>Miscellaneous small clarifications and fixes.</p> </ul> <h3 class="heading settled" id="changes-since-2018-07-31"><span class="content"> Changes from the <a href="https://www.w3.org/TR/2018/WD-css-overflow-3-20180731/">2018-07-31 Working Draft</a></span><a class="self-link" href="#changes-since-2018-07-31"></a></h3> <ul> <li data-md> <p>Fixed markup errors and typos</p> <li data-md> <p>Made various editorial clarifications and fixed inconsistencies</p> <li data-md> <p>Renamed <code>block-overflow</code> to <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef-block-ellipsis" id="ref-for-propdef-block-ellipsis①">block-ellipsis</a></p> <li data-md> <p>Define <a class="property css" data-link-type="property" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow⑧">text-overflow</a> to affect an overflowing <a data-link-type="dfn">block overflow ellipsis</a></p> <li data-md> <p>Define the behavior of a <a data-link-type="dfn">block overflow ellipsis</a> that is longer than the line</p> <li data-md> <p>Define interaction of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef-block-ellipsis" id="ref-for-propdef-block-ellipsis②">block-ellipsis</a> and <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-pseudo-4/#selectordef-first-line" id="ref-for-selectordef-first-line">::first-line</a> / <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-pseudo-4/#selectordef-first-letter" id="ref-for-selectordef-first-letter">::first-letter</a></p> <li data-md> <p>Adjust the intrinsic size of elements with <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-overflow-4/#propdef-continue" id="ref-for-propdef-continue①">continue: discard</a></p> <li data-md> <p>Define how to layout the <a data-link-type="dfn">block overflow ellipsis</a></p> <li data-md> <p>Define the legacy behavior of <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css-overflow-4/#propdef--webkit-line-clamp" id="ref-for-propdef--webkit-line-clamp①">-webkit-line-clamp</a> for compatibility with existing content</p> <li data-md> <p>Define that end padding is included in the scrollable overflow area except for block containers (which are more tricky to handle, due to web-compat issues)</p> <li data-md> <p>Define that Margins of flex and grid items are included in scrollable overflow</p> <li data-md> <p>Do not propagate overflow from boxless elements</p> <li data-md> <p>Rename 'scrollable overflow region' to 'scrollable overflow area'</p> <li data-md> <p>Introduce the <a class="property css" data-link-type="property" href="#propdef-overflow-clip-margin" id="ref-for-propdef-overflow-clip-margin⑤">overflow-clip-margin</a> property</p> </ul> <h3 class="heading settled" id="old-changes"><span class="content"> Changes Prior to the <a href="https://www.w3.org/TR/2018/WD-css-overflow-3-20180731/">2018-07-31 Working Draft</a></span><a class="self-link" href="#old-changes"></a></h3> <p>Changes predating the publication of the <a href="https://www.w3.org/TR/2018/WD-css-overflow-3-20180731/">2018-07-31 Working Draft</a> can be found in the following change logs:</p> <ul> <li data-md> <p><a href="https://github.com/w3c/csswg-drafts/commits/master?path=css-overflow-3&amp;until=2018-07-31">from 2017-08-02 to 2018-07-31</a></p> <li data-md> <p><a href="https://hg.csswg.org/drafts/log/tip/css-overflow/Overview.bs">from 2015-01-27 to 2017-08-01</a></p> <li data-md> <p><a href="https://hg.csswg.org/drafts/log/tip/css-overflow/Overview.src.html">from 2013-03-28 to 2015-01-27</a></p> <li data-md> <p><a href="https://hg.csswg.org/drafts/log/tip/css3-overflow/Overview.src.html">from 2012-07-31 to 2013-03-27</a></p> </ul> <h2 class="no-num heading settled" id="acknowledgments"><span class="content"> Acknowledgments</span><a class="self-link" href="#acknowledgments"></a></h2> <p>Thanks especially to the feedback from Rossen Atanassov, Bert Bos, Tantek Çelik, John Daggett, Daniel Glazman, Vincent Hardy, Håkon Wium Lie, Peter Linss, Robert O’Callahan, Florian Rivoal, Alan Stearns, Steve Zilles, and all the rest of the <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.</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="example"</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="note"</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>&lt;strong class="advisement"></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> auto <ul> <li><a href="#valdef-overflow-auto">value for overflow, overflow-x, overflow-y</a><span>, in § 3.1</span> <li><a href="#valdef-scroll-behavior-auto">value for scroll-behavior</a><span>, in § 3.4</span> <li><a href="#valdef-scrollbar-gutter-auto">value for scrollbar-gutter</a><span>, in § 4.2</span> </ul> <li><a href="#valdef-scrollbar-gutter-both-edges">both-edges</a><span>, in § 4.2</span> <li><a href="#classic-scrollbars">classic scrollbars</a><span>, in § 4.2</span> <li> clip <ul> <li><a href="#valdef-overflow-clip">value for overflow, overflow-x, overflow-y</a><span>, in § 3.1</span> <li><a href="#overflow-clip">value for text-overflow</a><span>, in § 5.1</span> </ul> <li><a href="#overflow-ellipsis">ellipsis</a><span>, in § 5.1</span> <li><a href="#valdef-overflow-hidden">hidden</a><span>, in § 3.1</span> <li><a href="#initial-scroll-position">initial scroll position</a><span>, in § 2.3</span> <li><a href="#ink-overflow">ink overflow</a><span>, in § 2.1</span> <li><a href="#ink-overflow-region">ink overflow area</a><span>, in § 2.1</span> <li><a href="#ink-overflow-rectangle">ink overflow rectangle</a><span>, in § 2.1</span> <li><a href="#ink-overflow-region">ink overflow region</a><span>, in § 2.1</span> <li><a href="#valdef-overflow-clip-margin-length-0">&lt;length [0,∞]></a><span>, in § 3.2</span> <li><a href="#nearest-scrollport">nearest scrollport</a><span>, in § 2.3</span> <li><a href="#negative-scrollable-overflow-region">negative scrollable overflow region</a><span>, in § 2.3</span> <li><a href="#non-scrollable-overflow-value">non-scrollable overflow value</a><span>, in § 3.1</span> <li> overflow <ul> <li><a href="#propdef-overflow">(property)</a><span>, in § 3.1</span> <li><a href="#overflow">definition of</a><span>, in § 2</span> </ul> <li><a href="#propdef-overflow-block">overflow-block</a><span>, in § 3.1</span> <li><a href="#overflow-clip-edge">overflow clip edge</a><span>, in § 3.2</span> <li><a href="#propdef-overflow-clip-margin">overflow-clip-margin</a><span>, in § 3.2</span> <li><a href="#propdef-overflow-inline">overflow-inline</a><span>, in § 3.1</span> <li><a href="#propdef-overflow-x">overflow-x</a><span>, in § 3.1</span> <li><a href="#propdef-overflow-y">overflow-y</a><span>, in § 3.1</span> <li><a href="#valdef-overflow-overlay">overlay</a><span>, in § 3.1</span> <li><a href="#overlay-scrollbars">overlay scrollbars</a><span>, in § 4.2</span> <li><a href="#valdef-overflow-scroll">scroll</a><span>, in § 3.1</span> <li><a href="#scrollable-overflow">scrollable overflow</a><span>, in § 2.2</span> <li><a href="#scrollable-overflow-region">scrollable overflow area</a><span>, in § 2.2</span> <li><a href="#scrollable-overflow-rectangle">scrollable overflow rectangle</a><span>, in § 2.2</span> <li><a href="#scrollable-overflow-region">scrollable overflow region</a><span>, in § 2.2</span> <li><a href="#scrollable-overflow-value">scrollable overflow value</a><span>, in § 3.1</span> <li><a href="#scrollbar-gutter">scrollbar gutter</a><span>, in § 4.2</span> <li><a href="#propdef-scrollbar-gutter">scrollbar-gutter</a><span>, in § 4.2</span> <li><a href="#propdef-scroll-behavior">scroll-behavior</a><span>, in § 3.4</span> <li><a href="#scroll-container">scroll container</a><span>, in § 2.3</span> <li><a href="#scroll-offset">scroll offset</a><span>, in § 2.3</span> <li><a href="#scroll-origin">scroll origin</a><span>, in § 2.3</span> <li><a href="#scroll-origin-position">scroll origin position</a><span>, in § 2.3</span> <li><a href="#scrollport">scrollport</a><span>, in § 2.3</span> <li><a href="#scroll-position">scroll position</a><span>, in § 2.3</span> <li><a href="#valdef-scroll-behavior-smooth">smooth</a><span>, in § 3.4</span> <li><a href="#valdef-scrollbar-gutter-stable">stable</a><span>, in § 4.2</span> <li><a href="#propdef-text-overflow">text-overflow</a><span>, in § 5.1</span> <li><a href="#valdef-overflow-visible">visible</a><span>, in § 3.1</span> <li><a href="#valdef-overflow-clip-margin-visual-box">&lt;visual-box></a><span>, in § 3.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-ALIGN-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ce1c3a64">align-content</span> <li><span class="dfn-paneled" id="8e662436">baseline alignment</span> <li><span class="dfn-paneled" id="c552d2bc">content distribution</span> <li><span class="dfn-paneled" id="75f6cfb6">justify-content</span> <li><span class="dfn-paneled" id="eb309e21">normal</span> <li><span class="dfn-paneled" id="d02ffd03">place-content</span> </ul> <li> <a data-link-type="biblio">[CSS-BACKGROUNDS-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="1fa52ca0">background positioning area</span> <li><span class="dfn-paneled" id="5f1a81e7">border-radius</span> <li><span class="dfn-paneled" id="6916104d">box-shadow</span> <li><span class="dfn-paneled" id="2c299d7c">outer box-shadow</span> </ul> <li> <a data-link-type="biblio">[CSS-BOX-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="43562076">&lt;visual-box></span> <li><span class="dfn-paneled" id="b7e0bc03">border edge</span> <li><span class="dfn-paneled" id="40873652">content area</span> <li><span class="dfn-paneled" id="c1b73c63">padding</span> <li><span class="dfn-paneled" id="5c21b8af">padding box</span> <li><span class="dfn-paneled" id="f9a50f04">padding edge</span> </ul> <li> <a data-link-type="biblio">[CSS-BREAK-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ba2b58c4">region break</span> </ul> <li> <a data-link-type="biblio">[CSS-CASCADE-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="9cd25054">computed value</span> <li><span class="dfn-paneled" id="39d8d598">legacy value alias</span> <li><span class="dfn-paneled" id="56177fad">shorthand</span> <li><span class="dfn-paneled" id="8ca0c013">shorthand property</span> <li><span class="dfn-paneled" id="a4eb3c57">used value</span> </ul> <li> <a data-link-type="biblio">[CSS-CONTAIN-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="754e7a89">contain</span> <li><span class="dfn-paneled" id="1a3880ba">containment</span> </ul> <li> <a data-link-type="biblio">[CSS-DISPLAY-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="0e9419b9">display</span> </ul> <li> <a data-link-type="biblio">[CSS-DISPLAY-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="8e39589a">block box</span> <li><span class="dfn-paneled" id="9f3d4f17">block container</span> <li><span class="dfn-paneled" id="b6ed01f0">collapse</span> <li><span class="dfn-paneled" id="58157ca0">containing block chain</span> <li><span class="dfn-paneled" id="a758a91a">establishes an independent formatting context</span> <li><span class="dfn-paneled" id="a93f3bc2">hidden</span> <li><span class="dfn-paneled" id="8d0ede2c">initial containing block</span> <li><span class="dfn-paneled" id="55e8f5de">none</span> <li><span class="dfn-paneled" id="94f59a47">replaced</span> <li><span class="dfn-paneled" id="a8485ff4">replaced element</span> <li><span class="dfn-paneled" id="12f8fb07">visibility</span> </ul> <li> <a data-link-type="biblio">[CSS-GRID-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="1044d688">grid item</span> </ul> <li> <a data-link-type="biblio">[CSS-INLINE-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="e34548f4">line box</span> </ul> <li> <a data-link-type="biblio">[CSS-LOGICAL-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="eb3aa672">logical property group</span> </ul> <li> <a data-link-type="biblio">[CSS-MASKING-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="6b14b18a">clip</span> </ul> <li> <a data-link-type="biblio">[CSS-OVERFLOW-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="3751fd78">-webkit-line-clamp</span> <li><span class="dfn-paneled" id="f4504bd8">block-ellipsis</span> <li><span class="dfn-paneled" id="4e6dbe9d">continue</span> <li><span class="dfn-paneled" id="b51a07c6">line-clamp</span> <li><span class="dfn-paneled" id="e750f2bf">max-lines</span> </ul> <li> <a data-link-type="biblio">[CSS-PSEUDO-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a1addf6c">::first-letter</span> <li><span class="dfn-paneled" id="75bfa627">::first-line</span> </ul> <li> <a data-link-type="biblio">[CSS-SCROLL-SNAP-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="721a6c78">scroll snap</span> </ul> <li> <a data-link-type="biblio">[CSS-SCROLL-SNAP-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ec547e39">scroll-initial-target</span> </ul> <li> <a data-link-type="biblio">[CSS-SIZING-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="68019d7a">height</span> <li><span class="dfn-paneled" id="9e39189b">max-height</span> </ul> <li> <a data-link-type="biblio">[CSS-TEXT-DECOR-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="f338a9f0">text-shadow</span> </ul> <li> <a data-link-type="biblio">[CSS-TRANSFORMS-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="22285cb2">3D rendering context</span> <li><span class="dfn-paneled" id="61fd84c3">transform-style</span> </ul> <li> <a data-link-type="biblio">[CSS-VALUES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="f0809abc">&amp;&amp;</span> <li><span class="dfn-paneled" id="18222566">&lt;length-percentage></span> <li><span class="dfn-paneled" id="fb030e6c">&lt;length></span> <li><span class="dfn-paneled" id="537cf076">?</span> <li><span class="dfn-paneled" id="ad47bbf0">CSS bracketed range notation</span> <li><span class="dfn-paneled" id="358fd6ff">CSS-wide keywords</span> <li><span class="dfn-paneled" id="938ba280">{A,B}</span> <li><span class="dfn-paneled" id="6ec67710">|</span> <li><span class="dfn-paneled" id="8a82fda1">||</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="5bc8bd12">direction</span> <li><span class="dfn-paneled" id="0b8a742a">left</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="9971e548">bidirectionality</span> <li><span class="dfn-paneled" id="e1ab41b7">block axis</span> <li><span class="dfn-paneled" id="5ae9a424">block end</span> <li><span class="dfn-paneled" id="6d9e16ae">block start</span> <li><span class="dfn-paneled" id="1370dad0">block-start</span> <li><span class="dfn-paneled" id="7bc19a34">end</span> <li><span class="dfn-paneled" id="43667deb">inline axis</span> <li><span class="dfn-paneled" id="ec992473">inline end</span> <li><span class="dfn-paneled" id="f58c8d7d">inline start</span> <li><span class="dfn-paneled" id="466b2ed9">inline-start</span> <li><span class="dfn-paneled" id="d97c40f4">principal writing mode</span> <li><span class="dfn-paneled" id="a73617e0">writing mode</span> </ul> <li> <a data-link-type="biblio">[CSS3-FLEXBOX]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="3dff0248">cross-start</span> <li><span class="dfn-paneled" id="24285d87">flex container</span> <li><span class="dfn-paneled" id="66c521a7">flex item</span> <li><span class="dfn-paneled" id="f33d3db5">main-start</span> </ul> <li> <a data-link-type="biblio">[CSS4BACKGROUND]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="2ee35d30">background painting area</span> </ul> <li> <a data-link-type="biblio">[CSSOM-VIEW]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="7d696e36">instant scroll</span> <li><span class="dfn-paneled" id="82b885c9">scrollIntoView()</span> <li><span class="dfn-paneled" id="b6ea1541">smooth scroll</span> </ul> <li> <a data-link-type="biblio">[EPUB-33]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="c6f5ca83">viewport</span> </ul> <li> <a data-link-type="biblio">[HTML]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="2f0492ac">body</span> <li><span class="dfn-paneled" id="240893a8">focus()</span> <li><span class="dfn-paneled" id="c3dd181e">html</span> </ul> <li> <a data-link-type="biblio">[MEDIAQUERIES-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="758665a5">paged media</span> </ul> <li> <a data-link-type="biblio">[SVG2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="1b9e57ee">canvas</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-align-3">[CSS-ALIGN-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-align/"><cite>CSS Box Alignment Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-align/">https://drafts.csswg.org/css-align/</a> <dt id="biblio-css-backgrounds-3">[CSS-BACKGROUNDS-3] <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-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-4">[CSS-BREAK-4] <dd>Rossen Atanassov; Elika Etemad. <a href="https://drafts.csswg.org/css-break-4/"><cite>CSS Fragmentation Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-break-4/">https://drafts.csswg.org/css-break-4/</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-contain-2">[CSS-CONTAIN-2] <dd>Tab Atkins Jr.; Florian Rivoal; Vladimir Levin. <a href="https://drafts.csswg.org/css-contain-2/"><cite>CSS Containment Module Level 2</cite></a>. URL: <a href="https://drafts.csswg.org/css-contain-2/">https://drafts.csswg.org/css-contain-2/</a> <dt id="biblio-css-display-3">[CSS-DISPLAY-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-display/"><cite>CSS Display Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-display/">https://drafts.csswg.org/css-display/</a> <dt id="biblio-css-display-4">[CSS-DISPLAY-4] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://drafts.csswg.org/css-display/"><cite>CSS Display Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-display/">https://drafts.csswg.org/css-display/</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-inline-3">[CSS-INLINE-3] <dd>Elika Etemad. <a href="https://drafts.csswg.org/css-inline-3/"><cite>CSS Inline Layout Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-inline-3/">https://drafts.csswg.org/css-inline-3/</a> <dt id="biblio-css-logical-1">[CSS-LOGICAL-1] <dd>Rossen Atanassov; Elika Etemad. <a href="https://drafts.csswg.org/css-logical-1/"><cite>CSS Logical Properties and Values Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-logical-1/">https://drafts.csswg.org/css-logical-1/</a> <dt id="biblio-css-masking-1">[CSS-MASKING-1] <dd>Dirk Schulze; Brian Birtles; Tab Atkins Jr.. <a href="https://drafts.fxtf.org/css-masking-1/"><cite>CSS Masking Module Level 1</cite></a>. URL: <a href="https://drafts.fxtf.org/css-masking-1/">https://drafts.fxtf.org/css-masking-1/</a> <dt id="biblio-css-overflow-4">[CSS-OVERFLOW-4] <dd>David Baron; Florian Rivoal; Elika Etemad. <a href="https://drafts.csswg.org/css-overflow-4/"><cite>CSS Overflow Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-overflow-4/">https://drafts.csswg.org/css-overflow-4/</a> <dt id="biblio-css-pseudo-4">[CSS-PSEUDO-4] <dd>Daniel Glazman; Elika Etemad; Alan Stearns. <a href="https://drafts.csswg.org/css-pseudo-4/"><cite>CSS Pseudo-Elements Module Level 4</cite></a>. URL: <a href="https://drafts.csswg.org/css-pseudo-4/">https://drafts.csswg.org/css-pseudo-4/</a> <dt id="biblio-css-scroll-snap-1">[CSS-SCROLL-SNAP-1] <dd>Matt Rakow; et al. <a href="https://drafts.csswg.org/css-scroll-snap-1/"><cite>CSS Scroll Snap Module Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-scroll-snap-1/">https://drafts.csswg.org/css-scroll-snap-1/</a> <dt id="biblio-css-scroll-snap-2">[CSS-SCROLL-SNAP-2] <dd>Elika Etemad; Tab Atkins Jr.; Adam Argyle. <a href="https://drafts.csswg.org/css-scroll-snap-2/"><cite>CSS Scroll Snap Module Level 2</cite></a>. URL: <a href="https://drafts.csswg.org/css-scroll-snap-2/">https://drafts.csswg.org/css-scroll-snap-2/</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-2">[CSS-TRANSFORMS-2] <dd>Tab Atkins Jr.; et al. <a href="https://drafts.csswg.org/css-transforms-2/"><cite>CSS Transforms Module Level 2</cite></a>. URL: <a href="https://drafts.csswg.org/css-transforms-2/">https://drafts.csswg.org/css-transforms-2/</a> <dt id="biblio-css-ui-3">[CSS-UI-3] <dd>Tantek Çelik; Florian Rivoal. <a href="https://drafts.csswg.org/css-ui-3/"><cite>CSS Basic User Interface Module Level 3 (CSS3 UI)</cite></a>. URL: <a href="https://drafts.csswg.org/css-ui-3/">https://drafts.csswg.org/css-ui-3/</a> <dt id="biblio-css-values-3">[CSS-VALUES-3] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://drafts.csswg.org/css-values-3/"><cite>CSS Values and Units Module Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-values-3/">https://drafts.csswg.org/css-values-3/</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-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-css3-flexbox">[CSS3-FLEXBOX] <dd>Tab Atkins Jr.; et al. <a href="https://drafts.csswg.org/css-flexbox-1/"><cite>CSS Flexible Box Layout Module Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-flexbox-1/">https://drafts.csswg.org/css-flexbox-1/</a> <dt id="biblio-css3-grid-layout">[CSS3-GRID-LAYOUT] <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-css3-transforms">[CSS3-TRANSFORMS] <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-css4background">[CSS4BACKGROUND] <dd>Bert Bos; Elika J. Etemad; Lea Verou. <a href="https://drafts.csswg.org/css-backgrounds-4/"><cite>CSS Backgrounds and Borders Module Level 4</cite></a>. Proposal for a CSS module. URL: <a href="https://drafts.csswg.org/css-backgrounds-4/">https://drafts.csswg.org/css-backgrounds-4/</a> <dt id="biblio-cssom-view">[CSSOM-VIEW] <dd>Simon Pieters. <a href="https://drafts.csswg.org/cssom-view/"><cite>CSSOM View Module</cite></a>. URL: <a href="https://drafts.csswg.org/cssom-view/">https://drafts.csswg.org/cssom-view/</a> <dt id="biblio-epub-33">[EPUB-33] <dd>Ivan Herman; Matt Garrish; Dave Cramer. <a href="https://w3c.github.io/epub-specs/epub33/core/"><cite>EPUB 3.3</cite></a>. URL: <a href="https://w3c.github.io/epub-specs/epub33/core/">https://w3c.github.io/epub-specs/epub33/core/</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-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-svg2">[SVG2] <dd>Amelia Bellamy-Royds; et al. <a href="https://svgwg.org/svg2-draft/"><cite>Scalable Vector Graphics (SVG) 2</cite></a>. URL: <a href="https://svgwg.org/svg2-draft/">https://svgwg.org/svg2-draft/</a> <dt id="biblio-uax29">[UAX29] <dd>Josh Hadley. <a href="https://www.unicode.org/reports/tr29/tr29-45.html"><cite>Unicode Text Segmentation</cite></a>. 28 August 2024. Unicode Standard Annex #29. URL: <a href="https://www.unicode.org/reports/tr29/tr29-45.html">https://www.unicode.org/reports/tr29/tr29-45.html</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-contain-1">[CSS-CONTAIN-1] <dd>Tab Atkins Jr.; Florian Rivoal. <a href="https://drafts.csswg.org/css-contain-1/"><cite>CSS Containment Module Level 1</cite></a>. URL: <a href="https://drafts.csswg.org/css-contain-1/">https://drafts.csswg.org/css-contain-1/</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-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-writing-modes-3">[CSS-WRITING-MODES-3] <dd>Elika Etemad; Koji Ishii. <a href="https://drafts.csswg.org/css-writing-modes-3/"><cite>CSS Writing Modes Level 3</cite></a>. URL: <a href="https://drafts.csswg.org/css-writing-modes-3/">https://drafts.csswg.org/css-writing-modes-3/</a> <dt id="biblio-css1">[CSS1] <dd>Håkon Wium Lie; Bert Bos. <a href="https://www.w3.org/TR/CSS1/"><cite>Cascading Style Sheets, level 1</cite></a>. 13 September 2018. REC. URL: <a href="https://www.w3.org/TR/CSS1/">https://www.w3.org/TR/CSS1/</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> </dl> <h2 class="no-num no-ref heading settled" id="property-index"><span class="content">Property Index</span><a class="self-link" href="#property-index"></a></h2> <div class="big-element-wrapper"> <table class="index"> <thead> <tr> <th scope="col">Name <th scope="col">Value <th scope="col">Initial <th scope="col">Applies to <th scope="col">Inh. <th scope="col">%ages <th scope="col">Anim­ation type <th scope="col">Canonical order <th scope="col">Com­puted value <th scope="col">Logical property group <tbody> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-overflow" id="ref-for-propdef-overflow③⑨">overflow</a> <td>&lt;'overflow-block'>{1,2} <td>visible <td>block containers [CSS2], flex containers [CSS3-FLEXBOX], and grid containers [CSS3-GRID-LAYOUT] <td>no <td>N/A <td>discrete <td>per grammar <td>see individual properties <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-overflow-block" id="ref-for-propdef-overflow-block②">overflow-block</a> <td>visible | hidden | clip | scroll | auto <td>visible <td>block containers [CSS2], flex containers [CSS3-FLEXBOX], grid containers [CSS3-GRID-LAYOUT] <td>no <td>N/A <td>discrete <td>per grammar <td>usually specified value, but see text <td>overflow <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-overflow-clip-margin" id="ref-for-propdef-overflow-clip-margin⑥">overflow-clip-margin</a> <td>&lt;visual-box> || &lt;length [0,∞]> <td>0px <td>boxes to which overflow applies <td>no <td>n/a <td>per computed value if the &lt;visual-box> values match; otherwise discrete <td>per grammar <td>the computed &lt;length> and a &lt;visual-box> keyword <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-overflow-inline" id="ref-for-propdef-overflow-inline①">overflow-inline</a> <td>visible | hidden | clip | scroll | auto <td>visible <td>block containers [CSS2], flex containers [CSS3-FLEXBOX], grid containers [CSS3-GRID-LAYOUT] <td>no <td>N/A <td>discrete <td>per grammar <td>usually specified value, but see text <td>overflow <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-overflow-x" id="ref-for-propdef-overflow-x⑧">overflow-x</a> <td>visible | hidden | clip | scroll | auto <td>visible <td>block containers [CSS2], flex containers [CSS3-FLEXBOX], grid containers [CSS3-GRID-LAYOUT] <td>no <td>N/A <td>discrete <td>per grammar <td>usually specified value, but see text <td>overflow <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-overflow-y" id="ref-for-propdef-overflow-y⑧">overflow-y</a> <td>visible | hidden | clip | scroll | auto <td>visible <td>block containers [CSS2], flex containers [CSS3-FLEXBOX], grid containers [CSS3-GRID-LAYOUT] <td>no <td>N/A <td>discrete <td>per grammar <td>usually specified value, but see text <td>overflow <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-scroll-behavior" id="ref-for-propdef-scroll-behavior④">scroll-behavior</a> <td>auto | smooth <td>auto <td>scroll containers <td>no <td>n/a <td>not animatable <td>per grammar <td>specified value <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-scrollbar-gutter" id="ref-for-propdef-scrollbar-gutter⑨">scrollbar-gutter</a> <td>auto | stable &amp;&amp; both-edges? <td>auto <td>scroll containers <td>no <td>n/a <td>discrete <td>per grammar <td>specified keyword(s) <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-overflow" id="ref-for-propdef-text-overflow⑨">text-overflow</a> <td>clip | ellipsis <td>clip <td>block containers <td>no <td>N/A <td>discrete <td>per grammar <td>specified keyword <td> </table> </div> <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2> <div style="counter-reset:issue"> <div class="issue"> Is this description of handling transforms sufficiently accurate? <a class="issue-return" href="#issue-df7ef6c3" title="Jump to section">↵</a></div> <div class="issue">This needs further testing and investigation; is therefore deferred in this draft. <a class="issue-return" href="#issue-b9c7269c" title="Jump to section">↵</a></div> <div class="issue"> Need to evaluate what should/should not clip <a data-link-type="dfn" href="#scrollable-overflow">scrollable overflow</a>. <a href="https://github.com/w3c/csswg-drafts/issues/8607">[Issue #8607]</a> <a class="issue-return" href="#issue-b127a295" title="Jump to section">↵</a></div> <div class="issue"> Check whether things like <a data-link-type="dfn" href="https://drafts.csswg.org/css-align-3/#baseline-alignment">baseline alignment</a> depend on the <a data-link-type="dfn" href="#initial-scroll-position">initial scroll position</a> or the <a data-link-type="dfn" href="#scroll-origin-position">scroll origin position</a>. <a class="issue-return" href="#issue-ba58968a" title="Jump to section">↵</a></div> <div class="issue"> This doesn’t define a coordinate system for <a data-link-type="dfn" href="#scroll-offset">scroll offsets</a>. Whether they increase downward/rightward, block/inline-axis endward, or away from the <a data-link-type="dfn" href="#scroll-origin">scroll origin</a> is not defined. Should each API define its coordinate model? <a class="issue-return" href="#issue-223d3747" title="Jump to section">↵</a></div> </div> <details class="mdn-anno unpositioned" data-anno-for="overflow-control"> <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/overflow-block" title="The overflow-block CSS property sets what shows when content overflows the block start and block end edges of a box. This may be nothing, a scroll bar, or the overflow content.">overflow-block</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>69+</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/overflow-inline" title="The overflow-inline CSS property sets what shows when content overflows the inline start and end edges of a box. This may be nothing, a scroll bar, or the overflow content.">overflow-inline</a></p> <p class="less-than-two-engines-text">In only one current engine.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>69+</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="overflow-clip-margin"> <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/overflow-clip-margin" title="The overflow-clip-margin CSS property determines how far outside its bounds an element with overflow: clip may be painted before being clipped. The bound defined by this property is called the overflow clip edge of the box.">overflow-clip-margin</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="overflow-properties"> <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/overflow-x" title="The overflow-x CSS property sets what shows when content overflows a block-level element&apos;s left and right edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property.">overflow-x</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</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>5+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios yes"><span>iOS Safari</span><span>1+</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/overflow-y" title="The overflow-y CSS property sets what shows when content overflows a block-level element&apos;s top and bottom edges. This may be nothing, a scroll bar, or the overflow content. This property may also be set by using the overflow shorthand property.">overflow-y</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>3.5+</span></span><span class="safari yes"><span>Safari</span><span>3+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</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>5+</span></span> <hr> <span class="firefox_android no"><span>Firefox for Android</span><span>?</span></span><span class="safari_ios yes"><span>iOS Safari</span><span>1+</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="propdef-overflow"> <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/overflow" title="The overflow CSS shorthand property sets the desired behavior when content does not fit in the parent element box (overflows) in the horizontal and/or vertical direction.">overflow</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>4+</span></span> <hr> <span class="firefox_android yes"><span>Firefox for Android</span><span>4+</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/overflow_value" title="The <overflow> enumerated value type represents the keyword values for the overflow-block, overflow-inline, overflow-x, and overflow-y longhand properties and the overflow shorthand property. These properties apply to block containers, flex containers, and grid containers.">overflow_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>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>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="smooth-scrolling"> <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/scroll-behavior" title="The scroll-behavior CSS property sets the behavior for a scrolling box when scrolling is triggered by the navigation or CSSOM scrolling APIs.">scroll-behavior</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>36+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="chrome yes"><span>Chrome</span><span>61+</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="scrollbar-gutter-property"> <summary><span>MDN</span></summary> <div class="feature"> <p><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter" title="The scrollbar-gutter CSS property allows authors to reserve space for the scrollbar, preventing unwanted layout changes as the content grows while also avoiding unnecessary visuals when scrolling isn&apos;t needed.">scrollbar-gutter</a></p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>97+</span></span><span class="safari no"><span>Safari</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>94+</span></span> <hr> <span class="opera no"><span>Opera</span><span>?</span></span><span class="edge_blink yes"><span>Edge</span><span>94+</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="text-overflow"> <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/text-overflow" title="The text-overflow CSS property sets how hidden overflow content is signaled to users. It can be clipped, display an ellipsis (&apos;…&apos;), or display a custom string.">text-overflow</a></p> <p class="all-engines-text">In all current engines.</p> <div class="support"> <span class="firefox yes"><span>Firefox</span><span>7+</span></span><span class="safari yes"><span>Safari</span><span>1.3+</span></span><span class="chrome yes"><span>Chrome</span><span>1+</span></span> <hr> <span class="opera yes"><span>Opera</span><span>11+</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>6+</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>11+</span></span> </div> </div> </details> <details class="caniuse-status unpositioned" data-anno-for="smooth-scrolling" data-deco> <summary>CanIUse</summary> <p class="support"><b>Support:</b><span class="android yes"><span>Android Browser</span><span>132+</span></span><span class="baidu yes"><span>Baidu Browser</span><span>13.52+</span></span><span class="bb no"><span>Blackberry Browser</span><span>None</span></span><span class="chrome yes"><span>Chrome</span><span>61+</span></span><span class="and_chr yes"><span>Chrome for Android</span><span>132+</span></span><span class="edge yes"><span>Edge</span><span>79+</span></span><span class="firefox yes"><span>Firefox</span><span>36+</span></span><span class="and_ff yes"><span>Firefox for Android</span><span>132+</span></span><span class="ie no"><span>IE</span><span>None</span></span><span class="ie_mob no"><span>IE Mobile</span><span>None</span></span><span class="kaios yes"><span>KaiOS Browser</span><span>3.0+</span></span><span class="opera yes"><span>Opera</span><span>48+</span></span><span class="op_mini no"><span>Opera Mini</span><span>None</span></span><span class="op_mob yes"><span>Opera Mobile</span><span>80+</span></span><span class="and_qq yes"><span>QQ Browser</span><span>14.9+</span></span><span class="safari yes"><span>Safari</span><span>15.4+</span></span><span class="ios_saf yes"><span>Safari on iOS</span><span>15.4+</span></span><span class="samsung yes"><span>Samsung Internet</span><span>8.2+</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=css-scroll-behavior">caniuse.com</a> as of 2025-02-16</p> </details> <details class="caniuse-status unpositioned" data-anno-for="text-overflow" 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>132+</span></span><span class="edge yes"><span>Edge</span><span>12+</span></span><span class="firefox yes"><span>Firefox</span><span>7+</span></span><span class="and_ff yes"><span>Firefox for Android</span><span>132+</span></span><span class="ie yes"><span>IE</span><span>6+</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+</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.1+</span></span><span class="and_qq yes"><span>QQ Browser</span><span>14.9+</span></span><span class="safari yes"><span>Safari</span><span>3.1+</span></span><span class="ios_saf yes"><span>Safari on iOS</span><span>3.2+</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=text-overflow">caniuse.com</a> as of 2025-02-16</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 = { "0b8a742a": {"dfnID":"0b8a742a","dfnText":"left","external":true,"refSections":[{"refs":[{"id":"ref-for-physical-left"},{"id":"ref-for-physical-left\u2460"}],"title":"\nuser interaction with ellipsis"}],"url":"https://drafts.csswg.org/css-writing-modes-3/#physical-left"}, "0e9419b9": {"dfnID":"0e9419b9","dfnText":"display","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-display"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-propdef-display\u2460"},{"id":"ref-for-propdef-display\u2461"}],"title":"3.3. \nOverflow Viewport Propagation"}],"url":"https://drafts.csswg.org/css-display-3/#propdef-display"}, "1044d688": {"dfnID":"1044d688","dfnText":"grid item","external":true,"refSections":[{"refs":[{"id":"ref-for-grid-item"}],"title":"2.2. \nScrollable Overflow"}],"url":"https://drafts.csswg.org/css-grid-2/#grid-item"}, "12f8fb07": {"dfnID":"12f8fb07","dfnText":"visibility","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-visibility"},{"id":"ref-for-propdef-visibility\u2460"},{"id":"ref-for-propdef-visibility\u2461"},{"id":"ref-for-propdef-visibility\u2462"},{"id":"ref-for-propdef-visibility\u2463"}],"title":"3.1.1. \nInteraction of visibility and overflow"}],"url":"https://drafts.csswg.org/css-display-4/#propdef-visibility"}, "1370dad0": {"dfnID":"1370dad0","dfnText":"block-start","external":true,"refSections":[{"refs":[{"id":"ref-for-block-start"}],"title":"2.3. \nScrolling Overflow"},{"refs":[{"id":"ref-for-block-start\u2460"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#block-start"}, "18222566": {"dfnID":"18222566","dfnText":"<length-percentage>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-length-percentage"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-values-4/#typedef-length-percentage"}, "1a3880ba": {"dfnID":"1a3880ba","dfnText":"containment","external":true,"refSections":[{"refs":[{"id":"ref-for-containment"}],"title":"3.3. \nOverflow Viewport Propagation"}],"url":"https://drafts.csswg.org/css-contain-2/#containment"}, "1b9e57ee": {"dfnID":"1b9e57ee","dfnText":"canvas","external":true,"refSections":[{"refs":[{"id":"ref-for-TermCanvas"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://svgwg.org/svg2-draft/coords.html#TermCanvas"}, "1fa52ca0": {"dfnID":"1fa52ca0","dfnText":"background positioning area","external":true,"refSections":[{"refs":[{"id":"ref-for-background-positioning-area"},{"id":"ref-for-background-positioning-area\u2460"}],"title":"4.1. \nScrollbar Contributions to Sizing"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#background-positioning-area"}, "22285cb2": {"dfnID":"22285cb2","dfnText":"3D rendering context","external":true,"refSections":[{"refs":[{"id":"ref-for-3d-rendering-context"}],"title":"2.2. \nScrollable Overflow"}],"url":"https://drafts.csswg.org/css-transforms-2/#3d-rendering-context"}, "240893a8": {"dfnID":"240893a8","dfnText":"focus()","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-window-focus"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus"}, "24285d87": {"dfnID":"24285d87","dfnText":"flex container","external":true,"refSections":[{"refs":[{"id":"ref-for-flex-container"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-flexbox-1/#flex-container"}, "2c299d7c": {"dfnID":"2c299d7c","dfnText":"outer box-shadow","external":true,"refSections":[{"refs":[{"id":"ref-for-box-shadow-outer-box-shadow"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#box-shadow-outer-box-shadow"}, "2ee35d30": {"dfnID":"2ee35d30","dfnText":"background painting area","external":true,"refSections":[{"refs":[{"id":"ref-for-background-painting-area"}],"title":"4.1. \nScrollbar Contributions to Sizing"}],"url":"https://drafts.csswg.org/css-backgrounds-4/#background-painting-area"}, "2f0492ac": {"dfnID":"2f0492ac","dfnText":"body","external":true,"refSections":[{"refs":[{"id":"ref-for-the-body-element"},{"id":"ref-for-the-body-element\u2460"},{"id":"ref-for-the-body-element\u2461"}],"title":"3.3. \nOverflow Viewport Propagation"},{"refs":[{"id":"ref-for-the-body-element\u2462"}],"title":"3.4. \nSmooth Scrolling: the scroll-behavior Property"},{"refs":[{"id":"ref-for-the-body-element\u2463"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://html.spec.whatwg.org/multipage/sections.html#the-body-element"}, "358fd6ff": {"dfnID":"358fd6ff","dfnText":"CSS-wide keywords","external":true,"refSections":[{"refs":[{"id":"ref-for-css-wide-keywords"}],"title":"1.1. \nValue Definitions"}],"url":"https://drafts.csswg.org/css-values-4/#css-wide-keywords"}, "3751fd78": {"dfnID":"3751fd78","dfnText":"-webkit-line-clamp","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef--webkit-line-clamp"}],"title":"\nChanges from the 2021-12-02 Working Draft"},{"refs":[{"id":"ref-for-propdef--webkit-line-clamp\u2460"}],"title":"\nChanges from the 2018-07-31 Working Draft"}],"url":"https://drafts.csswg.org/css-overflow-4/#propdef--webkit-line-clamp"}, "39d8d598": {"dfnID":"39d8d598","dfnText":"legacy value alias","external":true,"refSections":[{"refs":[{"id":"ref-for-css-legacy-value-alias"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-cascade-5/#css-legacy-value-alias"}, "3dff0248": {"dfnID":"3dff0248","dfnText":"cross-start","external":true,"refSections":[{"refs":[{"id":"ref-for-cross-start"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-flexbox-1/#cross-start"}, "40873652": {"dfnID":"40873652","dfnText":"content area","external":true,"refSections":[{"refs":[{"id":"ref-for-content-area"}],"title":"4.1. \nScrollbar Contributions to Sizing"}],"url":"https://drafts.csswg.org/css-box-4/#content-area"}, "43562076": {"dfnID":"43562076","dfnText":"<visual-box>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-visual-box"},{"id":"ref-for-typedef-visual-box\u2460"},{"id":"ref-for-typedef-visual-box\u2461"},{"id":"ref-for-typedef-visual-box\u2462"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"}],"url":"https://drafts.csswg.org/css-box-4/#typedef-visual-box"}, "43667deb": {"dfnID":"43667deb","dfnText":"inline axis","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-axis"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#inline-axis"}, "466b2ed9": {"dfnID":"466b2ed9","dfnText":"inline-start","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-start"}],"title":"2.3. \nScrolling Overflow"},{"refs":[{"id":"ref-for-inline-start\u2460"},{"id":"ref-for-inline-start\u2461"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#inline-start"}, "4e6dbe9d": {"dfnID":"4e6dbe9d","dfnText":"continue","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-continue"}],"title":"\nChanges from the 2021-12-02 Working Draft"},{"refs":[{"id":"ref-for-propdef-continue\u2460"}],"title":"\nChanges from the 2018-07-31 Working Draft"}],"url":"https://drafts.csswg.org/css-overflow-4/#propdef-continue"}, "537cf076": {"dfnID":"537cf076","dfnText":"?","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-opt"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-values-4/#mult-opt"}, "55e8f5de": {"dfnID":"55e8f5de","dfnText":"none","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-display-none"},{"id":"ref-for-valdef-display-none\u2460"}],"title":"3.3. \nOverflow Viewport Propagation"}],"url":"https://drafts.csswg.org/css-display-4/#valdef-display-none"}, "56177fad": {"dfnID":"56177fad","dfnText":"shorthand","external":true,"refSections":[{"refs":[{"id":"ref-for-shorthand-property"},{"id":"ref-for-shorthand-property\u2460"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-cascade-5/#shorthand-property"}, "58157ca0": {"dfnID":"58157ca0","dfnText":"containing block chain","external":true,"refSections":[{"refs":[{"id":"ref-for-containing-block-chain"}],"title":"2. \nOverflow Concepts and Terminology"}],"url":"https://drafts.csswg.org/css-display-4/#containing-block-chain"}, "5ae9a424": {"dfnID":"5ae9a424","dfnText":"block end","external":true,"refSections":[{"refs":[{"id":"ref-for-block-end"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#block-end"}, "5bc8bd12": {"dfnID":"5bc8bd12","dfnText":"direction","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-direction"}],"title":"\nuser interaction with ellipsis"}],"url":"https://drafts.csswg.org/css-writing-modes-3/#propdef-direction"}, "5c21b8af": {"dfnID":"5c21b8af","dfnText":"padding box","external":true,"refSections":[{"refs":[{"id":"ref-for-padding-box"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-padding-box\u2460"},{"id":"ref-for-padding-box\u2461"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-padding-box\u2462"}],"title":"4.1. \nScrollbar Contributions to Sizing"}],"url":"https://drafts.csswg.org/css-box-4/#padding-box"}, "5f1a81e7": {"dfnID":"5f1a81e7","dfnText":"border-radius","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-border-radius"}],"title":"3.1.2. \nInteraction of border-radius and overflow"},{"refs":[{"id":"ref-for-propdef-border-radius\u2460"}],"title":"\nChanges from the 2020-06-03 Working Draft"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-border-radius"}, "61fd84c3": {"dfnID":"61fd84c3","dfnText":"transform-style","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-transform-style"},{"id":"ref-for-propdef-transform-style\u2460"}],"title":"2. \nOverflow Concepts and Terminology"}],"url":"https://drafts.csswg.org/css-transforms-2/#propdef-transform-style"}, "66c521a7": {"dfnID":"66c521a7","dfnText":"flex item","external":true,"refSections":[{"refs":[{"id":"ref-for-flex-item"}],"title":"2.2. \nScrollable Overflow"}],"url":"https://drafts.csswg.org/css-flexbox-1/#flex-item"}, "68019d7a": {"dfnID":"68019d7a","dfnText":"height","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-height"}],"title":"4.1. \nScrollbar Contributions to Sizing"}],"url":"https://drafts.csswg.org/css-sizing-3/#propdef-height"}, "6916104d": {"dfnID":"6916104d","dfnText":"box-shadow","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-box-shadow"}],"title":"2.1. Ink Overflow"}],"url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-box-shadow"}, "6b14b18a": {"dfnID":"6b14b18a","dfnText":"clip","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-clip"}],"title":"2.2. \nScrollable Overflow"}],"url":"https://drafts.fxtf.org/css-masking-1/#propdef-clip"}, "6d9e16ae": {"dfnID":"6d9e16ae","dfnText":"block start","external":true,"refSections":[{"refs":[{"id":"ref-for-block-start"}],"title":"2.3. \nScrolling Overflow"},{"refs":[{"id":"ref-for-block-start\u2460"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#block-start"}, "6ec67710": {"dfnID":"6ec67710","dfnText":"|","external":true,"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":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-comb-one\u2463"}],"title":"3.4. \nSmooth Scrolling: the scroll-behavior Property"},{"refs":[{"id":"ref-for-comb-one\u2464"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"},{"refs":[{"id":"ref-for-comb-one\u2465"}],"title":"5.1. \nOverflow Ellipsis: the text-overflow property"}],"url":"https://drafts.csswg.org/css-values-4/#comb-one"}, "721a6c78": {"dfnID":"721a6c78","dfnText":"scroll snap","external":true,"refSections":[{"refs":[{"id":"ref-for-scroll-snap"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap"}, "754e7a89": {"dfnID":"754e7a89","dfnText":"contain","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-contain"}],"title":"2.2. \nScrollable Overflow"}],"url":"https://drafts.csswg.org/css-contain-2/#propdef-contain"}, "758665a5": {"dfnID":"758665a5","dfnText":"paged media","external":true,"refSections":[{"refs":[{"id":"ref-for-paged-media"}],"title":"3.1.3. \nOverflow in Print and Other Static Media"}],"url":"https://drafts.csswg.org/mediaqueries-5/#paged-media"}, "75bfa627": {"dfnID":"75bfa627","dfnText":"::first-line","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-first-line"}],"title":"\nChanges from the 2018-07-31 Working Draft"}],"url":"https://drafts.csswg.org/css-pseudo-4/#selectordef-first-line"}, "75f6cfb6": {"dfnID":"75f6cfb6","dfnText":"justify-content","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-justify-content"},{"id":"ref-for-propdef-justify-content\u2460"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-align-3/#propdef-justify-content"}, "7bc19a34": {"dfnID":"7bc19a34","dfnText":"end","external":true,"refSections":[{"refs":[{"id":"ref-for-css-end"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-css-end\u2460"},{"id":"ref-for-css-end\u2461"},{"id":"ref-for-css-end\u2462"}],"title":"5.1. \nOverflow Ellipsis: the text-overflow property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#css-end"}, "7d696e36": {"dfnID":"7d696e36","dfnText":"instant scroll","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-instant-scroll"}],"title":"3.4. \nSmooth Scrolling: the scroll-behavior Property"}],"url":"https://drafts.csswg.org/cssom-view-1/#concept-instant-scroll"}, "82b885c9": {"dfnID":"82b885c9","dfnText":"scrollIntoView()","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-element-scrollintoview"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview"}, "8a82fda1": {"dfnID":"8a82fda1","dfnText":"||","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-any"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"}],"url":"https://drafts.csswg.org/css-values-4/#comb-any"}, "8ca0c013": {"dfnID":"8ca0c013","dfnText":"shorthand property","external":true,"refSections":[{"refs":[{"id":"ref-for-shorthand-property"},{"id":"ref-for-shorthand-property\u2460"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-cascade-5/#shorthand-property"}, "8d0ede2c": {"dfnID":"8d0ede2c","dfnText":"initial containing block","external":true,"refSections":[{"refs":[{"id":"ref-for-initial-containing-block"}],"title":"3.3. \nOverflow Viewport Propagation"}],"url":"https://drafts.csswg.org/css-display-4/#initial-containing-block"}, "8e39589a": {"dfnID":"8e39589a","dfnText":"block box","external":true,"refSections":[{"refs":[{"id":"ref-for-block-box"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-display-4/#block-box"}, "8e662436": {"dfnID":"8e662436","dfnText":"baseline alignment","external":true,"refSections":[{"refs":[{"id":"ref-for-baseline-alignment"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-align-3/#baseline-alignment"}, "938ba280": {"dfnID":"938ba280","dfnText":"{A,B}","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-num-range"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-values-4/#mult-num-range"}, "94f59a47": {"dfnID":"94f59a47","dfnText":"replaced","external":true,"refSections":[{"refs":[{"id":"ref-for-replaced-element"}],"title":"2.1. Ink Overflow"},{"refs":[{"id":"ref-for-replaced-element\u2460"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-display-4/#replaced-element"}, "9971e548": {"dfnID":"9971e548","dfnText":"bidirectionality","external":true,"refSections":[{"refs":[{"id":"ref-for-bidirectionality"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#bidirectionality"}, "9cd25054": {"dfnID":"9cd25054","dfnText":"computed value","external":true,"refSections":[{"refs":[{"id":"ref-for-computed-value"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-cascade-5/#computed-value"}, "9e39189b": {"dfnID":"9e39189b","dfnText":"max-height","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-max-height"}],"title":"4.1. \nScrollbar Contributions to Sizing"}],"url":"https://drafts.csswg.org/css-sizing-3/#propdef-max-height"}, "9f3d4f17": {"dfnID":"9f3d4f17","dfnText":"block container","external":true,"refSections":[{"refs":[{"id":"ref-for-block-container"},{"id":"ref-for-block-container\u2460"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-display-4/#block-container"}, "a1addf6c": {"dfnID":"a1addf6c","dfnText":"::first-letter","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-first-letter"}],"title":"\nChanges from the 2018-07-31 Working Draft"}],"url":"https://drafts.csswg.org/css-pseudo-4/#selectordef-first-letter"}, "a4eb3c57": {"dfnID":"a4eb3c57","dfnText":"used value","external":true,"refSections":[{"refs":[{"id":"ref-for-used-value"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-cascade-5/#used-value"}, "a73617e0": {"dfnID":"a73617e0","dfnText":"writing mode","external":true,"refSections":[{"refs":[{"id":"ref-for-writing-mode"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#writing-mode"}, "a758a91a": {"dfnID":"a758a91a","dfnText":"establishes an independent formatting context","external":true,"refSections":[{"refs":[{"id":"ref-for-establish-an-independent-formatting-context"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-display-4/#establish-an-independent-formatting-context"}, "a8485ff4": {"dfnID":"a8485ff4","dfnText":"replaced element","external":true,"refSections":[{"refs":[{"id":"ref-for-replaced-element"}],"title":"2.1. Ink Overflow"},{"refs":[{"id":"ref-for-replaced-element\u2460"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-display-4/#replaced-element"}, "a93f3bc2": {"dfnID":"a93f3bc2","dfnText":"hidden","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-visibility-hidden"},{"id":"ref-for-valdef-visibility-hidden\u2460"}],"title":"3.1.1. \nInteraction of visibility and overflow"}],"url":"https://drafts.csswg.org/css-display-4/#valdef-visibility-hidden"}, "ad47bbf0": {"dfnID":"ad47bbf0","dfnText":"CSS bracketed range notation","external":true,"refSections":[{"refs":[{"id":"ref-for-css-bracketed-range-notation"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-values-4/#css-bracketed-range-notation"}, "b51a07c6": {"dfnID":"b51a07c6","dfnText":"line-clamp","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-line-clamp"}],"title":"Unnumbered Section"},{"refs":[{"id":"ref-for-propdef-line-clamp\u2460"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-overflow-4/#propdef-line-clamp"}, "b6ea1541": {"dfnID":"b6ea1541","dfnText":"smooth scroll","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-smooth-scroll"}],"title":"3.4. \nSmooth Scrolling: the scroll-behavior Property"}],"url":"https://drafts.csswg.org/cssom-view-1/#concept-smooth-scroll"}, "b6ed01f0": {"dfnID":"b6ed01f0","dfnText":"collapse","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-visibility-collapse"}],"title":"3.1.1. \nInteraction of visibility and overflow"}],"url":"https://drafts.csswg.org/css-display-4/#valdef-visibility-collapse"}, "b7e0bc03": {"dfnID":"b7e0bc03","dfnText":"border edge","external":true,"refSections":[{"refs":[{"id":"ref-for-border-edge"},{"id":"ref-for-border-edge\u2460"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"}],"url":"https://drafts.csswg.org/css-box-4/#border-edge"}, "ba2b58c4": {"dfnID":"ba2b58c4","dfnText":"region break","external":true,"refSections":[{"refs":[{"id":"ref-for-region-break"},{"id":"ref-for-region-break\u2460"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-break-4/#region-break"}, "c1b73c63": {"dfnID":"c1b73c63","dfnText":"padding","external":true,"refSections":[{"refs":[{"id":"ref-for-padding"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-box-4/#padding"}, "c3dd181e": {"dfnID":"c3dd181e","dfnText":"html","external":true,"refSections":[{"refs":[{"id":"ref-for-the-html-element"},{"id":"ref-for-the-html-element\u2460"}],"title":"3.3. \nOverflow Viewport Propagation"}],"url":"https://html.spec.whatwg.org/multipage/semantics.html#the-html-element"}, "c552d2bc": {"dfnID":"c552d2bc","dfnText":"content distribution","external":true,"refSections":[{"refs":[{"id":"ref-for-content-distribute"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-align-3/#content-distribute"}, "c6f5ca83": {"dfnID":"c6f5ca83","dfnText":"viewport","external":true,"refSections":[{"refs":[{"id":"ref-for-dfn-viewport"}],"title":"3.3. \nOverflow Viewport Propagation"},{"refs":[{"id":"ref-for-dfn-viewport\u2460"}],"title":"3.4. \nSmooth Scrolling: the scroll-behavior Property"}],"url":"https://w3c.github.io/epub-specs/epub33/core/#dfn-viewport"}, "ce1c3a64": {"dfnID":"ce1c3a64","dfnText":"align-content","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-align-content"},{"id":"ref-for-propdef-align-content\u2460"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-align-3/#propdef-align-content"}, "classic-scrollbars": {"dfnID":"classic-scrollbars","dfnText":"classic scrollbars","external":false,"refSections":[{"refs":[{"id":"ref-for-classic-scrollbars"},{"id":"ref-for-classic-scrollbars\u2460"},{"id":"ref-for-classic-scrollbars\u2461"},{"id":"ref-for-classic-scrollbars\u2462"},{"id":"ref-for-classic-scrollbars\u2463"},{"id":"ref-for-classic-scrollbars\u2464"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#classic-scrollbars"}, "d02ffd03": {"dfnID":"d02ffd03","dfnText":"place-content","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-place-content"}],"title":"2.2. \nScrollable Overflow"}],"url":"https://drafts.csswg.org/css-align-3/#propdef-place-content"}, "d97c40f4": {"dfnID":"d97c40f4","dfnText":"principal writing mode","external":true,"refSections":[{"refs":[{"id":"ref-for-principal-writing-mode"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#principal-writing-mode"}, "e1ab41b7": {"dfnID":"e1ab41b7","dfnText":"block axis","external":true,"refSections":[{"refs":[{"id":"ref-for-block-axis"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#block-axis"}, "e34548f4": {"dfnID":"e34548f4","dfnText":"line box","external":true,"refSections":[{"refs":[{"id":"ref-for-line-box"}],"title":"2.2. \nScrollable Overflow"}],"url":"https://drafts.csswg.org/css-inline-3/#line-box"}, "e750f2bf": {"dfnID":"e750f2bf","dfnText":"max-lines","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-max-lines"}],"title":"Unnumbered Section"},{"refs":[{"id":"ref-for-propdef-max-lines\u2460"}],"title":"1. \nIntroduction"}],"url":"https://drafts.csswg.org/css-overflow-4/#propdef-max-lines"}, "eb309e21": {"dfnID":"eb309e21","dfnText":"normal","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-justify-content-normal"}],"title":"\nChanges from the 2021-12-02 Working Draft"}],"url":"https://drafts.csswg.org/css-align-3/#valdef-justify-content-normal"}, "eb3aa672": {"dfnID":"eb3aa672","dfnText":"logical property group","external":true,"refSections":[{"refs":[{"id":"1cb7bf200"},{"id":"ref-for-logical-property-group"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"https://drafts.csswg.org/css-logical-1/#logical-property-group"}, "ec547e39": {"dfnID":"ec547e39","dfnText":"scroll-initial-target","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-scroll-initial-target"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-scroll-snap-2/#propdef-scroll-initial-target"}, "ec992473": {"dfnID":"ec992473","dfnText":"inline end","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-end"},{"id":"ref-for-inline-end\u2460"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#inline-end"}, "f0809abc": {"dfnID":"f0809abc","dfnText":"&&","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-all"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-values-4/#comb-all"}, "f338a9f0": {"dfnID":"f338a9f0","dfnText":"text-shadow","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-text-shadow"}],"title":"2.1. Ink Overflow"}],"url":"https://drafts.csswg.org/css-text-decor-4/#propdef-text-shadow"}, "f33d3db5": {"dfnID":"f33d3db5","dfnText":"main-start","external":true,"refSections":[{"refs":[{"id":"ref-for-main-start"}],"title":"2.3. \nScrolling Overflow"}],"url":"https://drafts.csswg.org/css-flexbox-1/#main-start"}, "f4504bd8": {"dfnID":"f4504bd8","dfnText":"block-ellipsis","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-block-ellipsis"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-propdef-block-ellipsis\u2460"},{"id":"ref-for-propdef-block-ellipsis\u2461"}],"title":"\nChanges from the 2018-07-31 Working Draft"}],"url":"https://drafts.csswg.org/css-overflow-4/#propdef-block-ellipsis"}, "f58c8d7d": {"dfnID":"f58c8d7d","dfnText":"inline start","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-start"}],"title":"2.3. \nScrolling Overflow"},{"refs":[{"id":"ref-for-inline-start\u2460"},{"id":"ref-for-inline-start\u2461"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"https://drafts.csswg.org/css-writing-modes-4/#inline-start"}, "f9a50f04": {"dfnID":"f9a50f04","dfnText":"padding edge","external":true,"refSections":[{"refs":[{"id":"ref-for-padding-edge"}],"title":"3.1.2. \nInteraction of border-radius and overflow"}],"url":"https://drafts.csswg.org/css-box-4/#padding-edge"}, "fb030e6c": {"dfnID":"fb030e6c","dfnText":"<length>","external":true,"refSections":[{"refs":[{"id":"ref-for-length-value"},{"id":"ref-for-length-value\u2460"},{"id":"ref-for-length-value\u2461"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"}],"url":"https://drafts.csswg.org/css-values-4/#length-value"}, "initial-scroll-position": {"dfnID":"initial-scroll-position","dfnText":"initial scroll position","external":false,"refSections":[{"refs":[{"id":"ref-for-initial-scroll-position"},{"id":"ref-for-initial-scroll-position\u2460"},{"id":"ref-for-initial-scroll-position\u2461"},{"id":"ref-for-initial-scroll-position\u2462"},{"id":"ref-for-initial-scroll-position\u2463"},{"id":"ref-for-initial-scroll-position\u2464"}],"title":"2.3. \nScrolling Overflow"}],"url":"#initial-scroll-position"}, "ink-overflow": {"dfnID":"ink-overflow","dfnText":"ink overflow","external":false,"refSections":[{"refs":[{"id":"ref-for-ink-overflow"}],"title":"2. \nOverflow Concepts and Terminology"},{"refs":[{"id":"ref-for-ink-overflow\u2460"},{"id":"ref-for-ink-overflow\u2461"},{"id":"ref-for-ink-overflow\u2462"}],"title":"2.1. Ink Overflow"}],"url":"#ink-overflow"}, "ink-overflow-rectangle": {"dfnID":"ink-overflow-rectangle","dfnText":"ink overflow rectangle","external":false,"refSections":[{"refs":[{"id":"ref-for-ink-overflow-rectangle"}],"title":"2.1. Ink Overflow"}],"url":"#ink-overflow-rectangle"}, "ink-overflow-region": {"dfnID":"ink-overflow-region","dfnText":"ink overflow area","external":false,"refSections":[{"refs":[{"id":"ref-for-ink-overflow-region"}],"title":"2.1. Ink Overflow"}],"url":"#ink-overflow-region"}, "nearest-scrollport": {"dfnID":"nearest-scrollport","dfnText":"nearest scrollport","external":false,"refSections":[],"url":"#nearest-scrollport"}, "negative-scrollable-overflow-region": {"dfnID":"negative-scrollable-overflow-region","dfnText":"negative scrollable overflow region","external":false,"refSections":[{"refs":[{"id":"ref-for-negative-scrollable-overflow-region"},{"id":"ref-for-negative-scrollable-overflow-region\u2460"}],"title":"2.2. \nScrollable Overflow"}],"url":"#negative-scrollable-overflow-region"}, "non-scrollable-overflow-value": {"dfnID":"non-scrollable-overflow-value","dfnText":"non-scrollable values","external":false,"refSections":[],"url":"#non-scrollable-overflow-value"}, "overflow": {"dfnID":"overflow","dfnText":"overflow","external":false,"refSections":[{"refs":[{"id":"ref-for-overflow"},{"id":"ref-for-overflow\u2460"}],"title":"2. \nOverflow Concepts and Terminology"},{"refs":[{"id":"ref-for-overflow\u2461"}],"title":"2.3. \nScrolling Overflow"},{"refs":[{"id":"ref-for-overflow\u2462"},{"id":"ref-for-overflow\u2463"},{"id":"ref-for-overflow\u2464"},{"id":"ref-for-overflow\u2465"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"#overflow"}, "overflow-clip": {"dfnID":"overflow-clip","dfnText":"clip","external":false,"refSections":[],"url":"#overflow-clip"}, "overflow-clip-edge": {"dfnID":"overflow-clip-edge","dfnText":"overflow clip edge","external":false,"refSections":[{"refs":[{"id":"ref-for-overflow-clip-edge"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-overflow-clip-edge\u2460"},{"id":"ref-for-overflow-clip-edge\u2461"},{"id":"ref-for-overflow-clip-edge\u2462"},{"id":"ref-for-overflow-clip-edge\u2463"},{"id":"ref-for-overflow-clip-edge\u2464"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"}],"url":"#overflow-clip-edge"}, "overflow-ellipsis": {"dfnID":"overflow-ellipsis","dfnText":"ellipsis","external":false,"refSections":[],"url":"#overflow-ellipsis"}, "overlay-scrollbars": {"dfnID":"overlay-scrollbars","dfnText":"overlay scrollbars","external":false,"refSections":[{"refs":[{"id":"ref-for-overlay-scrollbars"},{"id":"ref-for-overlay-scrollbars\u2460"},{"id":"ref-for-overlay-scrollbars\u2461"},{"id":"ref-for-overlay-scrollbars\u2462"},{"id":"ref-for-overlay-scrollbars\u2463"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#overlay-scrollbars"}, "propdef-overflow": {"dfnID":"propdef-overflow","dfnText":"overflow","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow\u2463"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-propdef-overflow\u2464"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-propdef-overflow\u2465"},{"id":"ref-for-propdef-overflow\u2466"},{"id":"ref-for-propdef-overflow\u2467"},{"id":"ref-for-propdef-overflow\u2468"},{"id":"ref-for-propdef-overflow\u2460\u24ea"},{"id":"ref-for-propdef-overflow\u2460\u2460"},{"id":"ref-for-propdef-overflow\u2460\u2461"},{"id":"ref-for-propdef-overflow\u2460\u2462"},{"id":"ref-for-propdef-overflow\u2460\u2463"},{"id":"ref-for-propdef-overflow\u2460\u2464"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-propdef-overflow\u2460\u2465"},{"id":"ref-for-propdef-overflow\u2460\u2466"},{"id":"ref-for-propdef-overflow\u2460\u2467"}],"title":"3.1.1. \nInteraction of visibility and overflow"},{"refs":[{"id":"ref-for-propdef-overflow\u2460\u2468"},{"id":"ref-for-propdef-overflow\u2461\u24ea"}],"title":"3.1.2. \nInteraction of border-radius and overflow"},{"refs":[{"id":"ref-for-propdef-overflow\u2461\u2460"}],"title":"3.1.3. \nOverflow in Print and Other Static Media"},{"refs":[{"id":"ref-for-propdef-overflow\u2461\u2461"},{"id":"ref-for-propdef-overflow\u2461\u2462"},{"id":"ref-for-propdef-overflow\u2461\u2463"},{"id":"ref-for-propdef-overflow\u2461\u2464"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"},{"refs":[{"id":"ref-for-propdef-overflow\u2461\u2465"},{"id":"ref-for-propdef-overflow\u2461\u2466"},{"id":"ref-for-propdef-overflow\u2461\u2467"}],"title":"3.3. \nOverflow Viewport Propagation"},{"refs":[{"id":"ref-for-propdef-overflow\u2461\u2468"},{"id":"ref-for-propdef-overflow\u2462\u24ea"},{"id":"ref-for-propdef-overflow\u2462\u2460"},{"id":"ref-for-propdef-overflow\u2462\u2461"},{"id":"ref-for-propdef-overflow\u2462\u2462"},{"id":"ref-for-propdef-overflow\u2462\u2463"},{"id":"ref-for-propdef-overflow\u2462\u2464"},{"id":"ref-for-propdef-overflow\u2462\u2465"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"},{"refs":[{"id":"ref-for-propdef-overflow\u2462\u2466"}],"title":"5.1. \nOverflow Ellipsis: the text-overflow property"},{"refs":[{"id":"ref-for-propdef-overflow\u2462\u2467"}],"title":"\nChanges from the 2020-06-03 Working Draft"}],"url":"#propdef-overflow"}, "propdef-overflow-block": {"dfnID":"propdef-overflow-block","dfnText":"overflow-block","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow-block"},{"id":"ref-for-propdef-overflow-block\u2460"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"#propdef-overflow-block"}, "propdef-overflow-clip-margin": {"dfnID":"propdef-overflow-clip-margin","dfnText":"overflow-clip-margin","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow-clip-margin\u2461"}],"title":"3.2. \nExpanding Clipping Bounds: the overflow-clip-margin property"},{"refs":[{"id":"ref-for-propdef-overflow-clip-margin\u2462"},{"id":"ref-for-propdef-overflow-clip-margin\u2463"}],"title":"\nChanges from the 2020-06-03 Working Draft"},{"refs":[{"id":"ref-for-propdef-overflow-clip-margin\u2464"}],"title":"\nChanges from the 2018-07-31 Working Draft"}],"url":"#propdef-overflow-clip-margin"}, "propdef-overflow-inline": {"dfnID":"propdef-overflow-inline","dfnText":"overflow-inline","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow-inline"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"#propdef-overflow-inline"}, "propdef-overflow-x": {"dfnID":"propdef-overflow-x","dfnText":"overflow-x","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow-x"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-propdef-overflow-x\u2460"},{"id":"ref-for-propdef-overflow-x\u2461"},{"id":"ref-for-propdef-overflow-x\u2462"},{"id":"ref-for-propdef-overflow-x\u2463"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-propdef-overflow-x\u2464"},{"id":"ref-for-propdef-overflow-x\u2465"},{"id":"ref-for-propdef-overflow-x\u2466"}],"title":"3.1.2. \nInteraction of border-radius and overflow"}],"url":"#propdef-overflow-x"}, "propdef-overflow-y": {"dfnID":"propdef-overflow-y","dfnText":"overflow-y","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow-y"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-propdef-overflow-y\u2460"},{"id":"ref-for-propdef-overflow-y\u2461"},{"id":"ref-for-propdef-overflow-y\u2462"},{"id":"ref-for-propdef-overflow-y\u2463"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-propdef-overflow-y\u2464"},{"id":"ref-for-propdef-overflow-y\u2465"},{"id":"ref-for-propdef-overflow-y\u2466"}],"title":"3.1.2. \nInteraction of border-radius and overflow"}],"url":"#propdef-overflow-y"}, "propdef-scroll-behavior": {"dfnID":"propdef-scroll-behavior","dfnText":"scroll-behavior","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-scroll-behavior"},{"id":"ref-for-propdef-scroll-behavior\u2460"},{"id":"ref-for-propdef-scroll-behavior\u2461"}],"title":"3.4. \nSmooth Scrolling: the scroll-behavior Property"},{"refs":[{"id":"ref-for-propdef-scroll-behavior\u2462"}],"title":"\nChanges from the 2020-06-03 Working Draft"}],"url":"#propdef-scroll-behavior"}, "propdef-scrollbar-gutter": {"dfnID":"propdef-scrollbar-gutter","dfnText":"scrollbar-gutter","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-scrollbar-gutter"},{"id":"ref-for-propdef-scrollbar-gutter\u2460"},{"id":"ref-for-propdef-scrollbar-gutter\u2461"},{"id":"ref-for-propdef-scrollbar-gutter\u2462"},{"id":"ref-for-propdef-scrollbar-gutter\u2463"},{"id":"ref-for-propdef-scrollbar-gutter\u2464"},{"id":"ref-for-propdef-scrollbar-gutter\u2465"},{"id":"ref-for-propdef-scrollbar-gutter\u2466"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"},{"refs":[{"id":"ref-for-propdef-scrollbar-gutter\u2467"}],"title":"\nChanges from the 2020-06-03 Working Draft"}],"url":"#propdef-scrollbar-gutter"}, "propdef-text-overflow": {"dfnID":"propdef-text-overflow","dfnText":"text-overflow","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-text-overflow\u2461"},{"id":"ref-for-propdef-text-overflow\u2462"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-propdef-text-overflow\u2463"}],"title":"5.1. \nOverflow Ellipsis: the text-overflow property"},{"refs":[{"id":"ref-for-propdef-text-overflow\u2464"}],"title":"\nellipsing details"},{"refs":[{"id":"ref-for-propdef-text-overflow\u2465"},{"id":"ref-for-propdef-text-overflow\u2466"}],"title":"\nuser interaction with ellipsis"},{"refs":[{"id":"ref-for-propdef-text-overflow\u2467"}],"title":"\nChanges from the 2018-07-31 Working Draft"}],"url":"#propdef-text-overflow"}, "scroll-container": {"dfnID":"scroll-container","dfnText":"scroll container","external":false,"refSections":[{"refs":[{"id":"ref-for-scroll-container"},{"id":"ref-for-scroll-container\u2460"},{"id":"ref-for-scroll-container\u2461"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-scroll-container\u2462"},{"id":"ref-for-scroll-container\u2463"},{"id":"ref-for-scroll-container\u2464"},{"id":"ref-for-scroll-container\u2465"},{"id":"ref-for-scroll-container\u2466"}],"title":"2.3. \nScrolling Overflow"},{"refs":[{"id":"ref-for-scroll-container\u2467"},{"id":"ref-for-scroll-container\u2468"},{"id":"ref-for-scroll-container\u2460\u24ea"},{"id":"ref-for-scroll-container\u2460\u2460"},{"id":"ref-for-scroll-container\u2460\u2461"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-scroll-container\u2460\u2462"}],"title":"3.1.1. \nInteraction of visibility and overflow"},{"refs":[{"id":"ref-for-scroll-container\u2460\u2463"}],"title":"3.1.3. \nOverflow in Print and Other Static Media"},{"refs":[{"id":"ref-for-scroll-container\u2460\u2464"},{"id":"ref-for-scroll-container\u2460\u2465"},{"id":"ref-for-scroll-container\u2460\u2466"},{"id":"ref-for-scroll-container\u2460\u2467"}],"title":"3.4. \nSmooth Scrolling: the scroll-behavior Property"},{"refs":[{"id":"ref-for-scroll-container\u2460\u2468"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#scroll-container"}, "scroll-offset": {"dfnID":"scroll-offset","dfnText":"scroll offset","external":false,"refSections":[{"refs":[{"id":"ref-for-scroll-offset"}],"title":"2.3. \nScrolling Overflow"}],"url":"#scroll-offset"}, "scroll-origin": {"dfnID":"scroll-origin","dfnText":"scroll origin","external":false,"refSections":[{"refs":[{"id":"ref-for-scroll-origin"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-scroll-origin\u2460"},{"id":"ref-for-scroll-origin\u2461"},{"id":"ref-for-scroll-origin\u2462"},{"id":"ref-for-scroll-origin\u2463"},{"id":"ref-for-scroll-origin\u2464"},{"id":"ref-for-scroll-origin\u2465"}],"title":"2.3. \nScrolling Overflow"}],"url":"#scroll-origin"}, "scroll-origin-position": {"dfnID":"scroll-origin-position","dfnText":"scroll origin position","external":false,"refSections":[{"refs":[{"id":"ref-for-scroll-origin-position"},{"id":"ref-for-scroll-origin-position\u2460"},{"id":"ref-for-scroll-origin-position\u2461"}],"title":"2.3. \nScrolling Overflow"}],"url":"#scroll-origin-position"}, "scroll-position": {"dfnID":"scroll-position","dfnText":"scroll position","external":false,"refSections":[{"refs":[{"id":"ref-for-scroll-position"}],"title":"2.3. \nScrolling Overflow"}],"url":"#scroll-position"}, "scrollable-overflow": {"dfnID":"scrollable-overflow","dfnText":"scrollable overflow","external":false,"refSections":[{"refs":[{"id":"ref-for-scrollable-overflow"}],"title":"2. \nOverflow Concepts and Terminology"},{"refs":[{"id":"ref-for-scrollable-overflow\u2460"}],"title":"2.1. Ink Overflow"},{"refs":[{"id":"ref-for-scrollable-overflow\u2461"},{"id":"ref-for-scrollable-overflow\u2462"},{"id":"ref-for-scrollable-overflow\u2463"},{"id":"ref-for-scrollable-overflow\u2464"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-scrollable-overflow\u2465"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"}],"url":"#scrollable-overflow"}, "scrollable-overflow-rectangle": {"dfnID":"scrollable-overflow-rectangle","dfnText":"scrollable overflow rectangle","external":false,"refSections":[{"refs":[{"id":"ref-for-scrollable-overflow-rectangle"},{"id":"ref-for-scrollable-overflow-rectangle\u2460"},{"id":"ref-for-scrollable-overflow-rectangle\u2461"},{"id":"ref-for-scrollable-overflow-rectangle\u2462"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-scrollable-overflow-rectangle\u2463"},{"id":"ref-for-scrollable-overflow-rectangle\u2464"},{"id":"ref-for-scrollable-overflow-rectangle\u2465"},{"id":"ref-for-scrollable-overflow-rectangle\u2466"},{"id":"ref-for-scrollable-overflow-rectangle\u2467"}],"title":"2.3. \nScrolling Overflow"}],"url":"#scrollable-overflow-rectangle"}, "scrollable-overflow-region": {"dfnID":"scrollable-overflow-region","dfnText":"scrollable overflow area","external":false,"refSections":[{"refs":[{"id":"ref-for-scrollable-overflow-region"}],"title":"2.1. Ink Overflow"},{"refs":[{"id":"ref-for-scrollable-overflow-region\u2460"},{"id":"ref-for-scrollable-overflow-region\u2461"},{"id":"ref-for-scrollable-overflow-region\u2462"},{"id":"ref-for-scrollable-overflow-region\u2463"},{"id":"ref-for-scrollable-overflow-region\u2464"}],"title":"2.2. \nScrollable Overflow"},{"refs":[{"id":"ref-for-scrollable-overflow-region\u2465"},{"id":"ref-for-scrollable-overflow-region\u2466"}],"title":"2.3. \nScrolling Overflow"},{"refs":[{"id":"ref-for-scrollable-overflow-region\u2467"}],"title":"\nChanges from the 2021-12-02 Working Draft"},{"refs":[{"id":"ref-for-scrollable-overflow-region\u2468"}],"title":"\nChanges from the 2020-06-03 Working Draft"}],"url":"#scrollable-overflow-region"}, "scrollable-overflow-value": {"dfnID":"scrollable-overflow-value","dfnText":"scrollable values","external":false,"refSections":[],"url":"#scrollable-overflow-value"}, "scrollbar-gutter": {"dfnID":"scrollbar-gutter","dfnText":"scrollbar gutter","external":false,"refSections":[{"refs":[{"id":"ref-for-scrollbar-gutter"},{"id":"ref-for-scrollbar-gutter\u2460"},{"id":"ref-for-scrollbar-gutter\u2461"},{"id":"ref-for-scrollbar-gutter\u2462"},{"id":"ref-for-scrollbar-gutter\u2463"},{"id":"ref-for-scrollbar-gutter\u2464"},{"id":"ref-for-scrollbar-gutter\u2465"},{"id":"ref-for-scrollbar-gutter\u2466"},{"id":"ref-for-scrollbar-gutter\u2467"},{"id":"ref-for-scrollbar-gutter\u2468"},{"id":"ref-for-scrollbar-gutter\u2460\u24ea"},{"id":"ref-for-scrollbar-gutter\u2460\u2460"},{"id":"ref-for-scrollbar-gutter\u2460\u2461"},{"id":"ref-for-scrollbar-gutter\u2460\u2462"},{"id":"ref-for-scrollbar-gutter\u2460\u2463"},{"id":"ref-for-scrollbar-gutter\u2460\u2464"},{"id":"ref-for-scrollbar-gutter\u2460\u2465"},{"id":"ref-for-scrollbar-gutter\u2460\u2466"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#scrollbar-gutter"}, "scrollport": {"dfnID":"scrollport","dfnText":"scrollport","external":false,"refSections":[{"refs":[{"id":"ref-for-scrollport"},{"id":"ref-for-scrollport\u2460"},{"id":"ref-for-scrollport\u2461"},{"id":"ref-for-scrollport\u2462"}],"title":"2.3. \nScrolling Overflow"}],"url":"#scrollport"}, "valdef-overflow-auto": {"dfnID":"valdef-overflow-auto","dfnText":"auto","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-auto"},{"id":"ref-for-valdef-overflow-auto\u2460"},{"id":"ref-for-valdef-overflow-auto\u2461"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-valdef-overflow-auto\u2462"}],"title":"3.1.1. \nInteraction of visibility and overflow"},{"refs":[{"id":"ref-for-valdef-overflow-auto\u2463"}],"title":"3.1.2. \nInteraction of border-radius and overflow"},{"refs":[{"id":"ref-for-valdef-overflow-auto\u2464"}],"title":"3.1.3. \nOverflow in Print and Other Static Media"},{"refs":[{"id":"ref-for-valdef-overflow-auto\u2465"}],"title":"3.3. \nOverflow Viewport Propagation"},{"refs":[{"id":"ref-for-valdef-overflow-auto\u2466"},{"id":"ref-for-valdef-overflow-auto\u2467"},{"id":"ref-for-valdef-overflow-auto\u2468"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#valdef-overflow-auto"}, "valdef-overflow-clip": {"dfnID":"valdef-overflow-clip","dfnText":"clip","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-clip"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-valdef-overflow-clip\u2460"},{"id":"ref-for-valdef-overflow-clip\u2461"},{"id":"ref-for-valdef-overflow-clip\u2462"},{"id":"ref-for-valdef-overflow-clip\u2463"},{"id":"ref-for-valdef-overflow-clip\u2464"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-valdef-overflow-clip\u2465"},{"id":"ref-for-valdef-overflow-clip\u2466"}],"title":"3.1.2. \nInteraction of border-radius and overflow"},{"refs":[{"id":"ref-for-valdef-overflow-clip\u2467"}],"title":"3.3. \nOverflow Viewport Propagation"},{"refs":[{"id":"ref-for-valdef-overflow-clip\u2468"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#valdef-overflow-clip"}, "valdef-overflow-clip-margin-length-0": {"dfnID":"valdef-overflow-clip-margin-length-0","dfnText":"<length [0,\u221e]>","external":false,"refSections":[],"url":"#valdef-overflow-clip-margin-length-0"}, "valdef-overflow-clip-margin-visual-box": {"dfnID":"valdef-overflow-clip-margin-visual-box","dfnText":"<visual-box>","external":false,"refSections":[],"url":"#valdef-overflow-clip-margin-visual-box"}, "valdef-overflow-hidden": {"dfnID":"valdef-overflow-hidden","dfnText":"hidden","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-hidden"},{"id":"ref-for-valdef-overflow-hidden\u2460"},{"id":"ref-for-valdef-overflow-hidden\u2461"},{"id":"ref-for-valdef-overflow-hidden\u2462"},{"id":"ref-for-valdef-overflow-hidden\u2463"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-valdef-overflow-hidden\u2464"}],"title":"3.1.2. \nInteraction of border-radius and overflow"},{"refs":[{"id":"ref-for-valdef-overflow-hidden\u2465"}],"title":"3.1.3. \nOverflow in Print and Other Static Media"},{"refs":[{"id":"ref-for-valdef-overflow-hidden\u2466"}],"title":"3.3. \nOverflow Viewport Propagation"},{"refs":[{"id":"ref-for-valdef-overflow-hidden\u2467"},{"id":"ref-for-valdef-overflow-hidden\u2468"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#valdef-overflow-hidden"}, "valdef-overflow-overlay": {"dfnID":"valdef-overflow-overlay","dfnText":"overlay","external":false,"refSections":[],"url":"#valdef-overflow-overlay"}, "valdef-overflow-scroll": {"dfnID":"valdef-overflow-scroll","dfnText":"scroll","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-scroll"},{"id":"ref-for-valdef-overflow-scroll\u2460"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-valdef-overflow-scroll\u2461"}],"title":"3.1.1. \nInteraction of visibility and overflow"},{"refs":[{"id":"ref-for-valdef-overflow-scroll\u2462"}],"title":"3.1.2. \nInteraction of border-radius and overflow"},{"refs":[{"id":"ref-for-valdef-overflow-scroll\u2463"}],"title":"3.1.3. \nOverflow in Print and Other Static Media"},{"refs":[{"id":"ref-for-valdef-overflow-scroll\u2464"},{"id":"ref-for-valdef-overflow-scroll\u2465"},{"id":"ref-for-valdef-overflow-scroll\u2466"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#valdef-overflow-scroll"}, "valdef-overflow-visible": {"dfnID":"valdef-overflow-visible","dfnText":"visible","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-visible"},{"id":"ref-for-valdef-overflow-visible\u2460"},{"id":"ref-for-valdef-overflow-visible\u2461"},{"id":"ref-for-valdef-overflow-visible\u2462"},{"id":"ref-for-valdef-overflow-visible\u2463"}],"title":"3.1. \nManaging Overflow: the overflow-x, overflow-y, and overflow properties"},{"refs":[{"id":"ref-for-valdef-overflow-visible\u2464"}],"title":"3.1.2. \nInteraction of border-radius and overflow"},{"refs":[{"id":"ref-for-valdef-overflow-visible\u2465"},{"id":"ref-for-valdef-overflow-visible\u2466"},{"id":"ref-for-valdef-overflow-visible\u2467"}],"title":"3.3. \nOverflow Viewport Propagation"},{"refs":[{"id":"ref-for-valdef-overflow-visible\u2468"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"},{"refs":[{"id":"ref-for-valdef-overflow-visible\u2460\u24ea"}],"title":"5.1. \nOverflow Ellipsis: the text-overflow property"}],"url":"#valdef-overflow-visible"}, "valdef-scroll-behavior-auto": {"dfnID":"valdef-scroll-behavior-auto","dfnText":"auto","external":false,"refSections":[],"url":"#valdef-scroll-behavior-auto"}, "valdef-scroll-behavior-smooth": {"dfnID":"valdef-scroll-behavior-smooth","dfnText":"smooth","external":false,"refSections":[],"url":"#valdef-scroll-behavior-smooth"}, "valdef-scrollbar-gutter-auto": {"dfnID":"valdef-scrollbar-gutter-auto","dfnText":"auto","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-scrollbar-gutter-auto"},{"id":"ref-for-valdef-scrollbar-gutter-auto\u2460"},{"id":"ref-for-valdef-scrollbar-gutter-auto\u2461"},{"id":"ref-for-valdef-scrollbar-gutter-auto\u2462"},{"id":"ref-for-valdef-scrollbar-gutter-auto\u2463"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#valdef-scrollbar-gutter-auto"}, "valdef-scrollbar-gutter-both-edges": {"dfnID":"valdef-scrollbar-gutter-both-edges","dfnText":"both-edges","external":false,"refSections":[],"url":"#valdef-scrollbar-gutter-both-edges"}, "valdef-scrollbar-gutter-stable": {"dfnID":"valdef-scrollbar-gutter-stable","dfnText":"stable","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-scrollbar-gutter-stable"},{"id":"ref-for-valdef-scrollbar-gutter-stable\u2460"},{"id":"ref-for-valdef-scrollbar-gutter-stable\u2461"},{"id":"ref-for-valdef-scrollbar-gutter-stable\u2462"}],"title":"4.2. \nReserving space for the scrollbar: the scrollbar-gutter property"}],"url":"#valdef-scrollbar-gutter-stable"}, }; 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 = { "https://drafts.csswg.org/css-box-4/#typedef-visual-box": "Expands to: border-box | content-box | padding-box", "https://drafts.csswg.org/css-values-4/#length-value": "Expands to: advance measure | cap | ch | cm | dvb | dvh | dvi | dvmax | dvmin | dvw | em | ex | ic | in | lh | lvb | lvh | lvi | lvmax | lvmin | lvw | mm | pc | pt | px | rcap | rch | rem | rex | ric | rlh | svb | svh | svi | svmax | svmin | svw | vb | vh | vi | vmax | vmin | vw", }; 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 = { "#classic-scrollbars": {"displayText":"classic scrollbars","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"classic scrollbars","type":"dfn","url":"#classic-scrollbars"}, "#initial-scroll-position": {"displayText":"initial scroll position","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"initial scroll position","type":"dfn","url":"#initial-scroll-position"}, "#ink-overflow": {"displayText":"ink overflow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"ink overflow","type":"dfn","url":"#ink-overflow"}, "#ink-overflow-rectangle": {"displayText":"ink overflow rectangle","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"ink overflow rectangle","type":"dfn","url":"#ink-overflow-rectangle"}, "#ink-overflow-region": {"displayText":"ink overflow area","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"ink overflow area","type":"dfn","url":"#ink-overflow-region"}, "#negative-scrollable-overflow-region": {"displayText":"negative scrollable overflow region","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"negative scrollable overflow region","type":"dfn","url":"#negative-scrollable-overflow-region"}, "#overflow": {"displayText":"overflow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow","type":"dfn","url":"#overflow"}, "#overflow-clip-edge": {"displayText":"overflow clip edge","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow clip edge","type":"dfn","url":"#overflow-clip-edge"}, "#overlay-scrollbars": {"displayText":"overlay scrollbars","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overlay scrollbars","type":"dfn","url":"#overlay-scrollbars"}, "#propdef-overflow": {"displayText":"overflow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow","type":"property","url":"#propdef-overflow"}, "#propdef-overflow-block": {"displayText":"overflow-block","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow-block","type":"property","url":"#propdef-overflow-block"}, "#propdef-overflow-clip-margin": {"displayText":"overflow-clip-margin","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow-clip-margin","type":"property","url":"#propdef-overflow-clip-margin"}, "#propdef-overflow-inline": {"displayText":"overflow-inline","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow-inline","type":"property","url":"#propdef-overflow-inline"}, "#propdef-overflow-x": {"displayText":"overflow-x","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow-x","type":"property","url":"#propdef-overflow-x"}, "#propdef-overflow-y": {"displayText":"overflow-y","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"overflow-y","type":"property","url":"#propdef-overflow-y"}, "#propdef-scroll-behavior": {"displayText":"scroll-behavior","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scroll-behavior","type":"property","url":"#propdef-scroll-behavior"}, "#propdef-scrollbar-gutter": {"displayText":"scrollbar-gutter","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scrollbar-gutter","type":"property","url":"#propdef-scrollbar-gutter"}, "#propdef-text-overflow": {"displayText":"text-overflow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"text-overflow","type":"property","url":"#propdef-text-overflow"}, "#scroll-container": {"displayText":"scroll container","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scroll container","type":"dfn","url":"#scroll-container"}, "#scroll-offset": {"displayText":"scroll offset","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scroll offset","type":"dfn","url":"#scroll-offset"}, "#scroll-origin": {"displayText":"scroll origin","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scroll origin","type":"dfn","url":"#scroll-origin"}, "#scroll-origin-position": {"displayText":"scroll origin position","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scroll origin position","type":"dfn","url":"#scroll-origin-position"}, "#scroll-position": {"displayText":"scroll position","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scroll position","type":"dfn","url":"#scroll-position"}, "#scrollable-overflow": {"displayText":"scrollable overflow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scrollable overflow","type":"dfn","url":"#scrollable-overflow"}, "#scrollable-overflow-rectangle": {"displayText":"scrollable overflow rectangle","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scrollable overflow rectangle","type":"dfn","url":"#scrollable-overflow-rectangle"}, "#scrollable-overflow-region": {"displayText":"scrollable overflow area","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scrollable overflow area","type":"dfn","url":"#scrollable-overflow-region"}, "#scrollbar-gutter": {"displayText":"scrollbar gutter","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scrollbar gutter","type":"dfn","url":"#scrollbar-gutter"}, "#scrollport": {"displayText":"scrollport","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scrollport","type":"dfn","url":"#scrollport"}, "#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":"local","text":"auto","type":"value","url":"#valdef-overflow-auto"}, "#valdef-overflow-clip": {"displayText":"clip","export":true,"for_":["overflow","overflow-x","overflow-y"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"clip","type":"value","url":"#valdef-overflow-clip"}, "#valdef-overflow-hidden": {"displayText":"hidden","export":true,"for_":["overflow","overflow-x","overflow-y"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"hidden","type":"value","url":"#valdef-overflow-hidden"}, "#valdef-overflow-scroll": {"displayText":"scroll","export":true,"for_":["overflow","overflow-x","overflow-y"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"scroll","type":"value","url":"#valdef-overflow-scroll"}, "#valdef-overflow-visible": {"displayText":"visible","export":true,"for_":["overflow","overflow-x","overflow-y"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"visible","type":"value","url":"#valdef-overflow-visible"}, "#valdef-scrollbar-gutter-auto": {"displayText":"auto","export":true,"for_":["scrollbar-gutter"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"auto","type":"value","url":"#valdef-scrollbar-gutter-auto"}, "#valdef-scrollbar-gutter-stable": {"displayText":"stable","export":true,"for_":["scrollbar-gutter"],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"local","text":"stable","type":"value","url":"#valdef-scrollbar-gutter-stable"}, "https://drafts.csswg.org/css-align-3/#baseline-alignment": {"displayText":"baseline alignment","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-align","spec":"css-align-3","status":"current","text":"baseline alignment","type":"dfn","url":"https://drafts.csswg.org/css-align-3/#baseline-alignment"}, "https://drafts.csswg.org/css-align-3/#content-distribute": {"displayText":"content distribution","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-align","spec":"css-align-3","status":"current","text":"content distribution","type":"dfn","url":"https://drafts.csswg.org/css-align-3/#content-distribute"}, "https://drafts.csswg.org/css-align-3/#propdef-align-content": {"displayText":"align-content","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-align","spec":"css-align-3","status":"current","text":"align-content","type":"property","url":"https://drafts.csswg.org/css-align-3/#propdef-align-content"}, "https://drafts.csswg.org/css-align-3/#propdef-justify-content": {"displayText":"justify-content","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-align","spec":"css-align-3","status":"current","text":"justify-content","type":"property","url":"https://drafts.csswg.org/css-align-3/#propdef-justify-content"}, "https://drafts.csswg.org/css-align-3/#propdef-place-content": {"displayText":"place-content","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-align","spec":"css-align-3","status":"current","text":"place-content","type":"property","url":"https://drafts.csswg.org/css-align-3/#propdef-place-content"}, "https://drafts.csswg.org/css-align-3/#valdef-justify-content-normal": {"displayText":"normal","export":true,"for_":["justify-content","align-content"],"level":"3","normative":true,"shortname":"css-align","spec":"css-align-3","status":"current","text":"normal","type":"value","url":"https://drafts.csswg.org/css-align-3/#valdef-justify-content-normal"}, "https://drafts.csswg.org/css-backgrounds-3/#background-positioning-area": {"displayText":"background positioning area","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"background positioning area","type":"dfn","url":"https://drafts.csswg.org/css-backgrounds-3/#background-positioning-area"}, "https://drafts.csswg.org/css-backgrounds-3/#box-shadow-outer-box-shadow": {"displayText":"outer box-shadow","export":true,"for_":["box-shadow"],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"outer box-shadow","type":"dfn","url":"https://drafts.csswg.org/css-backgrounds-3/#box-shadow-outer-box-shadow"}, "https://drafts.csswg.org/css-backgrounds-3/#propdef-border-radius": {"displayText":"border-radius","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"current","text":"border-radius","type":"property","url":"https://drafts.csswg.org/css-backgrounds-3/#propdef-border-radius"}, "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-backgrounds-4/#background-painting-area": {"displayText":"background painting area","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-4","status":"current","text":"background painting area","type":"dfn","url":"https://drafts.csswg.org/css-backgrounds-4/#background-painting-area"}, "https://drafts.csswg.org/css-box-4/#border-edge": {"displayText":"border edge","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"current","text":"border edge","type":"dfn","url":"https://drafts.csswg.org/css-box-4/#border-edge"}, "https://drafts.csswg.org/css-box-4/#content-area": {"displayText":"content area","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"current","text":"content area","type":"dfn","url":"https://drafts.csswg.org/css-box-4/#content-area"}, "https://drafts.csswg.org/css-box-4/#padding": {"displayText":"padding","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"current","text":"padding","type":"dfn","url":"https://drafts.csswg.org/css-box-4/#padding"}, "https://drafts.csswg.org/css-box-4/#padding-box": {"displayText":"padding box","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"current","text":"padding box","type":"dfn","url":"https://drafts.csswg.org/css-box-4/#padding-box"}, "https://drafts.csswg.org/css-box-4/#padding-edge": {"displayText":"padding edge","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"current","text":"padding edge","type":"dfn","url":"https://drafts.csswg.org/css-box-4/#padding-edge"}, "https://drafts.csswg.org/css-box-4/#typedef-visual-box": {"displayText":"<visual-box>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"current","text":"<visual-box>","type":"type","url":"https://drafts.csswg.org/css-box-4/#typedef-visual-box"}, "https://drafts.csswg.org/css-break-4/#region-break": {"displayText":"region break","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-break","spec":"css-break-4","status":"current","text":"region break","type":"dfn","url":"https://drafts.csswg.org/css-break-4/#region-break"}, "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/#css-legacy-value-alias": {"displayText":"legacy value alias","export":true,"for_":["CSS"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"legacy value alias","type":"dfn","url":"https://drafts.csswg.org/css-cascade-5/#css-legacy-value-alias"}, "https://drafts.csswg.org/css-cascade-5/#shorthand-property": {"displayText":"shorthand","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"current","text":"shorthand","type":"dfn","url":"https://drafts.csswg.org/css-cascade-5/#shorthand-property"}, "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-contain-2/#containment": {"displayText":"containment","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-contain","spec":"css-contain-2","status":"current","text":"containment","type":"dfn","url":"https://drafts.csswg.org/css-contain-2/#containment"}, "https://drafts.csswg.org/css-contain-2/#propdef-contain": {"displayText":"contain","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-contain","spec":"css-contain-2","status":"current","text":"contain","type":"property","url":"https://drafts.csswg.org/css-contain-2/#propdef-contain"}, "https://drafts.csswg.org/css-display-3/#propdef-display": {"displayText":"display","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"current","text":"display","type":"property","url":"https://drafts.csswg.org/css-display-3/#propdef-display"}, "https://drafts.csswg.org/css-display-4/#block-box": {"displayText":"block box","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"block box","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#block-box"}, "https://drafts.csswg.org/css-display-4/#block-container": {"displayText":"block container","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"block container","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#block-container"}, "https://drafts.csswg.org/css-display-4/#containing-block-chain": {"displayText":"containing block chain","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"containing block chain","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#containing-block-chain"}, "https://drafts.csswg.org/css-display-4/#establish-an-independent-formatting-context": {"displayText":"establishes an independent formatting context","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"establishes an independent formatting context","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#establish-an-independent-formatting-context"}, "https://drafts.csswg.org/css-display-4/#initial-containing-block": {"displayText":"initial containing block","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"initial containing block","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#initial-containing-block"}, "https://drafts.csswg.org/css-display-4/#propdef-visibility": {"displayText":"visibility","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"visibility","type":"property","url":"https://drafts.csswg.org/css-display-4/#propdef-visibility"}, "https://drafts.csswg.org/css-display-4/#replaced-element": {"displayText":"replaced","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"replaced","type":"dfn","url":"https://drafts.csswg.org/css-display-4/#replaced-element"}, "https://drafts.csswg.org/css-display-4/#valdef-display-none": {"displayText":"none","export":true,"for_":["display","<display-box>"],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"none","type":"value","url":"https://drafts.csswg.org/css-display-4/#valdef-display-none"}, "https://drafts.csswg.org/css-display-4/#valdef-visibility-collapse": {"displayText":"collapse","export":true,"for_":["visibility"],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"collapse","type":"value","url":"https://drafts.csswg.org/css-display-4/#valdef-visibility-collapse"}, "https://drafts.csswg.org/css-display-4/#valdef-visibility-hidden": {"displayText":"hidden","export":true,"for_":["visibility"],"level":"4","normative":true,"shortname":"css-display","spec":"css-display-4","status":"current","text":"hidden","type":"value","url":"https://drafts.csswg.org/css-display-4/#valdef-visibility-hidden"}, "https://drafts.csswg.org/css-flexbox-1/#cross-start": {"displayText":"cross-start","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"current","text":"cross-start","type":"dfn","url":"https://drafts.csswg.org/css-flexbox-1/#cross-start"}, "https://drafts.csswg.org/css-flexbox-1/#flex-container": {"displayText":"flex container","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"current","text":"flex container","type":"dfn","url":"https://drafts.csswg.org/css-flexbox-1/#flex-container"}, "https://drafts.csswg.org/css-flexbox-1/#flex-item": {"displayText":"flex item","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"current","text":"flex item","type":"dfn","url":"https://drafts.csswg.org/css-flexbox-1/#flex-item"}, "https://drafts.csswg.org/css-flexbox-1/#main-start": {"displayText":"main-start","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"current","text":"main-start","type":"dfn","url":"https://drafts.csswg.org/css-flexbox-1/#main-start"}, "https://drafts.csswg.org/css-grid-2/#grid-item": {"displayText":"grid item","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"current","text":"grid item","type":"dfn","url":"https://drafts.csswg.org/css-grid-2/#grid-item"}, "https://drafts.csswg.org/css-inline-3/#line-box": {"displayText":"line box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"current","text":"line box","type":"dfn","url":"https://drafts.csswg.org/css-inline-3/#line-box"}, "https://drafts.csswg.org/css-logical-1/#logical-property-group": {"displayText":"logical property group","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-logical","spec":"css-logical-1","status":"current","text":"logical property group","type":"dfn","url":"https://drafts.csswg.org/css-logical-1/#logical-property-group"}, "https://drafts.csswg.org/css-overflow-4/#propdef--webkit-line-clamp": {"displayText":"-webkit-line-clamp","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-overflow","spec":"css-overflow-4","status":"current","text":"-webkit-line-clamp","type":"property","url":"https://drafts.csswg.org/css-overflow-4/#propdef--webkit-line-clamp"}, "https://drafts.csswg.org/css-overflow-4/#propdef-block-ellipsis": {"displayText":"block-ellipsis","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-overflow","spec":"css-overflow-4","status":"current","text":"block-ellipsis","type":"property","url":"https://drafts.csswg.org/css-overflow-4/#propdef-block-ellipsis"}, "https://drafts.csswg.org/css-overflow-4/#propdef-continue": {"displayText":"continue","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-overflow","spec":"css-overflow-4","status":"current","text":"continue","type":"property","url":"https://drafts.csswg.org/css-overflow-4/#propdef-continue"}, "https://drafts.csswg.org/css-overflow-4/#propdef-line-clamp": {"displayText":"line-clamp","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-overflow","spec":"css-overflow-4","status":"current","text":"line-clamp","type":"property","url":"https://drafts.csswg.org/css-overflow-4/#propdef-line-clamp"}, "https://drafts.csswg.org/css-overflow-4/#propdef-max-lines": {"displayText":"max-lines","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-overflow","spec":"css-overflow-4","status":"current","text":"max-lines","type":"property","url":"https://drafts.csswg.org/css-overflow-4/#propdef-max-lines"}, "https://drafts.csswg.org/css-pseudo-4/#selectordef-first-letter": {"displayText":"::first-letter","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"current","text":"::first-letter","type":"selector","url":"https://drafts.csswg.org/css-pseudo-4/#selectordef-first-letter"}, "https://drafts.csswg.org/css-pseudo-4/#selectordef-first-line": {"displayText":"::first-line","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"current","text":"::first-line","type":"selector","url":"https://drafts.csswg.org/css-pseudo-4/#selectordef-first-line"}, "https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap": {"displayText":"scroll snap","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-scroll-snap","spec":"css-scroll-snap-1","status":"current","text":"scroll snap","type":"dfn","url":"https://drafts.csswg.org/css-scroll-snap-1/#scroll-snap"}, "https://drafts.csswg.org/css-scroll-snap-2/#propdef-scroll-initial-target": {"displayText":"scroll-initial-target","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-scroll-snap","spec":"css-scroll-snap-2","status":"current","text":"scroll-initial-target","type":"property","url":"https://drafts.csswg.org/css-scroll-snap-2/#propdef-scroll-initial-target"}, "https://drafts.csswg.org/css-sizing-3/#propdef-height": {"displayText":"height","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"current","text":"height","type":"property","url":"https://drafts.csswg.org/css-sizing-3/#propdef-height"}, "https://drafts.csswg.org/css-sizing-3/#propdef-max-height": {"displayText":"max-height","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"current","text":"max-height","type":"property","url":"https://drafts.csswg.org/css-sizing-3/#propdef-max-height"}, "https://drafts.csswg.org/css-text-decor-4/#propdef-text-shadow": {"displayText":"text-shadow","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text-decor","spec":"css-text-decor-4","status":"current","text":"text-shadow","type":"property","url":"https://drafts.csswg.org/css-text-decor-4/#propdef-text-shadow"}, "https://drafts.csswg.org/css-transforms-2/#3d-rendering-context": {"displayText":"3D rendering context","export":false,"for_":[],"level":"2","normative":true,"shortname":"css-transforms","spec":"css-transforms-2","status":"current","text":"3d rendering context","type":"dfn","url":"https://drafts.csswg.org/css-transforms-2/#3d-rendering-context"}, "https://drafts.csswg.org/css-transforms-2/#propdef-transform-style": {"displayText":"transform-style","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-transforms","spec":"css-transforms-2","status":"current","text":"transform-style","type":"property","url":"https://drafts.csswg.org/css-transforms-2/#propdef-transform-style"}, "https://drafts.csswg.org/css-values-4/#comb-all": {"displayText":"&&","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"&&","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#comb-all"}, "https://drafts.csswg.org/css-values-4/#comb-any": {"displayText":"||","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"||","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#comb-any"}, "https://drafts.csswg.org/css-values-4/#comb-one": {"displayText":"|","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"|","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#comb-one"}, "https://drafts.csswg.org/css-values-4/#css-bracketed-range-notation": {"displayText":"CSS bracketed range notation","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"css bracketed range notation","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#css-bracketed-range-notation"}, "https://drafts.csswg.org/css-values-4/#css-wide-keywords": {"displayText":"CSS-wide keywords","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"css-wide keywords","type":"dfn","url":"https://drafts.csswg.org/css-values-4/#css-wide-keywords"}, "https://drafts.csswg.org/css-values-4/#length-value": {"displayText":"<length>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<length>","type":"type","url":"https://drafts.csswg.org/css-values-4/#length-value"}, "https://drafts.csswg.org/css-values-4/#mult-num-range": {"displayText":"{A,B}","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"{a,b}","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#mult-num-range"}, "https://drafts.csswg.org/css-values-4/#mult-opt": {"displayText":"?","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"?","type":"grammar","url":"https://drafts.csswg.org/css-values-4/#mult-opt"}, "https://drafts.csswg.org/css-values-4/#typedef-length-percentage": {"displayText":"<length-percentage>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"current","text":"<length-percentage>","type":"type","url":"https://drafts.csswg.org/css-values-4/#typedef-length-percentage"}, "https://drafts.csswg.org/css-writing-modes-3/#physical-left": {"displayText":"left","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-3","status":"current","text":"left","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-3/#physical-left"}, "https://drafts.csswg.org/css-writing-modes-3/#propdef-direction": {"displayText":"direction","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-3","status":"current","text":"direction","type":"property","url":"https://drafts.csswg.org/css-writing-modes-3/#propdef-direction"}, "https://drafts.csswg.org/css-writing-modes-4/#bidirectionality": {"displayText":"bidirectionality","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"bidirectionality","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#bidirectionality"}, "https://drafts.csswg.org/css-writing-modes-4/#block-axis": {"displayText":"block axis","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"block axis","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#block-axis"}, "https://drafts.csswg.org/css-writing-modes-4/#block-end": {"displayText":"block end","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"block end","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#block-end"}, "https://drafts.csswg.org/css-writing-modes-4/#block-start": {"displayText":"block-start","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"block-start","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#block-start"}, "https://drafts.csswg.org/css-writing-modes-4/#css-end": {"displayText":"end","export":true,"for_":["CSS"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"end","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#css-end"}, "https://drafts.csswg.org/css-writing-modes-4/#inline-axis": {"displayText":"inline axis","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"inline axis","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#inline-axis"}, "https://drafts.csswg.org/css-writing-modes-4/#inline-end": {"displayText":"inline end","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"inline end","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#inline-end"}, "https://drafts.csswg.org/css-writing-modes-4/#inline-start": {"displayText":"inline-start","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"inline-start","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#inline-start"}, "https://drafts.csswg.org/css-writing-modes-4/#principal-writing-mode": {"displayText":"principal writing mode","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"current","text":"principal writing mode","type":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#principal-writing-mode"}, "https://drafts.csswg.org/css-writing-modes-4/#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":"dfn","url":"https://drafts.csswg.org/css-writing-modes-4/#writing-mode"}, "https://drafts.csswg.org/cssom-view-1/#concept-instant-scroll": {"displayText":"instant scroll","export":false,"for_":[],"level":"1","normative":true,"shortname":"cssom-view","spec":"cssom-view-1","status":"current","text":"instant scroll","type":"dfn","url":"https://drafts.csswg.org/cssom-view-1/#concept-instant-scroll"}, "https://drafts.csswg.org/cssom-view-1/#concept-smooth-scroll": {"displayText":"smooth scroll","export":true,"for_":[],"level":"1","normative":true,"shortname":"cssom-view","spec":"cssom-view-1","status":"current","text":"smooth scroll","type":"dfn","url":"https://drafts.csswg.org/cssom-view-1/#concept-smooth-scroll"}, "https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview": {"displayText":"scrollIntoView()","export":true,"for_":["Element"],"level":"1","normative":true,"shortname":"cssom-view","spec":"cssom-view-1","status":"current","text":"scrollIntoView()","type":"method","url":"https://drafts.csswg.org/cssom-view-1/#dom-element-scrollintoview"}, "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.fxtf.org/css-masking-1/#propdef-clip": {"displayText":"clip","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-masking","spec":"css-masking-1","status":"current","text":"clip","type":"property","url":"https://drafts.fxtf.org/css-masking-1/#propdef-clip"}, "https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus": {"displayText":"focus()","export":true,"for_":["Window"],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"focus()","type":"method","url":"https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus"}, "https://html.spec.whatwg.org/multipage/sections.html#the-body-element": {"displayText":"body","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"body","type":"element","url":"https://html.spec.whatwg.org/multipage/sections.html#the-body-element"}, "https://html.spec.whatwg.org/multipage/semantics.html#the-html-element": {"displayText":"html","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"html","type":"element","url":"https://html.spec.whatwg.org/multipage/semantics.html#the-html-element"}, "https://svgwg.org/svg2-draft/coords.html#TermCanvas": {"displayText":"canvas","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"current","text":"canvas","type":"dfn","url":"https://svgwg.org/svg2-draft/coords.html#TermCanvas"}, "https://w3c.github.io/epub-specs/epub33/core/#dfn-viewport": {"displayText":"viewport","export":true,"for_":[],"level":"1","normative":true,"shortname":"epub","spec":"epub-33","status":"current","text":"viewport","type":"dfn","url":"https://w3c.github.io/epub-specs/epub33/core/#dfn-viewport"}, }; 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 refHintKey = link.getAttribute("data-refhint-key"); let key = url; if(refHintKey) { key = refHintKey + "_" + url; } const ref = refsData[key]; if(!ref) return; hideAllRefHints(); // Only display one at this time. const refHint = mkRefHint(link, ref); append(document.body, refHint); link.setAttribute("aria-expanded", "true"); positionRefHint(refHint); } function setupRefHintEventListeners(link, refHint) { if (refHint.teardownEventListeners) return; // Add event handlers to hide the refHint after the user moves away // from both the link and refHint, if not hovering either within one second. let timeout = null; const startHidingRefHint = (event) => { if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { hideRefHint(refHint); }, 1000); } const resetHidingRefHint = (event) => { if (timeout) clearTimeout(timeout); timeout = null; }; link.addEventListener("mouseleave", startHidingRefHint); link.addEventListener("mouseenter", resetHidingRefHint); link.addEventListener("blur", startHidingRefHint); link.addEventListener("focus", resetHidingRefHint); refHint.addEventListener("mouseleave", startHidingRefHint); refHint.addEventListener("mouseenter", resetHidingRefHint); refHint.addEventListener("blur", startHidingRefHint); refHint.addEventListener("focus", resetHidingRefHint); refHint.teardownEventListeners = () => { // remove event listeners resetHidingRefHint(); link.removeEventListener("mouseleave", startHidingRefHint); link.removeEventListener("mouseenter", resetHidingRefHint); link.removeEventListener("blur", startHidingRefHint); link.removeEventListener("focus", resetHidingRefHint); refHint.removeEventListener("mouseleave", startHidingRefHint); refHint.removeEventListener("mouseenter", resetHidingRefHint); refHint.removeEventListener("blur", startHidingRefHint); refHint.removeEventListener("focus", resetHidingRefHint); }; } function positionRefHint(refHint) { const link = refHint.forLink; const linkPos = getBounds(link); refHint.style.top = linkPos.bottom + "px"; refHint.style.left = linkPos.left + "px"; const panelPos = refHint.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount); refHint.style.left = newLeft + "px"; } } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function showRefHintListener(e) { // If the target isn't in a link (or is a link), // just ignore it. let link = e.target.closest("a"); if(!link) return; // If the target is in a ref-hint panel // (aka a link in the already-open one), // also just ignore it. if(link.closest(".ref-hint")) return; // Otherwise, show the panel for the link. showRefHint(link); } function hideAllHintsListener(e) { // If the click is inside a ref-hint panel, ignore it. if(e.target.closest(".ref-hint")) return; // Otherwise, close all the current panels. hideAllRefHints(); } document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("mousedown", showRefHintListener); document.body.addEventListener("focus", showRefHintListener); document.body.addEventListener("click", hideAllHintsListener); }); window.addEventListener("resize", () => { // Hide any open ref hint. hideAllRefHints(); }); } </script>

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