CINXE.COM
CSS Display 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 Display Module Level 3</title> <meta content="CR" name="w3c-status"> <meta content="Bikeshed version 742f3d674, updated Mon Nov 4 14:56:54 2024 -0800" name="generator"> <link href="https://www.w3.org/TR/css-display-3/" rel="canonical"> <meta content="9a8ec95603298361d2ff2f39dacf533d502e8e4c" name="revision"> <meta content="dark light" name="color-scheme"> <style> .code-and-figure { display: table; margin: 0 auto; border-spacing: 1em; } .code-and-figure > div { display: table-cell; vertical-align: middle; } .code-and-figure img { background: transparent; } </style> <style> #display-value-summary td, #display-value-summary th { text-align: left; } </style> <style> #order-example { display:flex; flex-flow: column; margin: 0 auto 1em; color: black; background: white; max-width: 250px; padding: 0 1rem; text-align: left; border: thick solid; } #order-example > h1 { color: black; } #order-example > img { order: -1; align-self: center; max-width: 100%; margin-inline: -1em; } </style> <style>/* Boilerplate: style-autolinks */ .css.css, .property.property, .descriptor.descriptor { color: var(--a-normal-text); font-size: inherit; font-family: inherit; } .css::before, .property::before, .descriptor::before { content: "‘"; } .css::after, .property::after, .descriptor::after { content: "’"; } .property, .descriptor { /* Don't wrap property and descriptor names */ white-space: nowrap; } .type { /* CSS value <type> */ font-style: italic; } pre .property::before, pre .property::after { content: ""; } [data-link-type="property"]::before, [data-link-type="propdesc"]::before, [data-link-type="descriptor"]::before, [data-link-type="value"]::before, [data-link-type="function"]::before, [data-link-type="at-rule"]::before, [data-link-type="selector"]::before, [data-link-type="maybe"]::before { content: "‘"; } [data-link-type="property"]::after, [data-link-type="propdesc"]::after, [data-link-type="descriptor"]::after, [data-link-type="value"]::after, [data-link-type="function"]::after, [data-link-type="at-rule"]::after, [data-link-type="selector"]::after, [data-link-type="maybe"]::after { content: "’"; } [data-link-type].production::before, [data-link-type].production::after, .prod [data-link-type]::before, .prod [data-link-type]::after { content: ""; } [data-link-type=element], [data-link-type=element-attr] { font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: .9em; } [data-link-type=element]::before { content: "<" } [data-link-type=element]::after { content: ">" } [data-link-type=biblio] { white-space: pre; } @media (prefers-color-scheme: dark) { :root { --selflink-text: black; --selflink-bg: silver; --selflink-hover-text: white; } } </style> <style>/* Boilerplate: style-colors */ /* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */ :root { color-scheme: light dark; --text: black; --bg: white; --unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2016/logos/UD-watermark); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #707070; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #f8f8f8; --tocnav-active-text: #c00; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #f7f8f9; --tocsidebar-shadow: rgba(0,0,0,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #3980b5; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #005a9c; --hr-text: var(--text); --algo-border: #def; --del-text: red; --del-bg: transparent; --ins-text: #080; --ins-bg: transparent; --a-normal-text: #034575; --a-normal-underline: #bbb; --a-visited-text: var(--a-normal-text); --a-visited-underline: #707070; --a-hover-bg: rgba(75%, 75%, 75%, .25); --a-active-text: #c00; --a-active-underline: #c00; --blockquote-border: silver; --blockquote-bg: transparent; --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: #fbe9e9; --issue-text: var(--text); --issueheading-text: #831616; --example-border: #e0cb52; --example-bg: #fcfaee; --example-text: var(--text); --exampleheading-text: #574b0f; --note-border: #52e052; --note-bg: #e9fbe9; --note-text: var(--text); --noteheading-text: hsl(120, 70%, 30%); --notesummary-underline: silver; --assertion-border: #aaa; --assertion-bg: #eee; --assertion-text: black; --advisement-border: orange; --advisement-bg: #fec; --advisement-text: var(--text); --advisementheading-text: #b35f00; --warning-border: red; --warning-bg: hsla(40,100%,50%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #F5F0FF; --amendment-text: var(--text); --amendmentheading-text: #220066; --def-border: #8ccbf2; --def-bg: #def; --def-text: var(--text); --defrow-border: #bbd7e9; --datacell-border: silver; --indexinfo-text: #707070; --indextable-hover-text: black; --indextable-hover-bg: #f7f8f9; --outdatedspec-bg: rgba(0, 0, 0, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } @media (prefers-color-scheme: dark) { :root { --text: #ddd; --bg: black; --unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E"); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #999; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #080808; --tocnav-active-text: #f44; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #080808; --tocsidebar-shadow: rgba(255,255,255,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #6af; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #8af; --hr-text: var(--text); --algo-border: #456; --del-text: #f44; --del-bg: transparent; --ins-text: #4a4; --ins-bg: transparent; --a-normal-text: #6af; --a-normal-underline: #555; --a-visited-text: var(--a-normal-text); --a-visited-underline: var(--a-normal-underline); --a-hover-bg: rgba(25%, 25%, 25%, .2); --a-active-text: #f44; --a-active-underline: var(--a-active-text); --borderedblock-bg: rgba(255, 255, 255, .05); --blockquote-border: silver; --blockquote-bg: var(--borderedblock-bg); --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: var(--borderedblock-bg); --issue-text: var(--text); --issueheading-text: hsl(0deg, 70%, 70%); --example-border: hsl(50deg, 90%, 60%); --example-bg: var(--borderedblock-bg); --example-text: var(--text); --exampleheading-text: hsl(50deg, 70%, 70%); --note-border: hsl(120deg, 100%, 35%); --note-bg: var(--borderedblock-bg); --note-text: var(--text); --noteheading-text: hsl(120, 70%, 70%); --notesummary-underline: silver; --assertion-border: #444; --assertion-bg: var(--borderedblock-bg); --assertion-text: var(--text); --advisement-border: orange; --advisement-bg: #222218; --advisement-text: var(--text); --advisementheading-text: #f84; --warning-border: red; --warning-bg: hsla(40,100%,20%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #080010; --amendment-text: var(--text); --amendmentheading-text: #cc00ff; --def-border: #8ccbf2; --def-bg: #080818; --def-text: var(--text); --defrow-border: #136; --datacell-border: silver; --indexinfo-text: #aaa; --indextable-hover-text: var(--text); --indextable-hover-bg: #181818; --outdatedspec-bg: rgba(255, 255, 255, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } /* In case a transparent-bg image doesn't expect to be on a dark bg, which is quite common in practice... */ img { background: white; } } </style> <style>/* Boilerplate: style-counters */ body { counter-reset: example figure issue; } .issue { counter-increment: issue; } .issue:not(.no-marker)::before { content: "Issue " counter(issue); } .example { counter-increment: example; } .example:not(.no-marker)::before { content: "Example " counter(example); } .invalid.example:not(.no-marker)::before, .illegal.example:not(.no-marker)::before { content: "Invalid Example" counter(example); } figcaption { counter-increment: figure; } figcaption:not(.no-marker)::before { content: "Figure " counter(figure) " "; } </style> <style>/* Boilerplate: style-dfn-panel */ :root { --dfnpanel-bg: #ddd; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #ffc; --dfnpanel-target-outline: orange; } @media (prefers-color-scheme: dark) { :root { --dfnpanel-bg: #222; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #333; --dfnpanel-target-outline: silver; } } .dfn-panel { position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.75em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--dfnpanel-bg); color: var(--dfnpanel-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .dfn-panel:not(.on) { display: none; } .dfn-panel * { margin: 0; padding: 0; text-indent: 0; } .dfn-panel > b { display: block; } .dfn-panel a { color: var(--dfnpanel-text); } .dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; } .dfn-panel a:focus { outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color; } .dfn-panel > b + b { margin-top: 0.25em; } .dfn-panel ul { padding: 0 0 0 1em; list-style: none; } .dfn-panel li a { max-width: calc(300px - 1.5em - 1em); overflow: hidden; text-overflow: ellipsis; } .dfn-panel.activated { display: inline-block; position: fixed; left: 8px; bottom: 2em; margin: 0 auto; max-width: calc(100vw - 1.5em - .4em - .5em); max-height: 30vh; transition: left 1s ease-out, bottom 1s ease-out; } .dfn-panel .link-item:hover { text-decoration: underline; } .dfn-panel .link-item .copy-icon { opacity: 0; } .dfn-panel .link-item:hover .copy-icon, .dfn-panel .link-item .copy-icon:focus { opacity: 1; } .dfn-panel .copy-icon { display: inline-block; margin-right: 0.5em; width: 0.85em; height: 1em; border-radius: 3px; background-color: #ccc; cursor: pointer; } .dfn-panel .copy-icon .icon { width: 100%; height: 100%; background-color: #fff; display: flex; justify-content: center; align-items: center; position: relative; } .dfn-panel .copy-icon .icon::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid black; background-color: #ccc; opacity: 0.25; transform: translate(3px, -3px); } .dfn-panel .copy-icon:active .icon::before { opacity: 1; } .dfn-paneled[role="button"] { cursor: help; } .highlighted { animation: target-fade 3s; } @keyframes target-fade { from { background-color: var(--dfnpanel-target-bg); outline: 5px solid var(--dfnpanel-target-outline); } to { color: var(--a-normal-text); background-color: transparent; outline: transparent; } } </style> <style>/* Boilerplate: style-issues */ a[href].issue-return { float: right; float: inline-end; color: var(--issueheading-text); font-weight: bold; text-decoration: none; } </style> <style>/* Boilerplate: style-md-lists */ /* This is a weird hack for me not yet following the commonmark spec regarding paragraph and lists. */ [data-md] > :first-child { margin-top: 0; } [data-md] > :last-child { margin-bottom: 0; } </style> <style>/* Boilerplate: style-ref-hints */ :root { --ref-hint-bg: #ddd; --ref-hint-text: var(--text); } @media (prefers-color-scheme: dark) { :root { --ref-hint-bg: #222; --ref-hint-text: var(--text); } } .ref-hint { display: inline-block; position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.5em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--ref-hint-bg); color: var(--ref-hint-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .ref-hint * { margin: 0; padding: 0; text-indent: 0; } .ref-hint ul { padding: 0 0 0 1em; list-style: none; } </style> <style>/* Boilerplate: style-selflinks */ :root { --selflink-text: white; --selflink-bg: gray; --selflink-hover-text: black; } .heading, .issue, .note, .example, li, dt { position: relative; } a.self-link { position: absolute; top: 0; left: calc(-1 * (3.5rem - 26px)); width: calc(3.5rem - 26px); height: 2em; text-align: center; border: none; transition: opacity .2s; opacity: .5; } a.self-link:hover { opacity: 1; } .heading > a.self-link { font-size: 83%; } .example > a.self-link, .note > a.self-link, .issue > a.self-link { /* These blocks are overflow:auto, so positioning outside doesn't work. */ left: auto; right: 0; } li > a.self-link { left: calc(-1 * (3.5rem - 26px) - 2em); } dfn > a.self-link { top: auto; left: auto; opacity: 0; width: 1.5em; height: 1.5em; background: var(--selflink-bg); color: var(--selflink-text); font-style: normal; transition: opacity .2s, background-color .2s, color .2s; } dfn:hover > a.self-link { opacity: 1; } dfn > a.self-link:hover { color: var(--selflink-hover-text); } a.self-link::before { content: "¶"; } .heading > a.self-link::before { content: "§"; } dfn > a.self-link::before { content: "#"; } </style> <style>/* Boilerplate: style-syntax-highlighting */ code.highlight { padding: .1em; border-radius: .3em; } pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; } .highlight:not(.idl) { background: rgba(0, 0, 0, .03); } c-[a] { color: #990055 } /* Keyword.Declaration */ c-[b] { color: #990055 } /* Keyword.Type */ c-[c] { color: #708090 } /* Comment */ c-[d] { color: #708090 } /* Comment.Multiline */ c-[e] { color: #0077aa } /* Name.Attribute */ c-[f] { color: #669900 } /* Name.Tag */ c-[g] { color: #222222 } /* Name.Variable */ c-[k] { color: #990055 } /* Keyword */ c-[l] { color: #000000 } /* Literal */ c-[m] { color: #000000 } /* Literal.Number */ c-[n] { color: #0077aa } /* Name */ c-[o] { color: #999999 } /* Operator */ c-[p] { color: #999999 } /* Punctuation */ c-[s] { color: #a67f59 } /* Literal.String */ c-[t] { color: #a67f59 } /* Literal.String.Single */ c-[u] { color: #a67f59 } /* Literal.String.Double */ c-[cp] { color: #708090 } /* Comment.Preproc */ c-[c1] { color: #708090 } /* Comment.Single */ c-[cs] { color: #708090 } /* Comment.Special */ c-[kc] { color: #990055 } /* Keyword.Constant */ c-[kn] { color: #990055 } /* Keyword.Namespace */ c-[kp] { color: #990055 } /* Keyword.Pseudo */ c-[kr] { color: #990055 } /* Keyword.Reserved */ c-[ld] { color: #000000 } /* Literal.Date */ c-[nc] { color: #0077aa } /* Name.Class */ c-[no] { color: #0077aa } /* Name.Constant */ c-[nd] { color: #0077aa } /* Name.Decorator */ c-[ni] { color: #0077aa } /* Name.Entity */ c-[ne] { color: #0077aa } /* Name.Exception */ c-[nf] { color: #0077aa } /* Name.Function */ c-[nl] { color: #0077aa } /* Name.Label */ c-[nn] { color: #0077aa } /* Name.Namespace */ c-[py] { color: #0077aa } /* Name.Property */ c-[ow] { color: #999999 } /* Operator.Word */ c-[mb] { color: #000000 } /* Literal.Number.Bin */ c-[mf] { color: #000000 } /* Literal.Number.Float */ c-[mh] { color: #000000 } /* Literal.Number.Hex */ c-[mi] { color: #000000 } /* Literal.Number.Integer */ c-[mo] { color: #000000 } /* Literal.Number.Oct */ c-[sb] { color: #a67f59 } /* Literal.String.Backtick */ c-[sc] { color: #a67f59 } /* Literal.String.Char */ c-[sd] { color: #a67f59 } /* Literal.String.Doc */ c-[se] { color: #a67f59 } /* Literal.String.Escape */ c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */ c-[si] { color: #a67f59 } /* Literal.String.Interpol */ c-[sx] { color: #a67f59 } /* Literal.String.Other */ c-[sr] { color: #a67f59 } /* Literal.String.Regex */ c-[ss] { color: #a67f59 } /* Literal.String.Symbol */ c-[vc] { color: #0077aa } /* Name.Variable.Class */ c-[vg] { color: #0077aa } /* Name.Variable.Global */ c-[vi] { color: #0077aa } /* Name.Variable.Instance */ c-[il] { color: #000000 } /* Literal.Number.Integer.Long */ @media (prefers-color-scheme: dark) { .highlight:not(.idl) { background: rgba(255, 255, 255, .05); } c-[a] { color: #d33682 } /* Keyword.Declaration */ c-[b] { color: #d33682 } /* Keyword.Type */ c-[c] { color: #2aa198 } /* Comment */ c-[d] { color: #2aa198 } /* Comment.Multiline */ c-[e] { color: #268bd2 } /* Name.Attribute */ c-[f] { color: #b58900 } /* Name.Tag */ c-[g] { color: #cb4b16 } /* Name.Variable */ c-[k] { color: #d33682 } /* Keyword */ c-[l] { color: #657b83 } /* Literal */ c-[m] { color: #657b83 } /* Literal.Number */ c-[n] { color: #268bd2 } /* Name */ c-[o] { color: #657b83 } /* Operator */ c-[p] { color: #657b83 } /* Punctuation */ c-[s] { color: #6c71c4 } /* Literal.String */ c-[t] { color: #6c71c4 } /* Literal.String.Single */ c-[u] { color: #6c71c4 } /* Literal.String.Double */ c-[ch] { color: #2aa198 } /* Comment.Hashbang */ c-[cp] { color: #2aa198 } /* Comment.Preproc */ c-[cpf] { color: #2aa198 } /* Comment.PreprocFile */ c-[c1] { color: #2aa198 } /* Comment.Single */ c-[cs] { color: #2aa198 } /* Comment.Special */ c-[kc] { color: #d33682 } /* Keyword.Constant */ c-[kn] { color: #d33682 } /* Keyword.Namespace */ c-[kp] { color: #d33682 } /* Keyword.Pseudo */ c-[kr] { color: #d33682 } /* Keyword.Reserved */ c-[ld] { color: #657b83 } /* Literal.Date */ c-[nc] { color: #268bd2 } /* Name.Class */ c-[no] { color: #268bd2 } /* Name.Constant */ c-[nd] { color: #268bd2 } /* Name.Decorator */ c-[ni] { color: #268bd2 } /* Name.Entity */ c-[ne] { color: #268bd2 } /* Name.Exception */ c-[nf] { color: #268bd2 } /* Name.Function */ c-[nl] { color: #268bd2 } /* Name.Label */ c-[nn] { color: #268bd2 } /* Name.Namespace */ c-[py] { color: #268bd2 } /* Name.Property */ c-[ow] { color: #657b83 } /* Operator.Word */ c-[mb] { color: #657b83 } /* Literal.Number.Bin */ c-[mf] { color: #657b83 } /* Literal.Number.Float */ c-[mh] { color: #657b83 } /* Literal.Number.Hex */ c-[mi] { color: #657b83 } /* Literal.Number.Integer */ c-[mo] { color: #657b83 } /* Literal.Number.Oct */ c-[sa] { color: #6c71c4 } /* Literal.String.Affix */ c-[sb] { color: #6c71c4 } /* Literal.String.Backtick */ c-[sc] { color: #6c71c4 } /* Literal.String.Char */ c-[dl] { color: #6c71c4 } /* Literal.String.Delimiter */ c-[sd] { color: #6c71c4 } /* Literal.String.Doc */ c-[se] { color: #6c71c4 } /* Literal.String.Escape */ c-[sh] { color: #6c71c4 } /* Literal.String.Heredoc */ c-[si] { color: #6c71c4 } /* Literal.String.Interpol */ c-[sx] { color: #6c71c4 } /* Literal.String.Other */ c-[sr] { color: #6c71c4 } /* Literal.String.Regex */ c-[ss] { color: #6c71c4 } /* Literal.String.Symbol */ c-[fm] { color: #268bd2 } /* Name.Function.Magic */ c-[vc] { color: #cb4b16 } /* Name.Variable.Class */ c-[vg] { color: #cb4b16 } /* Name.Variable.Global */ c-[vi] { color: #cb4b16 } /* Name.Variable.Instance */ c-[vm] { color: #cb4b16 } /* Name.Variable.Magic */ c-[il] { color: #657b83 } /* Literal.Number.Integer.Long */ } </style> <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-CR" rel="stylesheet"> <link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css"> <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 Display Module Level 3</h1> <p id="w3c-state"><a href="https://www.w3.org/standards/types/#CR">W3C Candidate Recommendation Snapshot</a>, <time class="dt-updated" datetime="2023-11-22">22 November 2023</time></p> <details open> <summary>More details about this document</summary> <div data-fill-with="spec-metadata"> <dl> <dt>This version: <dd><a class="u-url" href="https://www.w3.org/TR/2023/CR-css-display-3-20231122/">https://www.w3.org/TR/2023/CR-css-display-3-20231122/</a> <dt>Latest published version: <dd><a href="https://www.w3.org/TR/css-display-3/">https://www.w3.org/TR/css-display-3/</a> <dt>Editor's Draft: <dd><a href="https://drafts.csswg.org/css-display/">https://drafts.csswg.org/css-display/</a> <dt>Previous Versions: <dd><a href="https://www.w3.org/TR/2021/CRD-css-display-3-20210903/" rel="prev">https://www.w3.org/TR/2021/CRD-css-display-3-20210903/</a> <dd><a href="https://www.w3.org/TR/2020/CRD-css-display-3-20201218/" rel="prev">https://www.w3.org/TR/2020/CRD-css-display-3-20201218/</a> <dd><a href="https://www.w3.org/TR/2020/CR-css-display-3-20200519/" rel="prev">https://www.w3.org/TR/2020/CR-css-display-3-20200519/</a> <dd><a href="https://www.w3.org/TR/2019/CR-css-display-3-20190711/" rel="prev">https://www.w3.org/TR/2019/CR-css-display-3-20190711/</a> <dd><a href="https://www.w3.org/TR/2018/CR-css-display-3-20180828/" rel="prev">https://www.w3.org/TR/2018/CR-css-display-3-20180828/</a> <dd><a href="https://www.w3.org/TR/2018/WD-css-display-3-20180809/" rel="prev">https://www.w3.org/TR/2018/WD-css-display-3-20180809/</a> <dd><a href="https://www.w3.org/TR/2018/WD-css-display-3-20180420/" rel="prev">https://www.w3.org/TR/2018/WD-css-display-3-20180420/</a> <dd><a href="https://www.w3.org/TR/2017/WD-css-display-3-20170720/" rel="prev">https://www.w3.org/TR/2017/WD-css-display-3-20170720/</a> <dd><a href="https://www.w3.org/TR/2017/WD-css-display-3-20170126/" rel="prev">https://www.w3.org/TR/2017/WD-css-display-3-20170126/</a> <dd><a href="https://www.w3.org/TR/2015/WD-css-display-3-20151015/" rel="prev">https://www.w3.org/TR/2015/WD-css-display-3-20151015/</a> <dd><a href="https://www.w3.org/TR/2015/WD-css-display-3-20150721/" rel="prev">https://www.w3.org/TR/2015/WD-css-display-3-20150721/</a> <dd><a href="https://www.w3.org/TR/2014/WD-css-display-3-20140911/" rel="prev">https://www.w3.org/TR/2014/WD-css-display-3-20140911/</a> <dt>History: <dd><a class="u-url" href="https://www.w3.org/standards/history/css-display-3/">https://www.w3.org/standards/history/css-display-3/</a> <dt>Implementation Report: <dd><a href="https://wpt.fyi/results/css/css-display?label=master&label=experimental&aligned">https://wpt.fyi/results/css/css-display?label=master&label=experimental&aligned</a> <dt>Feedback: <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-display-3">CSSWG Issues Repository</a> <dt class="editor">Editors: <dd class="editor p-author h-card vcard" data-editor-id="42199"><a class="p-name fn u-url url" href="http://xanthir.com/contact/">Tab Atkins Jr.</a> (<span class="p-org org">Google</span>) <dd class="editor p-author h-card vcard" data-editor-id="35400"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Apple</span>) <dt>Suggest an Edit for this Spec: <dd><a href="https://github.com/w3c/csswg-drafts/blob/main/css-display-3/Overview.bs">GitHub Editor</a> <dt>Test Suite: <dd class="wpt-overview"><a href="https://wpt.fyi/results/css/css-flexbox/">https://wpt.fyi/results/css/css-flexbox/</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> © 2023 <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 describes how the CSS formatting box tree is generated from the document element tree and defines the <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display">display</a> property that controls it.</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><em>This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="https://www.w3.org/TR/">W3C technical reports index at https://www.w3.org/TR/.</a></em> </p> <p> This document was published by the <a href="https://www.w3.org/groups/wg/css">CSS Working Group</a> as a <strong>Candidate Recommendation Snapshot</strong> using the <a href="https://www.w3.org/policies/process/20231103/#recs-and-notes">Recommendation track</a>. Publication as a Candidate Recommendation does not imply endorsement by <abbr title="World Wide Web Consortium">W3C</abbr> and its Members. A Candidate Recommendation Snapshot has received <a href="https://www.w3.org/policies/process/20231103/#dfn-wide-review">wide review</a>, is intended to gather implementation experience, and has commitments from Working Group members to <a href="https://www.w3.org/policies/patent-policy/#sec-Requirements">royalty-free licensing</a> for implementations. This document is intended to become a W3C Recommendation; it will remain a Candidate Recommendation at least until <time class="status-deadline" datetime="2023-05-30">30 May 2023</time> to gather additional feedback. </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-display” in the title, like this: “[css-display] <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-display%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>This document was produced by a group operating under the <a href="https://www.w3.org/policies/patent-policy/20200915/">W3C Patent Policy</a>. W3C maintains a <a href="https://www.w3.org/groups/wg/css/ipr" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains <a href="https://www.w3.org/policies/patent-policy/20200915/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/policies/patent-policy/20200915/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p> <p></p> <p>A <a href="http://test.csswg.org/harness/results/css-display-3_dev/grouped/">preliminary implementation report</a> is available. Further tests will be added during the CR period.</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>Application of <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter" id="ref-for-selectordef-first-letter">::first-letter</a> in the presence of run-ins <li><a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display①">display: run-in</a> <li>All multi-keyword values of <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display②">display</a> </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="#placement"><span class="secno">1.1</span> <span class="content"> Module interactions</span></a> <li><a href="#values"><span class="secno">1.2</span> <span class="content"> Value Definitions</span></a> </ol> <li> <a href="#the-display-properties"><span class="secno">2</span> <span class="content"> Box Layout Modes: the <span class="property">display</span> property</span></a> <ol class="toc"> <li><a href="#outer-role"><span class="secno">2.1</span> <span class="content"> Outer Display Roles for Flow Layout: the <span class="css">block</span>, <span class="css">inline</span>, and <span class="css">run-in</span> keywords</span></a> <li><a href="#inner-model"><span class="secno">2.2</span> <span class="content"> Inner Display Layout Models: the <span class="css">flow</span>, <span class="css">flow-root</span>, <span class="css">table</span>, <span class="css">flex</span>, <span class="css">grid</span>, and <span class="css">ruby</span> keywords</span></a> <li><a href="#list-items"><span class="secno">2.3</span> <span class="content"> Generating Marker Boxes: the <span class="css">list-item</span> keyword</span></a> <li><a href="#layout-specific-display"><span class="secno">2.4</span> <span class="content"> Layout-Internal Display Types: the <span class="css">table-*</span> and <span class="css">ruby-*</span> keywords</span></a> <li><a href="#box-generation"><span class="secno">2.5</span> <span class="content"> Box Generation: the <span class="css">none</span> and <span class="css">contents</span> keywords</span></a> <li><a href="#legacy-display"><span class="secno">2.6</span> <span class="content"> Precomposed Inline-level Display Values</span></a> <li><a href="#transformations"><span class="secno">2.7</span> <span class="content"> Automatic Box Type Transformations</span></a> <li><a href="#root"><span class="secno">2.8</span> <span class="content"> The Root Element’s Principal Box</span></a> </ol> <li> <a href="#order-property"><span class="secno">3</span> <span class="content"> Display Order: the <span class="property">order</span> property</span></a> <ol class="toc"> <li><a href="#order-accessibility"><span class="secno">3.1</span> <span class="content"> Reordering and Accessibility</span></a> </ol> <li><a href="#visibility"><span class="secno">4</span> <span class="content"> Invisibility: the <span class="property">visibility</span> property</span></a> <li><a href="#run-in-layout"><span class="secno">5</span> <span class="content"> Run-In Layout</span></a> <li><a href="#glossary"><span class="secno"></span> <span class="content"> Appendix A: Glossary</span></a> <li> <a href="#unbox"><span class="secno"></span> <span class="content"> Appendix B: Effects of <span class="css">display: contents</span> on Unusual Elements</span></a> <ol class="toc"> <li><a href="#unbox-html"><span class="secno"></span> <span class="content">HTML Elements</span></a> <li><a href="#unbox-svg"><span class="secno"></span> <span class="content">SVG Elements</span></a> <li><a href="#unbox-mathml"><span class="secno"></span> <span class="content">MathML Elements</span></a> </ol> <li><a href="#box-guidelines"><span class="secno"></span> <span class="content"> Appendix C: Box Construction Guidelines for Spec Authors</span></a> <li><a href="#acknowledgments"><span class="secno"></span> <span class="content"> Acknowledgments</span></a> <li> <a href="#changes"><span class="secno"></span> <span class="content"> Changes</span></a> <ol class="toc"> <li><a href="#changes-2020"><span class="secno"></span> <span class="content"> Changes Since 2023 Candidate Recommendation Snapshot</span></a> <li><a href="#changes-2020①"><span class="secno"></span> <span class="content"> Changes Since 2020 Candidate Recommendation</span></a> <li><a href="#changes-2019"><span class="secno"></span> <span class="content"> Changes Since 2019 Candidate Recommendation</span></a> <li><a href="#changes-wd"><span class="secno"></span> <span class="content"> Changes Prior to Candidate Recommendation Status</span></a> </ol> <li> <a href="#priv"><span class="secno"></span> <span class="content"> Privacy Considerations</span></a> <ol class="toc"> <li><a href="#sec"><span class="secno"></span> <span class="content"> Security Considerations</span></a> <li><a href="#security-privacy-self-review"><span class="secno"></span> <span class="content"> Self-Review Questionnaire</span></a> </ol> <li> <a href="#w3c-conformance"><span class="secno"></span> <span class="content"> Conformance</span></a> <ol class="toc"> <li><a href="#w3c-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a> <li><a href="#w3c-conformance-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a> <li> <a href="#w3c-partial"><span class="secno"></span> <span class="content"> Partial implementations</span></a> <ol class="toc"> <li><a href="#w3c-conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a> </ol> <li><a href="#w3c-testing"><span class="secno"></span> <span class="content"> Non-experimental implementations</span></a> <li><a href="#w3c-cr-exit-criteria"><span class="secno"></span> <span class="content"> CR exit criteria</span></a> </ol> <li> <a href="#index"><span class="secno"></span> <span class="content">Index</span></a> <ol class="toc"> <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a> <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a> </ol> <li> <a href="#references"><span class="secno"></span> <span class="content">References</span></a> <ol class="toc"> <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a> <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a> </ol> <li><a href="#property-index"><span class="secno"></span> <span class="content">Property 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><em>This section is normative.</em> </p> <p>CSS takes a source document organized as a <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export data-lt="element tree" id="element-tree">tree<span id="css-element-tree"></span></dfn> of <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-lt="element" data-noexport id="elements">elements<span id="css-element"></span></dfn> (which can contain a mix of other <a data-link-type="dfn" href="#elements" id="ref-for-elements">elements</a> and <a data-link-type="dfn" href="#text-nodes" id="ref-for-text-nodes">text nodes</a>) and <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export data-lt="text node" id="text-nodes">text nodes<span id="css-text-node"></span></dfn> (which can contain text), and renders it onto a <a href="https://www.w3.org/TR/CSS2/intro.html#canvas">canvas</a> such as your screen, a piece of paper, or an audio stream. Although any such source document can be rendered with CSS, the most commonly used type is the DOM. <a data-link-type="biblio" href="#biblio-dom" title="DOM Standard">[DOM]</a> (Some of these more complex tree types might have additional types of nodes, such as the comment nodes in the DOM. For the purposes of CSS, all of these additional types of nodes are ignored, as if they didn’t exist.)</p> <p>To do this, it generates an intermediary structure, the <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export id="box-tree">box tree<span id="css-box-tree"></span></dfn>, which represents the formatting structure of the rendered document. Each <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export id="box">box<span id="css-box"></span></dfn> in the <a data-link-type="dfn" href="#box-tree" id="ref-for-box-tree">box tree</a> represents its corresponding <a data-link-type="dfn" href="#elements" id="ref-for-elements①">element</a> (or <a data-link-type="dfn" href="https://www.w3.org/TR/selectors-4/#pseudo-element" id="ref-for-pseudo-element">pseudo-element</a>) in space and/or time on the canvas, while each <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export id="css-text-sequence">text sequence<span id="css-text-run"></span><span id="text-run"></span></dfn> in the <span id="ref-for-box-tree①">box tree</span> likewise represents the corresponding contents of its <a data-link-type="dfn" href="#text-nodes" id="ref-for-text-nodes①">text nodes</a>.</p> <p>To create the <a data-link-type="dfn" href="#box-tree" id="ref-for-box-tree②">box tree</a>, CSS first uses <a href="https://www.w3.org/TR/css-cascade/">cascading and inheritance</a>, to assign a <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#computed-value" id="ref-for-computed-value">computed value</a> for each CSS property to each <a data-link-type="dfn" href="#elements" id="ref-for-elements②">element</a> and <a data-link-type="dfn" href="#text-nodes" id="ref-for-text-nodes②">text node</a> in the source tree. (See <a data-link-type="biblio" href="#biblio-css-cascade-3" title="CSS Cascading and Inheritance Level 3">[CSS-CASCADE-3]</a>.)</p> <p>Then, for each <a data-link-type="dfn" href="#elements" id="ref-for-elements③">element</a>, CSS generates zero or more <a data-link-type="dfn" href="#box" id="ref-for-box">boxes</a> as specified by that element’s <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display③">display</a> property. Typically, an element generates a single <span id="ref-for-box①">box</span>, the <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box">principal box</a>, which represents itself and contains its contents in the <a data-link-type="dfn" href="#box-tree" id="ref-for-box-tree③">box tree</a>. However, some <span class="property" id="ref-for-propdef-display④">display</span> values (e.g. <span class="css" id="ref-for-propdef-display⑤">display: list-item</span>) generate more than one box (e.g. a <a href="https://www.w3.org/TR/CSS2/visuren.html#principal-box">principal block box</a> and a child <a href="https://www.w3.org/TR/CSS2/generate.html#lists">marker box</a>). And some values (such as <a class="css" data-link-type="maybe" href="#valdef-display-none" id="ref-for-valdef-display-none">none</a> or <a class="css" data-link-type="maybe" href="#valdef-display-contents" id="ref-for-valdef-display-contents">contents</a>) cause the <span id="ref-for-elements④">element</span> and/or its descendants to not generate any <span id="ref-for-box②">boxes</span> at all. <span id="ref-for-box③">Boxes</span> are often referred to by their <span class="property" id="ref-for-propdef-display⑥">display</span> type—e.g. a <span id="ref-for-box④">box</span> generated by an element with <span class="css" id="ref-for-propdef-display⑦">display: block</span> is called a “block box” or just a “block”.</p> <p>A <a data-link-type="dfn" href="#box" id="ref-for-box⑤">box</a> is assigned the same styles as its generating <a data-link-type="dfn" href="#elements" id="ref-for-elements⑤">element</a>, unless otherwise indicated. In general, <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#inherited-property" id="ref-for-inherited-property">inherited properties</a> are assigned to the <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box①">principal box</a>, and then inherit through the box tree to any other boxes generated by the same element. Non-inherited properties default to applying to the <span id="ref-for-principal-box②">principal box</span>, but when the element generates multiple boxes, are sometimes defined to apply to a different box: for example, the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/CSS21/box.html#propdef-border" id="ref-for-propdef-border">border</a> properties applied to a table element are applied to its <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-grid-box" id="ref-for-table-grid-box">table grid box</a>, not to its <span id="ref-for-principal-box③">principal</span> <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-wrapper-box" id="ref-for-table-wrapper-box">table wrapper box</a>. If the value computation process alters the styles of those boxes, and the element’s style is requested (such as through <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle" id="ref-for-dom-window-getcomputedstyle">getComputedStyle()</a></code>), the element reflects, for each property, the value from the box to which that property was applied.</p> <p>Similarly, each contiguous sequence of sibling <a data-link-type="dfn" href="#text-nodes" id="ref-for-text-nodes③">text nodes</a> generates a <a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence">text sequence</a> containing their text contents, which is assigned the same styles as the generating <span id="ref-for-text-nodes④">text nodes</span>. If the sequence contains no text, however, it does not generate a <span id="ref-for-css-text-sequence①">text sequence</span>.</p> <p>In constructing the box tree, boxes generated by an element are descendants of the principal box of any ancestor elements. In the general case, the direct <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export id="css-parent-box">parent box</dfn> of an element’s <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box④">principal box</a> is the <span id="ref-for-principal-box⑤">principal box</span> of its nearest ancestor element that generates a <a data-link-type="dfn" href="#box" id="ref-for-box⑥">box</a>; however, there are some exceptions, such as for <a class="css" data-link-type="maybe" href="#valdef-display-run-in" id="ref-for-valdef-display-run-in">run-in</a> boxes, display types (like tables) that generate multiple container boxes, and intervening <a data-link-type="dfn" href="#anonymous" id="ref-for-anonymous">anonymous boxes</a>.</p> <p>An <dfn class="dfn-paneled" data-dfn-for="CSS" data-dfn-type="dfn" data-export data-lt="anonymous|anonymous box" id="anonymous">anonymous box<span id="css-anonymous"></span></dfn> is a box that is not associated with any element. <a data-link-type="dfn" href="#anonymous" id="ref-for-anonymous①">Anonymous boxes</a> are generated in certain circumstances to fix up the <a data-link-type="dfn" href="#box-tree" id="ref-for-box-tree④">box tree</a> when it requires a particular nested structure that is not provided by the boxes generated from the <a data-link-type="dfn" href="#element-tree" id="ref-for-element-tree">element tree</a>. For example, a <a href="https://www.w3.org/TR/CSS2/tables.html#table-display">table cell box</a> requires a particular type of parent box (the <a href="https://www.w3.org/TR/CSS2/tables.html#table-display">table row box</a>), and will generate an <a data-link-type="dfn">anonymous</a> <a href="https://www.w3.org/TR/CSS2/tables.html#table-display">table row box</a> around itself if its parent is not a <a href="https://www.w3.org/TR/CSS2/tables.html#table-display">table row box</a>. (See <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> § <a href="https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes">17.2.1</a>.) Unlike element-generated boxes, whose styles inherit strictly through the element tree, anonymous boxes (which only exist in the <span id="ref-for-box-tree⑤">box tree</span>) <a href="https://www.w3.org/TR/css-cascade/#inheriting">inherit</a> through their <span id="ref-for-box-tree⑥">box tree</span> parentage.</p> <p>In the course of layout, <a data-link-type="dfn" href="#box" id="ref-for-box⑦">boxes</a> and <a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence②">text sequences</a> can be broken into multiple <a data-link-type="dfn" href="https://www.w3.org/TR/css-break-3/#fragment" id="ref-for-fragment">fragments</a>. This happens, for example, when an <a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box">inline box</a> and/or <span id="ref-for-css-text-sequence③">text sequence</span> is broken across lines, or when a <a data-link-type="dfn" href="#block-box" id="ref-for-block-box">block box</a> is broken across pages or columns, in a process called <a data-link-type="dfn" href="https://www.w3.org/TR/css-break-4/#fragmentation" id="ref-for-fragmentation">fragmentation</a>. It can also happen due to bidi reordering of text (see <a href="https://www.w3.org/TR/css-writing-modes-3/#bidi-algo">Applying the Bidirectional Reordering Algorithm</a> in <a href="https://www.w3.org/TR/css-writing-modes-3/#text-direction">CSS Writing Modes</a>) or higher-level <a data-link-type="dfn" href="#display-type" id="ref-for-display-type">display type</a> box splitting, e.g. <a href="https://www.w3.org/TR/CSS2/visuren.html#img-anon-block">block-in-inline splitting</a> (see <a href="https://www.w3.org/TR/CSS2/visuren.html#box-gen">CSS2§9.2</a>) or <a href="https://www.w3.org/TR/css-multicol-1/#spanning-columns">column-spanner-in-block</a> splitting (see <a href="https://www.w3.org/TR/css-multicol-1/#spanning-columns">CSS Multi-column Layout</a>). A <span id="ref-for-box⑧">box</span> therefore consists of one or more <a data-link-type="dfn" href="https://www.w3.org/TR/css-break-4/#box-fragment" id="ref-for-box-fragment">box fragments</a>, and a <span id="ref-for-css-text-sequence④">text sequence</span> consists of one or more <span id="ref-for-fragment①">text fragments</span>. See <a data-link-type="biblio" href="#biblio-css-break-3" title="CSS Fragmentation Module Level 3">[CSS-BREAK-3]</a> for more information on <span id="ref-for-fragmentation①">fragmentation</span>.</p> <p class="note" role="note"><span class="marker">Note:</span> Many of the CSS specs were written before this terminology was ironed out, or refer to things incorrectly, so view older specs with caution when they’re using these terms. It should be possible to infer from context which term they really mean. Please <a href="#sotd">report errors</a> in specs when you find them, so they can be corrected.</p> <p class="note" role="note"><span class="marker">Note:</span> Further information on the “aural” box tree and its interaction with the <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑧">display</a> property can be found in the <a href="https://www.w3.org/TR/css-speech-1/#aural-model">CSS Speech Module</a>. <a data-link-type="biblio" href="#biblio-css-speech-1" title="CSS Speech Module Level 1">[CSS-SPEECH-1]</a></p> <h3 class="heading settled" data-level="1.1" id="placement"><span class="secno">1.1. </span><span class="content"> Module interactions</span><a class="self-link" href="#placement"></a></h3> <p>This module replaces and extends the definition of the <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑨">display</a> property 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 9.2.4.</p> <p>None of the properties in this module apply to the <code>::first-line</code> or <code>::first-letter</code> pseudo-elements.</p> <h3 class="heading settled" data-level="1.2" id="values"><span class="secno">1.2. </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 & 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://www.w3.org/TR/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> <h2 class="heading settled" data-level="2" id="the-display-properties"><span class="secno">2. </span><span class="content"> Box Layout Modes: the <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①⓪">display</a> property</span><a class="self-link" href="#the-display-properties"></a></h2> <table class="def propdef" data-link-for-hint="display"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-display">display</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="#typedef-display-outside" id="ref-for-typedef-display-outside"><display-outside></a> <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-any" id="ref-for-comb-any">||</a> <a class="production css" data-link-type="type" href="#typedef-display-inside" id="ref-for-typedef-display-inside"><display-inside></a> ] <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one">|</a> <a class="production css" data-link-type="type" href="#typedef-display-listitem" id="ref-for-typedef-display-listitem"><display-listitem></a> <span id="ref-for-comb-one①">|</span> <a class="production css" data-link-type="type" href="#typedef-display-internal" id="ref-for-typedef-display-internal"><display-internal></a> <span id="ref-for-comb-one②">|</span> <a class="production css" data-link-type="type" href="#typedef-display-box" id="ref-for-typedef-display-box"><display-box></a> <span id="ref-for-comb-one③">|</span> <a class="production css" data-link-type="type" href="#typedef-display-legacy" id="ref-for-typedef-display-legacy"><display-legacy></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>inline <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td><a href="https://www.w3.org/TR/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</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>a pair of keywords representing the <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type">inner</a> and <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type">outer</a> display types plus optional <a class="css" data-link-type="maybe" href="#valdef-display-list-item" id="ref-for-valdef-display-list-item">list-item</a> flag, or a <a class="production css" data-link-type="type" href="#typedef-display-internal" id="ref-for-typedef-display-internal①"><display-internal></a> or <a class="production css" data-link-type="type" href="#typedef-display-box" id="ref-for-typedef-display-box①"><display-box></a> keyword; see prose in a variety of specs for computation rules <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 class="all-media">User agents are expected to support this property on all media, including non-visual ones. The <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①①">display</a> property defines an element’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="display-type">display type</dfn>, which consists of the two basic qualities of how an element generates boxes: </p> <ul> <li data-md> <p>the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="inner" id="inner-display-type">inner display type</dfn>, which defines (if it is a <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element">non-replaced element</a>) the kind of <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context">formatting context</a> it generates, dictating how its descendant boxes are laid out. (The inner display of a <span id="ref-for-replaced-element①">replaced element</span> is outside the scope of CSS.)</p> <li data-md> <p>the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="outer" id="outer-display-type">outer display type</dfn>, which dictates how the <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box⑥">principal box</a> itself participates in <a data-link-type="dfn" href="#flow-layout" id="ref-for-flow-layout">flow layout</a>.</p> </ul> <p><a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence⑤">Text sequences</a> have no <a data-link-type="dfn" href="#display-type" id="ref-for-display-type①">display type</a>.</p> <p>Some <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①②">display</a> values have additional side-effects: such as <a class="css" data-link-type="maybe" href="#valdef-display-list-item" id="ref-for-valdef-display-list-item①">list-item</a>, which also generates a <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-marker" id="ref-for-selectordef-marker">::marker</a> pseudo-element, and <a class="css" data-link-type="maybe" href="#valdef-display-none" id="ref-for-valdef-display-none①">none</a>, which causes the element’s entire subtree to be left out of the box tree.</p> <div class="advisement"> The <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①③">display</a> property has no effect on an element’s semantics: these are defined by the <a data-link-type="dfn" href="https://www.w3.org/TR/selectors-4/#document-language" id="ref-for-document-language">document language</a> and <em>are not affected by CSS</em>. Aside from the <a class="css" data-link-type="maybe" href="#valdef-display-none" id="ref-for-valdef-display-none②">none</a> value, which also affects the aural/speech output <a data-link-type="biblio" href="#biblio-css-speech-1" title="CSS Speech Module Level 1">[CSS-SPEECH-1]</a> and interactivity of an element and its descendants, the <span class="property" id="ref-for-propdef-display①④">display</span> property only affects visual layout: its purpose is to allow designers freedom to change the layout behavior of an element <em>without</em> affecting the underlying document semantics. </div> <p>Values are defined as follows:</p> <pre class="prod"><dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-display-outside"><display-outside></dfn> = block <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one④">|</a> inline <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑤">|</a> run-in <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-display-inside"><display-inside></dfn> = flow <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑥">|</a> flow-root <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑦">|</a> table <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑧">|</a> flex <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑨">|</a> grid <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⓪">|</a> ruby <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-display-listitem"><display-listitem></dfn> = <a class="production" data-link-type="type" href="#typedef-display-outside" id="ref-for-typedef-display-outside①"><display-outside></a><a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a> <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-all" id="ref-for-comb-all">&&</a> [ flow <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①①">|</a> flow-root ]<a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-opt" id="ref-for-mult-opt①">?</a> <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-all" id="ref-for-comb-all①">&&</a> list-item <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-display-internal"><display-internal></dfn> = table-row-group <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①②">|</a> table-header-group <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①③">|</a> table-footer-group <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①④">|</a> table-row <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⑤">|</a> table-cell <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⑥">|</a> table-column-group <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⑦">|</a> table-column <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⑧">|</a> table-caption <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⑨">|</a> ruby-base <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②⓪">|</a> ruby-text <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②①">|</a> ruby-base-container <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②②">|</a> ruby-text-container <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-display-box"><display-box></dfn> = contents <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②③">|</a> none <dfn class="dfn-paneled" data-dfn-type="type" data-export id="typedef-display-legacy"><display-legacy></dfn> = inline-block <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②④">|</a> inline-table <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②⑤">|</a> inline-flex <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②⑥">|</a> inline-grid </pre> <p>The following informative table summarizes the values of <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①⑤">display</a>:</p> <table class="data" id="display-value-summary"> <thead> <tr> <th>Short <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①⑥">display</a> <th>Full <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①⑦">display</a> <th>Generated box <tbody title="Box Suppression Display Types"> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-none" id="ref-for-valdef-display-none③">none</a> <td>— <td>subtree omitted from <a data-link-type="dfn" href="#box-tree" id="ref-for-box-tree⑦">box tree</a> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-contents" id="ref-for-valdef-display-contents①">contents</a> <td>— <td>element replaced by contents in <a data-link-type="dfn" href="#box-tree" id="ref-for-box-tree⑧">box tree</a> <tbody title="Flow Layout Display Types"> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block">block</a> <td><span class="css">block flow</span> <td><a data-link-type="dfn" href="#block-level" id="ref-for-block-level">block-level</a> <a data-link-type="dfn" href="#block-container" id="ref-for-block-container">block container</a> <abbr title="also known as">aka</abbr> <a data-link-type="dfn" href="#block-box" id="ref-for-block-box①">block box</a> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root">flow-root</a> <td><span class="css">block flow-root</span> <td><a data-link-type="dfn" href="#block-level" id="ref-for-block-level①">block-level</a> <a data-link-type="dfn" href="#block-container" id="ref-for-block-container①">block container</a> that establishes a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context">block formatting context</a> (<a data-link-type="dfn" href="#bfc" id="ref-for-bfc">BFC</a>) <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline">inline</a> <td><span class="css">inline flow</span> <td><a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box①">inline box</a> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-inline-block" id="ref-for-valdef-display-inline-block">inline-block</a> <td><span class="css">inline flow-root</span> <td><a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level">inline-level</a> <a data-link-type="dfn" href="#block-container" id="ref-for-block-container②">block container</a> <abbr title="also known as">aka</abbr> <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="inline block | inline block box" id="inline-block">inline block</dfn> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-run-in" id="ref-for-valdef-display-run-in①">run-in</a> <td><span class="css">run-in flow</span> <td><a data-link-type="dfn" href="#run-in" id="ref-for-run-in">run-in box</a> (<a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box②">inline box</a> with special box-tree-munging rules) <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-list-item" id="ref-for-valdef-display-list-item②">list-item</a> <td><span class="css">block flow list-item</span> <td><a data-link-type="dfn" href="#block-box" id="ref-for-block-box②">block box</a> with additional <a href="https://www.w3.org/TR/CSS2/generate.html#lists">marker box</a> <tr> <td><span class="css">inline list-item</span> <td><span class="css">inline flow list-item</span> <td><a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box③">inline box</a> with additional <a href="https://www.w3.org/TR/CSS2/generate.html#lists">marker box</a> <tbody title="Formatting Context Root Display Types"> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-flex" id="ref-for-valdef-display-flex">flex</a> <td><span class="css">block flex</span> <td><a data-link-type="dfn" href="#block-level" id="ref-for-block-level②">block-level</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-container" id="ref-for-flex-container">flex container</a> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-inline-flex" id="ref-for-valdef-display-inline-flex">inline-flex</a> <td><span class="css">inline flex</span> <td><a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level①">inline-level</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-container" id="ref-for-flex-container①">flex container</a> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-grid" id="ref-for-valdef-display-grid">grid</a> <td><span class="css">block grid</span> <td><a data-link-type="dfn" href="#block-level" id="ref-for-block-level③">block-level</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-container" id="ref-for-grid-container">grid container</a> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-inline-grid" id="ref-for-valdef-display-inline-grid">inline-grid</a> <td><span class="css">inline grid</span> <td><a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level②">inline-level</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-container" id="ref-for-grid-container①">grid container</a> <tr> <td><a class="css" data-link-type="maybe" href="#valdef-display-ruby" id="ref-for-valdef-display-ruby">ruby</a> <td><span class="css">inline ruby</span> <td><a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level③">inline-level</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-container" id="ref-for-ruby-container">ruby container</a> <tr> <td><span class="css">block ruby</span> <td><span class="css">block ruby</span> <td><a data-link-type="dfn" href="#block-box" id="ref-for-block-box③">block box</a> containing <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-container" id="ref-for-ruby-container①">ruby container</a> <tr> <td><span class="css">table</span> <td><span class="css">block table</span> <td><a data-link-type="dfn" href="#block-level" id="ref-for-block-level④">block-level</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-wrapper-box" id="ref-for-table-wrapper-box①">table wrapper box</a> containing <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-grid-box" id="ref-for-table-grid-box①">table grid box</a> <tr> <td><span class="css">inline-table</span> <td><span class="css">inline table</span> <td><a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level④">inline-level</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-wrapper-box" id="ref-for-table-wrapper-box②">table wrapper box</a> containing <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-grid-box" id="ref-for-table-grid-box②">table grid box</a> <tbody title="Layout-internal display types"> <tr> <td><a class="production css" data-link-type="type" href="#typedef-display-internal" id="ref-for-typedef-display-internal②"><display-internal></a> types <td>— <td><a href="#layout-specific-display">layout-specific internal box</a> </table> <p class="note" role="note"><span class="marker">Note:</span> Following the precedence rules of “most backwards-compatible, then shortest”, serialization of equivalent <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display①⑧">display</a> values uses the “Short <span class="property" id="ref-for-propdef-display①⑨">display</span>” column. <a data-link-type="biblio" href="#biblio-cssom" title="CSS Object Model (CSSOM)">[CSSOM]</a></p> <h3 class="heading settled" data-level="2.1" id="outer-role"><span class="secno">2.1. </span><span class="content"> Outer Display Roles for Flow Layout: the <a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block①">block</a>, <a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline①">inline</a>, and <a class="css" data-link-type="maybe" href="#valdef-display-run-in" id="ref-for-valdef-display-run-in②">run-in</a> keywords</span><a class="self-link" href="#outer-role"></a></h3> <p>The <a class="production css" data-link-type="type" href="#typedef-display-outside" id="ref-for-typedef-display-outside②"><display-outside></a> keywords specify the element’s <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type①">outer display type</a>, which is essentially its <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box⑦">principal box’s</a> role in <a data-link-type="dfn" href="#flow-layout" id="ref-for-flow-layout①">flow layout</a>. They are defined as follows:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-outside>" data-dfn-type="value" data-export id="valdef-display-block">block</dfn> <dd> The element generates a box that is <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export data-lt="block-level box" id="block-level-box">block-level</dfn> when placed in <a data-link-type="dfn" href="#flow-layout" id="ref-for-flow-layout②">flow layout</a>. <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-outside>" data-dfn-type="value" data-export id="valdef-display-inline">inline</dfn> <dd> The element generates a box that is <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export data-lt="inline-level box" id="inline-level-box">inline-level</dfn> when placed in <a data-link-type="dfn" href="#flow-layout" id="ref-for-flow-layout③">flow layout</a>. <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-outside>" data-dfn-type="value" data-export id="valdef-display-run-in">run-in</dfn> <dd> The element generates an <a data-link-type="dfn" href="#run-in" id="ref-for-run-in①">run-in box</a>, which is a type of <a data-link-type="dfn" href="#inline-level-box" id="ref-for-inline-level-box">inline-level box</a> with special behavior that attempts to merge it into a subsequent block container. See <a href="#run-in-layout">§ 5 Run-In Layout</a> for details. </dl> <p class="note" role="note"><span class="marker">Note:</span> <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type②">Outer display types</a> do affect <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element②">replaced elements</a>.</p> <p>If a <a class="production css" data-link-type="type" href="#typedef-display-outside" id="ref-for-typedef-display-outside③"><display-outside></a> value is specified but <a class="production css" data-link-type="type" href="#typedef-display-inside" id="ref-for-typedef-display-inside①"><display-inside></a> is omitted, the element’s <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①">inner display type</a> defaults to <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow">flow</a>.</p> <h3 class="heading settled" data-level="2.2" id="inner-model"><span class="secno">2.2. </span><span class="content"> Inner Display Layout Models: the <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow①">flow</a>, <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root①">flow-root</a>, <span class="css">table</span>, <a class="css" data-link-type="maybe" href="#valdef-display-flex" id="ref-for-valdef-display-flex①">flex</a>, <a class="css" data-link-type="maybe" href="#valdef-display-grid" id="ref-for-valdef-display-grid①">grid</a>, and <a class="css" data-link-type="maybe" href="#valdef-display-ruby" id="ref-for-valdef-display-ruby①">ruby</a> keywords</span><a class="self-link" href="#inner-model"></a></h3> <p>The <a class="production css" data-link-type="type" href="#typedef-display-inside" id="ref-for-typedef-display-inside②"><display-inside></a> keywords specify the element’s <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type②">inner display type</a>, which defines the type of formatting context that lays out its contents (assuming it is a <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element③">non-replaced element</a>). They are defined as follows:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-inside>" data-dfn-type="value" data-export id="valdef-display-flow">flow</dfn> <dd> The element lays out its contents using <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export id="flow-layout">flow layout</dfn> (<a href="https://www.w3.org/TR/CSS2/visuren.html">block-and-inline layout</a>). <p>If its <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type③">outer display type</a> is <a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline②">inline</a> or <a class="css" data-link-type="maybe" href="#valdef-display-run-in" id="ref-for-valdef-display-run-in③">run-in</a>, and it is participating in a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context①">block</a> or <a data-link-type="dfn" href="#inline-formatting-context" id="ref-for-inline-formatting-context">inline</a> formatting context, then it generates an <a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box④">inline box</a>.</p> <p>Otherwise it generates a <a data-link-type="dfn" href="#block-container" id="ref-for-block-container③">block container</a> box.</p> <p>Depending on the value of other properties (such as <a class="property css" data-link-type="property" href="https://www.w3.org/TR/CSS21/visuren.html#propdef-position" id="ref-for-propdef-position">position</a>, <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-float" id="ref-for-propdef-float">float</a>, or <a class="property css" data-link-type="property">overflow</a>) and whether it is itself participating in a block or inline <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context①">formatting context</a>, it either establishes a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context②">block formatting context</a> for its contents or integrates its contents into its parent <span id="ref-for-formatting-context②">formatting context</span>. See <a href="https://www.w3.org/TR/CSS2/visuren.html">CSS2.1 Chapter 9</a>. <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> A <a data-link-type="dfn" href="#block-container" id="ref-for-block-container④">block container</a> that establishes a new <span id="ref-for-block-formatting-context③">block formatting context</span> is considered to have a used <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type③">inner display type</a> of <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root②">flow-root</a>.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-inside>" data-dfn-type="value" data-export id="valdef-display-flow-root">flow-root</dfn> <dd> The element generates a <a data-link-type="dfn" href="#block-container" id="ref-for-block-container⑤">block container</a> box, and lays out its contents using <a data-link-type="dfn" href="#flow-layout" id="ref-for-flow-layout④">flow layout</a>. It always establishes a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context④">block formatting context</a> for its contents. <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-inside>" data-dfn-type="value" data-export id="valdef-display-table">table</dfn> <dd> The element generates a principal <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-wrapper-box" id="ref-for-table-wrapper-box③">table wrapper box</a> that establishes a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context⑤">block formatting context</a>, and which contains an additionally-generated <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-grid-box" id="ref-for-table-grid-box③">table grid box</a> that establishes a <a data-link-type="dfn">table formatting context</a>. <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-inside>" data-dfn-type="value" data-export id="valdef-display-flex">flex</dfn> <dd> The element generates a principal <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-container" id="ref-for-flex-container②">flex container</a> box and establishes a <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-formatting-context" id="ref-for-flex-formatting-context">flex formatting context</a>. <a data-link-type="biblio" href="#biblio-css-flexbox-1" title="CSS Flexible Box Layout Module Level 1">[CSS-FLEXBOX-1]</a> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-inside>" data-dfn-type="value" data-export id="valdef-display-grid">grid</dfn> <dd> The element generates a principal <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-container" id="ref-for-grid-container②">grid container</a> box, and establishes a <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-formatting-context" id="ref-for-grid-formatting-context">grid formatting context</a>. <a data-link-type="biblio" href="#biblio-css-grid-1" title="CSS Grid Layout Module Level 1">[CSS-GRID-1]</a> <p>(Grids using <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-grid-2/#valdef-grid-template-rows-subgrid" id="ref-for-valdef-grid-template-rows-subgrid">subgrid</a> might not generate a new <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-formatting-context" id="ref-for-grid-formatting-context①">grid formatting context</a>; see <a data-link-type="biblio" href="#biblio-css-grid-2" title="CSS Grid Layout Module Level 2">[CSS-GRID-2]</a> for details.)</p> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-inside>" data-dfn-type="value" data-export id="valdef-display-ruby">ruby</dfn> <dd> The element generates a <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-container" id="ref-for-ruby-container②">ruby container</a> box and establishes a <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-formatting-context" id="ref-for-ruby-formatting-context">ruby formatting context</a> in addition to integrating its base-level contents into its parent <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context③">formatting context</a> (if it is inline) or generating a wrapper box of the appropriate <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type④">outer display type</a> (if it is not). <a data-link-type="biblio" href="#biblio-css-ruby-1" title="CSS Ruby Annotation Layout Module Level 1">[CSS-RUBY-1]</a> </dl> <p>If a <a class="production css" data-link-type="type" href="#typedef-display-inside" id="ref-for-typedef-display-inside③"><display-inside></a> value is specified but <a class="production css" data-link-type="type" href="#typedef-display-outside" id="ref-for-typedef-display-outside④"><display-outside></a> is omitted, the element’s <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type⑤">outer display type</a> defaults to <a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block②">block</a>—except for <a class="css" data-link-type="maybe" href="#valdef-display-ruby" id="ref-for-valdef-display-ruby②">ruby</a>, which defaults to <a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline③">inline</a>.</p> <h3 class="heading settled" data-level="2.3" id="list-items"><span class="secno">2.3. </span><span class="content"> Generating Marker Boxes: the <a class="css" data-link-type="maybe" href="#valdef-display-list-item" id="ref-for-valdef-display-list-item③">list-item</a> keyword</span><a class="self-link" href="#list-items"></a></h3> <p>The <dfn class="dfn-paneled css" data-dfn-for="display, <display-listitem>" data-dfn-type="value" data-export id="valdef-display-list-item">list-item</dfn> keyword causes the element to generate a <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-marker" id="ref-for-selectordef-marker①">::marker</a> pseudo-element <a data-link-type="biblio" href="#biblio-css-pseudo-4" title="CSS Pseudo-Elements Module Level 4">[CSS-PSEUDO-4]</a> with the content specified by its <a class="property css" data-link-type="property">list-style</a> properties (<a href="https://www.w3.org/TR/CSS2/generate.html#lists">CSS 2.1§12.5 Lists</a>) <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> together with a principal box of the specified type for its own contents.</p> <p>If no <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type④">inner display type</a> value is specified, the principal box’s <span id="ref-for-inner-display-type⑤">inner display type</span> defaults to <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow②">flow</a>. If no <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type⑥">outer display type</a> value is specified, the principal box’s <span id="ref-for-outer-display-type⑦">outer display type</span> defaults to <a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block③">block</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> In this level, as restricted in the grammar, list-items are limited to the <a data-link-type="dfn" href="#flow-layout" id="ref-for-flow-layout⑤">Flow Layout</a> display types (<a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block④">block</a>/<a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline④">inline</a>/<a class="css" data-link-type="maybe" href="#valdef-display-run-in" id="ref-for-valdef-display-run-in④">run-in</a> with <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow③">flow</a>/<a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root③">flow-root</a> inner types). This restriction may be relaxed in a future level of this module.</p> <h3 class="heading settled" data-level="2.4" id="layout-specific-display"><span class="secno">2.4. </span><span class="content"> Layout-Internal Display Types: the <span class="css">table-*</span> and <span class="css">ruby-*</span> keywords</span><a class="self-link" href="#layout-specific-display"></a></h3> <p>Some layout models, such as <span class="css">table</span> and <a class="css" data-link-type="maybe" href="#valdef-display-ruby" id="ref-for-valdef-display-ruby③">ruby</a>, have a complex internal structure, with several different roles that their children and descendants can fill. This section defines those “<dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="layout-internal">layout-internal</dfn>” <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display②⓪">display</a> values, which only have meaning within that particular layout mode.</p> <p>Unless otherwise specified, both the <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type⑥">inner display type</a> and the <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type⑧">outer display type</a> of elements using these <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display②①">display</a> values are set to the given keyword.</p> <p>When the <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display②②">display</a> property of a <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element④">replaced element</a> computes to one of the <a data-link-type="dfn" href="#layout-internal" id="ref-for-layout-internal">layout-internal</a> values, it is handled as having a used value of <a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline⑤">inline</a>. White space collapsing and anonymous box generation must happen around those replaced elements based on that <span class="css" id="ref-for-valdef-display-inline⑥">inline</span> value, as if they never had a <span id="ref-for-layout-internal①">layout-internal</span> display value applied to them.</p> <p><strong class="advisement"> Authors should not assign a <a data-link-type="dfn" href="#layout-internal" id="ref-for-layout-internal②">layout-internal</a> display value to <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element⑤">replaced elements</a>.</strong></p> <p>The <a class="production css" data-link-type="type" href="#typedef-display-internal" id="ref-for-typedef-display-internal③"><display-internal></a> keywords are defined as follows:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-row-group">table-row-group</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-header-group">table-header-group</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-footer-group">table-footer-group</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-row">table-row</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-cell">table-cell</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-column-group">table-column-group</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-column">table-column</dfn> <dd> The element is an <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export id="internal-table-element">internal table element</dfn>. It generates the appropriate <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export id="internal-table-box">internal table box</dfn> which participates in a <a data-link-type="dfn">table formatting context</a>. See <a href="https://www.w3.org/TR/CSS2/tables.html#table-display">CSS2§17.2</a> <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>. <p><span class="css">table-cell</span> boxes have a <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root④">flow-root</a> <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type⑦">inner display type</a>.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-table-caption">table-caption</dfn> <dd> The element generates a <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export id="table-caption-box">table caption box</dfn>, which is a <a data-link-type="dfn" href="#block-box" id="ref-for-block-box④">block box</a> with special behavior with respect to table and table wrapper boxes. See <a href="https://www.w3.org/TR/CSS2/tables.html#table-display">CSS2§17.2</a> <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>. <p><span class="css">table-caption</span> boxes have a <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root⑤">flow-root</a> <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type⑧">inner display type</a>.</p> <dt> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-ruby-base">ruby-base</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-ruby-text">ruby-text</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-ruby-base-container">ruby-base-container</dfn>, <dfn class="dfn-paneled css" data-dfn-for="display, <display-internal>" data-dfn-type="value" data-export id="valdef-display-ruby-text-container">ruby-text-container</dfn> <dd> The element is an <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export id="internal-ruby-element">internal ruby element</dfn>. It generates the appropriate <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-export id="internal-ruby-box">internal ruby box</dfn> which participates in a <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-formatting-context" id="ref-for-ruby-formatting-context①">ruby formatting context</a>. <a data-link-type="biblio" href="#biblio-css-ruby-1" title="CSS Ruby Annotation Layout Module Level 1">[CSS-RUBY-1]</a> <p><a class="css" data-link-type="maybe" href="#valdef-display-ruby-base" id="ref-for-valdef-display-ruby-base">ruby-base</a> and <a class="css" data-link-type="maybe" href="#valdef-display-ruby-text" id="ref-for-valdef-display-ruby-text">ruby-text</a> have a <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow④">flow</a> <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type⑨">inner display type</a>.</p> </dl> <p>Boxes with layout-specific display types generate anonymous wrapper boxes around themselves when placed in an incompatible parent, as defined by their respective specifications.</p> <div class="example" id="example-d11b97c3"> <a class="self-link" href="#example-d11b97c3"></a> For example, Table Layout requires that a <span class="css">table-cell</span> box must have a <span class="css">table-row</span> parent box. <p>If it is misparented, like so:</p> <pre class="lang-markup highlight"><c- p><</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"display:block;"</c-><c- p>></c-> <c- p><</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"display:table-cell"</c-><c- p>></c->...<c- p></</c-><c- f>div</c-><c- p>></c-> <c- p></</c-><c- f>div</c-><c- p>></c-> </pre> <p>It will generate wrapper boxes around itself, producing a structure like:</p> <pre>block box └anonymous table box └anonymous table-row-group box └anonymous table-row box └table-cell box </pre> <p>Even if the parent is another <a data-link-type="dfn" href="#internal-table-element" id="ref-for-internal-table-element">internal table element</a>, if it’s not the <em>correct</em> one, wrapper boxes will be generated. For example, in the following markup:</p> <pre class="lang-markup highlight"><c- p><</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"display:table;"</c-><c- p>></c-> <c- p><</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"display:table-row"</c-><c- p>></c-> <c- p><</c-><c- f>div</c-> <c- e>style</c-><c- o>=</c-><c- s>"display:table-cell"</c-><c- p>></c->...<c- p></</c-><c- f>div</c-><c- p>></c-> <c- p></</c-><c- f>div</c-><c- p>></c-> <c- p></</c-><c- f>div</c-><c- p>></c-> </pre> <p>Anonymous wrapper box generation will produce:</p> <pre>table box └anonymous table-row-group box └table-row box └table-cell box </pre> <p>This "fix-up" ensures that table layout has a predictable structure to operate on.</p> </div> <h3 class="heading settled" data-level="2.5" id="box-generation"><span class="secno">2.5. </span><span class="content"> Box Generation: the <a class="css" data-link-type="maybe" href="#valdef-display-none" id="ref-for-valdef-display-none④">none</a> and <a class="css" data-link-type="maybe" href="#valdef-display-contents" id="ref-for-valdef-display-contents②">contents</a> keywords</span><a class="self-link" href="#box-generation"></a></h3> <p>While <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display②③">display</a> can control the <em>types</em> of boxes an element will generate, it can also control whether an element will generate any boxes at all.</p> <p>The <a class="production css" data-link-type="type" href="#typedef-display-box" id="ref-for-typedef-display-box②"><display-box></a> keywords are defined as follows:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-box>" data-dfn-type="value" data-export id="valdef-display-contents">contents</dfn> <dd> The element itself does not generate any boxes, but its children and pseudo-elements still generate <a data-link-type="dfn" href="#box" id="ref-for-box⑨">boxes</a> and <a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence⑥">text sequences</a> as normal. For the purposes of box generation and layout, the element must be treated as if it had been replaced in the <a data-link-type="dfn" href="#element-tree" id="ref-for-element-tree①">element tree</a> by its contents (including both its source-document children and its pseudo-elements, such as <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-before" id="ref-for-selectordef-before">::before</a> and <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-after" id="ref-for-selectordef-after">::after</a> pseudo-elements, which are generated before/after the element’s children as normal). <p class="note" role="note"><span class="marker">Note:</span> As only the box tree is affected, any semantics based on the document tree, such as selector-matching, event handling, and property <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#inheritance" id="ref-for-inheritance">inheritance</a>, are not affected. <strong>As of writing, however, <a href="https://github.com/w3c/csswg-drafts/issues/3040">this is not implemented correctly in major browsers</a>, so using this feature on the Web must be done with care as it can prevent accessibility tools from accessing the element’s semantics.</strong></p> <p>This value computes to <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display②④">display: none</a> on replaced elements and other elements whose rendering is not entirely controlled by CSS; see <a href="#unbox">Appendix B: Effects of display: contents on Unusual Elements</a> for details.</p> <p class="note" role="note"><span class="marker">Note:</span> Replaced elements and form controls are treated specially because removing only the element’s own generating box is a more-or-less undefined operation. As this behavior may be refined if use cases (and more precise rendering models) develop, authors should use <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display②⑤">display: none</a> rather than <span class="css" id="ref-for-propdef-display②⑥">display: contents</span> on such elements for forward-compatibility.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-box>" data-dfn-type="value" data-export id="valdef-display-none">none</dfn> <dd> The <a data-link-type="dfn" href="#elements" id="ref-for-elements⑥">element</a> and its descendants generate no <a data-link-type="dfn" href="#box" id="ref-for-box①⓪">boxes</a> or <a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence⑦">text sequences</a>. <p>Similarly, if a <a data-link-type="dfn" href="#text-nodes" id="ref-for-text-nodes⑤">text node</a> is defined to behave as <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display②⑦">display: none</a>, it generates no <a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence⑧">text sequences</a>.</p> </dl> <p>Elements with either of these values do not have <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①⓪">inner</a> or <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type⑨">outer display types</a>, because they don’t generate any boxes at all.</p> <p class="note" role="note"><span class="marker">Note:</span> As these values cause affected elements to not generate a box, anonymous box generation rules will ignore the elided elements entirely, as if they did not exist in the box tree.</p> <p>Markup-based relationships, however, are not affected by these values, as they are solely rendering-time effects. <span class="non-normative"> For example, although they may affect which table cell <em>appears</em> in a column, they do not affect which table cell is associated with a particular column <em>element</em>. Similarly, they cannot affect which HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element" id="ref-for-the-summary-element">summary</a></code> element is associated with a particular table or whether a <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element" id="ref-for-the-legend-element">legend</a></code> is considered to be labelling the contents of a particular <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element" id="ref-for-the-fieldset-element">fieldset</a></code>. </span></p> <h3 class="heading settled" data-level="2.6" id="legacy-display"><span class="secno">2.6. </span><span class="content"> Precomposed Inline-level Display Values</span><a class="self-link" href="#legacy-display"></a></h3> <p>CSS level 2 used a single-keyword syntax for <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display②⑧">display</a>, requiring separate keywords for block-level and inline-level variants of the same layout mode. These <a class="production css" data-link-type="type" href="#typedef-display-legacy" id="ref-for-typedef-display-legacy①"><display-legacy></a> keywords map as follows:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-legacy>" data-dfn-type="value" data-export id="valdef-display-inline-block">inline-block</dfn> <dd> Computes to <span class="css">inline flow-root</span>. <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-legacy>" data-dfn-type="value" data-export id="valdef-display-inline-table">inline-table</dfn> <dd> Computes to <span class="css">inline table</span>. <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-legacy>" data-dfn-type="value" data-export id="valdef-display-inline-flex">inline-flex</dfn> <dd> Computes to <span class="css">inline flex</span>. <dt><dfn class="dfn-paneled css" data-dfn-for="display, <display-legacy>" data-dfn-type="value" data-export id="valdef-display-inline-grid">inline-grid</dfn> <dd> Computes to <span class="css">inline grid</span>. </dl> <p class="note" role="note"><span class="marker">Note:</span> Although these keywords and their equivalents compute to the same value, their <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#specified-value" id="ref-for-specified-value">specified values</a> remain distinct.</p> <p class="note" role="note"><span class="marker">Note:</span> The <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle" id="ref-for-dom-window-getcomputedstyle①">getComputedStyle()</a></code> serialization rules will always output these precomposed keywords rather than the equivalent two-keyword pairs due to the <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">shortest, most backwards-compatible serialization principle</a>.</p> <h3 class="heading settled" data-level="2.7" id="transformations"><span class="secno">2.7. </span><span class="content"> Automatic Box Type Transformations</span><a class="self-link" href="#transformations"></a></h3> <p>Some layout effects require <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="blockify|blockification" id="blockify">blockification</dfn> or <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="inlinify|inlinification" id="inlinify">inlinification</dfn> of the box type, which sets the box’s <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#computed-value" id="ref-for-computed-value①">computed</a> <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type①⓪">outer display type</a> to <a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block⑤">block</a> or <a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline⑦">inline</a> (respectively). (This has no effect on <a data-link-type="dfn" href="#display-type" id="ref-for-display-type②">display types</a> that generate no box at all, such as <a class="css" data-link-type="maybe" href="#valdef-display-none" id="ref-for-valdef-display-none⑤">none</a> or <a class="css" data-link-type="maybe" href="#valdef-display-contents" id="ref-for-valdef-display-contents③">contents</a>.) Additionally:</p> <ul> <li data-md> <p>If a <a data-link-type="dfn" href="#block-box" id="ref-for-block-box⑤">block box</a> (<span class="css">block flow</span>) is <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify">inlinified</a>, its <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①①">inner display type</a> is set to <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root⑥">flow-root</a> so that it remains a block container.</p> <li data-md> <p>If an <a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box⑤">inline box</a> (<span class="css">inline flow</span>) is <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify①">inlinified</a>, it recursively <span id="ref-for-inlinify②">inlinifies</span> all of its in-flow children, so that no block-level descendants break up the inline formatting context in which it participates.</p> <li data-md> <p>For legacy reasons, if an <a data-link-type="dfn" href="#inline-block" id="ref-for-inline-block">inline block box</a> (<span class="css">inline flow-root</span>) is <a data-link-type="dfn" href="#blockify" id="ref-for-blockify">blockified</a>, it becomes a <a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block⑥">block</a> box (losing its <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root⑦">flow-root</a> nature). For consistency, a <span class="css">run-in flow-root</span> box also <span id="ref-for-blockify①">blockifies</span> to a <span class="css" id="ref-for-valdef-display-block⑦">block</span> box.</p> <li data-md> <p>If a <a data-link-type="dfn" href="#layout-internal" id="ref-for-layout-internal③">layout-internal</a> box is <a data-link-type="dfn" href="#blockify" id="ref-for-blockify②">blockified</a>, its <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①②">inner display type</a> converts to <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow⑤">flow</a> so that it becomes a <a data-link-type="dfn" href="#block-container" id="ref-for-block-container⑥">block container</a>. <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify③">Inlinification</a> has no effect on <span id="ref-for-layout-internal④">layout-internal</span> boxes. (However, placement in such an inline context will typically cause them to be wrapped in an appropriately-typed anonymous inline-level box.)</p> </ul> <p class="note" role="note"><span class="marker">Note:</span> There are two methods used to fix up box types when a box is mismatched to its context. One is transformation of the <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#computed-value" id="ref-for-computed-value②">computed value</a> of <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display②⑨">display</a>, such as <a data-link-type="dfn" href="#blockify" id="ref-for-blockify③">blockification</a> and <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify④">inlinification</a> described here. The other, taking place during <a href="#intro">box tree construction</a> (after computed values have been determined), is the creation of intermediary anonymous boxes, such as happens in <a href="https://www.w3.org/TR/CSS2/tables.html#anonymous-boxes">tables</a>, <a href="https://www.w3.org/TR/css-ruby-1/#box-fixup">ruby</a>, and <a href="https://www.w3.org/TR/CSS21/visuren.html#box-gen">flow</a> layout.</p> <div class="example" id="example-26cc3423"> <a class="self-link" href="#example-26cc3423"></a> Some examples of computed-value fixup include: <ul> <li>Absolute positioning or floating an element <a data-link-type="dfn" href="#blockify" id="ref-for-blockify④">blockifies</a> the box’s display type. <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> <li>Containment in a <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-container" id="ref-for-ruby-container③">ruby container</a> <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify⑤">inlinifies</a> the box’s display type, as described in <a data-link-type="biblio" href="#biblio-css-ruby-1" title="CSS Ruby Annotation Layout Module Level 1">[CSS-RUBY-1]</a>. <li>A parent with a <a class="css" data-link-type="maybe" href="#valdef-display-grid" id="ref-for-valdef-display-grid②">grid</a> or <a class="css" data-link-type="maybe" href="#valdef-display-flex" id="ref-for-valdef-display-flex②">flex</a> <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display③⓪">display</a> value <a data-link-type="dfn" href="#blockify" id="ref-for-blockify⑤">blockifies</a> the box’s display type. <a data-link-type="biblio" href="#biblio-css-grid-1" title="CSS Grid Layout Module Level 1">[CSS-GRID-1]</a> <a data-link-type="biblio" href="#biblio-css-flexbox-1" title="CSS Flexible Box Layout Module Level 1">[CSS-FLEXBOX-1]</a> </ul> </div> <h3 class="heading settled" data-level="2.8" id="root"><span class="secno">2.8. </span><span class="content"> The Root Element’s Principal Box</span><a class="self-link" href="#root"></a></h3> <p>The <a data-link-type="dfn" href="#root-element" id="ref-for-root-element">root element</a>’s display type is always <a data-link-type="dfn" href="#blockify" id="ref-for-blockify⑥">blockified</a>, and its <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box⑧">principal box</a> always establishes an <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context">independent formatting context</a>. This box’s <a data-link-type="dfn" href="#containing-block" id="ref-for-containing-block">containing block</a> is the <a data-link-type="dfn" href="#initial-containing-block" id="ref-for-initial-containing-block">initial containing block</a>.</p> <p>Additionally, a <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display③①">display</a> of <a class="css" data-link-type="maybe" href="#valdef-display-contents" id="ref-for-valdef-display-contents④">contents</a> computes to <a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block⑧">block</a> on the root element.</p> <h2 class="heading settled" data-level="3" id="order-property"><span class="secno">3. </span><span class="content"> Display Order: the <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order">order</a> property</span><a class="self-link" href="#order-property"></a></h2> <table class="def propdef" data-link-for-hint="order"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-order">order</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://www.w3.org/TR/css-values-4/#integer-value" id="ref-for-integer-value"><integer></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>0 <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td><a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-item" id="ref-for-flex-item">flex items</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-item" id="ref-for-grid-item">grid items</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 integer <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>by computed value type </table> <p>Boxes are generally displayed and laid out in the same order as they appear in the source document. In some <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context④">formatting contexts</a>, the <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order①">order</a> property can be used to rearrange the order of boxes to deliberately create a divergence of the logical order of elements and their spatial arrangement on the 2D visual canvas. (See <a href="#order-accessibility">§ 3.1 Reordering and Accessibility</a>.)</p> <p>Specifically, the <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order②">order</a> property controls the order in which <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-item" id="ref-for-flex-item①">flex items</a> or <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-item" id="ref-for-grid-item①">grid items</a> appear within their container, by assigning them to ordinal groups. It takes a single <dfn class="dfn-paneled css" data-dfn-for="order" data-dfn-type="value" data-export id="valdef-order-integer"><a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#integer-value" id="ref-for-integer-value①"><integer></a></dfn> value, which specifies which ordinal group the item belongs to.</p> <div class="example" id="example-84ef28f3"> <a class="self-link" href="#example-84ef28f3"></a> Here’s an example of a catalog item card which has a title, a photo, and a description. Within each entry, the source document content is ordered logically with the title first, followed by the description and the photo. This provides a sensible ordering for speech rendering and in non-CSS browsers. For a more compelling visual presentation, however, <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order③">order</a> is used to pull the image up from later in the content to the top of the card. <pre class="lang-css highlight">article.sale-item <c- p>{</c-> <c- k>display</c-><c- p>:</c-> flex<c- p>;</c-> <c- k>flex-flow</c-><c- p>:</c-> column<c- p>;</c-> <c- p>}</c-> article.sale-item > img <c- p>{</c-> <c- k>order</c-><c- p>:</c-> <c- m>-1</c-><c- p>;</c-> <c- c>/* Shift image before other content (in layout order) */</c-> align-self: center<c- p>;</c-> <c- p>}</c-> </pre> <pre class="lang-markup highlight"><c- p><</c-><c- f>article</c-> <c- e>class</c-><c- o>=</c-><c- s>"sale-item"</c-><c- p>></c-> <c- p><</c-><c- f>h1</c-><c- p>></c->Computer Starter Kit<c- p></</c-><c- f>h1</c-><c- p>></c-> <c- p><</c-><c- f>p</c-><c- p>></c->This is the best computer money can buy, if you don’t have much money. <c- p><</c-><c- f>ul</c-><c- p>></c-> <c- p><</c-><c- f>li</c-><c- p>></c->Computer <c- p><</c-><c- f>li</c-><c- p>></c->Monitor <c- p><</c-><c- f>li</c-><c- p>></c->Keyboard <c- p><</c-><c- f>li</c-><c- p>></c->Mouse <c- p></</c-><c- f>ul</c-><c- p>></c-> <c- p><</c-><c- f>img</c-> <c- e>src</c-><c- o>=</c-><c- s>"images/computer.jpg"</c-> <c- e>alt</c-><c- o>=</c-><c- s>"You get: a white desktop computer with matching peripherals."</c-><c- p>></c-> <c- p></</c-><c- f>article</c-><c- p>></c-> </pre> <figure> <div id="order-example"> <img alt="You get: a white desktop computer with matching keyboard and monitor." height="188" src="images/computer.jpg" width="250"> <h1 id="quiet-pubrules-1" style="font-size: 1.4em;">Computer Starter Kit</h1> <p> This is the best computer money can buy, if you don’t have much money. </p> <ul> <li>Computer <li>Monitor <li>Keyboard <li>Mouse </ul> </div> <figcaption> An example rendering of the code above. </figcaption> </figure> </div> <p><a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-container" id="ref-for-flex-container③">Flex</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-container" id="ref-for-grid-container③">grid containers</a> lay out their contents in <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="order-modified-document-order">order-modified document order</dfn>, starting from the lowest numbered ordinal group and going up. Items with the same ordinal group are laid out in the order they appear in the source document. This also affects the <a href="https://www.w3.org/TR/CSS2/zindex.html">painting order</a> <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>, exactly as if the <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-item" id="ref-for-flex-item②">flex</a>/<a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-item" id="ref-for-grid-item②">grid items</a> were reordered in the source document. Absolutely-positioned children of a <span id="ref-for-flex-container④">flex</span>/<span id="ref-for-grid-container④">grid container</span> are treated as having <a class="css" data-link-type="propdesc" href="#propdef-order" id="ref-for-propdef-order④">order: 0</a> for the purpose of determining their painting order relative to <span id="ref-for-flex-item③">flex</span>/<span id="ref-for-grid-item③">grid items</span>.</p> <p>Unless otherwise specified by a future specification, this property has no effect on boxes that are not <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-item" id="ref-for-flex-item④">flex items</a> or <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-item" id="ref-for-grid-item④">grid items</a>.</p> <h3 class="heading settled" data-level="3.1" id="order-accessibility"><span class="secno">3.1. </span><span class="content"> Reordering and Accessibility</span><a class="self-link" href="#order-accessibility"></a></h3> <p>The <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order⑤">order</a> property <em>does not</em> affect ordering in non-visual media (such as <a href="https://www.w3.org/TR/css-speech-1/">speech</a>). Likewise, <span class="property" id="ref-for-propdef-order⑥">order</span> does not affect the default traversal order of sequential navigation modes (such as cycling through links, see e.g. <a href="https://html.spec.whatwg.org/multipage/interaction.html#attr-tabindex"><code>tabindex</code></a> <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a>).</p> <p><strong class="advisement"> Authors <em>must</em> use <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order⑦">order</a> only for spatial, not logical, reordering of content. Style sheets that use <span class="property" id="ref-for-propdef-order⑧">order</span> to perform logical reordering are non-conforming.</strong></p> <p class="note" role="note"><span class="marker">Note:</span> This is so that non-visual media and non-CSS UAs, which typically present content linearly, can rely on a logical source order, while <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order⑨">order</a> is used to tailor the layout order. (Since visual perception is two-dimensional and non-linear, the desired layout order is not always logical.)</p> <p>In order to preserve the author’s intended ordering in all presentation modes, authoring tools—including WYSIWYG editors as well as Web-based authoring aids—must reorder the underlying document source and not use <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order①⓪">order</a> to perform reordering unless the author has explicitly indicated that the spatial order should be <em>out-of-sync</em> with the underlying document order (which determines speech and navigation order).</p> <div class="example" id="example-b20b6e0a"> <a class="self-link" href="#example-b20b6e0a"></a> For example, a tool might offer both drag-and-drop reordering of flex items as well as handling of media queries for alternate layouts per screen size range. <p>Since most of the time, reordering should affect all screen ranges as well as navigation and speech order, the tool would perform drag-and-drop reordering at the DOM layer. In some cases, however, the author may want different layouts per screen size. The tool could offer this functionality by using <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order①①">order</a> together with media queries, but also tie the smallest screen size’s ordering to the underlying DOM order (since this is most likely to be a logical linear presentation order) while using <span class="property" id="ref-for-propdef-order①②">order</span> to define the visual presentation order in other size ranges.</p> <p>This tool would be conformant, whereas a tool that only ever used <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order①③">order</a> to handle drag-and-drop reordering (however convenient it might be to implement it that way) would be non-conformant.</p> </div> <p class="note" role="note"><span class="marker">Note:</span> User agents, including browsers, accessible technology, and extensions, may offer spatial navigation features. This section does not preclude respecting the <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order①④">order</a> property when determining element ordering in such spatial navigation modes; indeed it would need to be considered for such a feature to work. But <span class="property" id="ref-for-propdef-order①⑤">order</span> is not the only (or even the primary) CSS property that would need to be considered for such a spatial navigation feature. A well-implemented spatial navigation feature would need to consider all the layout features of CSS that modify spatial relationships.</p> <h2 class="heading settled" data-level="4" id="visibility"><span class="secno">4. </span><span class="content"> Invisibility: the <a class="property css" data-link-type="property" href="#propdef-visibility" id="ref-for-propdef-visibility">visibility</a> property</span><a class="self-link" href="#visibility"></a></h2> <table class="def propdef" data-link-for-hint="visibility"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-visibility">visibility</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://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②⑦">|</a> hidden <span id="ref-for-comb-one②⑧">|</span> collapse <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><a href="https://www.w3.org/TR/css-pseudo/#generated-content" title="Includes ::before and ::after pseudo-elements.">all elements</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <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>as specified <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>Media: <td>visual </table> <p>The <a class="property css" data-link-type="property" href="#propdef-visibility" id="ref-for-propdef-visibility①">visibility</a> property specifies whether the box is rendered. <a data-link-type="dfn" href="#invisible" id="ref-for-invisible">Invisible</a> boxes still affect layout. (Set the <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display③②">display</a> property to <a class="css" data-link-type="maybe" href="#valdef-display-none" id="ref-for-valdef-display-none⑥">none</a> to suppress box generation altogether.). Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="visibility" data-dfn-type="value" data-export id="valdef-visibility-visible">visible</dfn> <dd> The generated box is visible, as normal. <dt><dfn class="dfn-paneled css" data-dfn-for="visibility" data-dfn-type="value" data-export id="valdef-visibility-hidden">hidden</dfn> <dd> Any boxes generated by the element are <a data-link-type="dfn" href="#invisible" id="ref-for-invisible①">invisible</a>. Descendants of the element can, however, be visible if they have <a class="css" data-link-type="propdesc" href="#propdef-visibility" id="ref-for-propdef-visibility②">visibility: visible</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="visibility" data-dfn-type="value" data-export id="valdef-visibility-collapse">collapse</dfn> <dd> Indicates that the box is <dfn class="dfn-paneled" data-dfn-for data-dfn-type="dfn" data-noexport id="collapsed">collapsed</dfn>, which can cause it to take up less space than otherwise in a formatting-context–specific way. See <a href="https://www.w3.org/TR/CSS2/tables.html#dynamic-effects">dynamic row and column effects in tables</a> <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> and <a href="https://www.w3.org/TR/css-flexbox-1/#visibility-collapse">collapsed flex items</a> in flex layout <a data-link-type="biblio" href="#biblio-css-flexbox-1" title="CSS Flexible Box Layout Module Level 1">[CSS-FLEXBOX-1]</a>. In all other cases, however, (i.e. unless otherwise specified) this simply makes the box <a data-link-type="dfn" href="#invisible" id="ref-for-invisible②">invisible</a>, just like <a class="css" data-link-type="maybe" href="#valdef-visibility-hidden" id="ref-for-valdef-visibility-hidden">hidden</a>. </dl> <p class="note" role="note"><span class="marker">Note:</span> Currently, many user agents and/or accessibility tools don’t correctly implement the accessibility implications of visible elements with semantic relationships to <a data-link-type="dfn" href="#invisible" id="ref-for-invisible③">invisible</a> elements, so, for example, making parent elements with special roles (such as table rows) <span id="ref-for-invisible④">invisible</span> while leaving child elements with special roles (such as table cells) visible can be problematic for users of those tools. Authors should avoid creating these situations until the tooling situation improves.</p> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="invisible">Invisible</dfn> boxes are not rendered (as if they were fully transparent), cannot be interacted with (and behave as if they had <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css-ui-4/#propdef-pointer-events" id="ref-for-propdef-pointer-events">pointer-events: none</a>), are removed from navigation (similar to <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display③③">display: none</a>), and are also not rendered to speech (except when <a class="property css" data-link-type="property" href="https://www.w3.org/TR/CSS21/aural.html#propdef-speak" id="ref-for-propdef-speak">speak</a> is <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-speech-1/#valdef-speak-always" id="ref-for-valdef-speak-always">always</a> <a data-link-type="biblio" href="#biblio-css-speech-1" title="CSS Speech Module Level 1">[CSS-SPEECH-1]</a>). However, as with <span class="css" id="ref-for-propdef-display③④">display: contents</span>, their semantic role as a container is not affected, to ensure that any <a class="css" data-link-type="maybe" href="#valdef-visibility-visible" id="ref-for-valdef-visibility-visible">visible</a> descendants are properly interpreted.</p> <p class="note" role="note"><span class="marker">Note:</span> If <a class="property css" data-link-type="property" href="https://www.w3.org/TR/CSS21/aural.html#propdef-speak" id="ref-for-propdef-speak①">speak</a> is <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-speech-1/#valdef-speak-always" id="ref-for-valdef-speak-always①">always</a>, an otherwise <a data-link-type="dfn" href="#invisible" id="ref-for-invisible⑤">invisible</a> box <em>is</em> rendered to speech, and may be interacted with using non-visual/spatial methods.</p> <div class="example" id="example-a0db1b94"> <a class="self-link" href="#example-a0db1b94"></a> While temporarily hiding things with <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display③⑤">display: none</a> is often sufficient, doing so removes the elements from layout entirely, possibly causing unwanted movement or reflow of the page when an element is hidden or shown. <a class="css" data-link-type="propdesc" href="#propdef-visibility" id="ref-for-propdef-visibility③">visibility: hidden</a> can instead be used to keep the page’s layout stable as something is hidden and displayed. <p>For example, here is a (deliberately simplified) possible implementation of a "spoiler" element that can be revealed by clicking on the hidden text:</p> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c->The symbolism earlier in the movie becomes obvious at the end, when it's revealed that <c- p><</c-><c- f>spoiler-text</c-><c- p>><</c-><c- f>span</c-><c- p>></c->Luke is his own father<c- p></</c-><c- f>span</c-><c- p>></</c-><c- f>spoiler-text</c-><c- p>></c->, making the wizard's cryptic riddles meaningful. <c- p><</c-><c- f>style</c-><c- p>></c-> <c- f>spoiler-text</c-> <c- p>{</c-> <c- k>border-bottom</c-><c- p>:</c-> <c- mi>1</c-><c- b>px</c-> <c- kc>solid</c-><c- p>;</c-> <c- p>}</c-> <c- f>spoiler-text</c-> <c- o>></c-> <c- f>span</c-> <c- p>{</c-> <c- k>visibility</c-><c- p>:</c-> <c- kc>hidden</c-><c- p>;</c-> <c- p>}</c-> <c- f>spoiler-text</c-><c- p>.</c-><c- nc>shown</c-> <c- o>></c-> <c- f>span</c-> <c- p>{</c-> <c- k>visibility</c-><c- p>:</c-> <c- kc>visible</c-><c- p>;</c-> <c- p>}</c-> <c- p></</c-><c- f>style</c-><c- p>></c-> <c- p><</c-><c- f>script</c-><c- p>></c-> <c- p>[...</c->document<c- p>.</c->querySelectorAll<c- p>(</c-><c- u>"spoiler-text"</c-><c- p>)].</c->forEach<c- p>(</c->el<c- p>=>{</c-> el<c- p>.</c->addEventListener<c- p>(</c-><c- u>"click"</c-><c- p>,</c-> e<c- p>=></c->el<c- p>.</c->classList<c- p>.</c->toggle<c- p>(</c-><c- u>"shown"</c-><c- p>));</c-> <c- p>});</c-> <c- p></</c-><c- f>script</c-><c- p>></c-> </pre> <p><strong class="advisement"> This example is deliberately significantly simplified. It is missing a number of accessibility and UX features that a well-designed spoiler element would have to show off the <a class="property css" data-link-type="property" href="#propdef-visibility" id="ref-for-propdef-visibility④">visibility</a> usage more plainly. Don’t copy this code for a real site.</strong></p> </div> <h2 class="heading settled" data-level="5" id="run-in-layout"><span class="secno">5. </span><span class="content"> Run-In Layout</span><a class="self-link" href="#run-in-layout"></a></h2> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="run-in | run-in box" id="run-in">run-in box</dfn> is a box that <em>merges into</em> a block that comes after it, inserting itself at the beginning of that block’s inline-level content. This is useful for formatting compact headlines, definitions, and other similar things, where the appropriate DOM structure is to have a headline preceding the following prose, but the desired display is an inline headline laying out with the text.</p> <div class="example" id="example-8e61beaa"> <a class="self-link" href="#example-8e61beaa"></a> For example, dictionary definitions are often formatted so that the word is inline with the definition: <pre><dl class='dict'> <dt>dictionary <dd>a book that lists the words of a language in alphabetical order and gives their meaning, or that gives the equivalent words in a different language. <dt>glossary <dd>an alphabetical list of terms or words found in or relating to a specific subject, text, or dialect, with explanations; a brief dictionary. </dl> <style> .dict > dt { display: run-in; } .dict > dt::after { content: ": " } </style> </pre> <p>Which is formatted as:</p> <pre><b>dictionary:</b> a book that lists the words of a language in alphabetical order and explains their meaning. <b>glossary:</b> an alphabetical list of terms or words found in or relating to a specific subject, text, or dialect, with explanations; a brief dictionary. </pre> </div> <p>A <a data-link-type="dfn" href="#run-in" id="ref-for-run-in②">run-in box</a> behaves exactly as any other <a data-link-type="dfn" href="#inline-level-box" id="ref-for-inline-level-box①">inline-level box</a>, except:</p> <ul> <li> A <a data-link-type="dfn" href="#run-in" id="ref-for-run-in③">run-in box</a> with a <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow⑥">flow</a> <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①③">inner display type</a> <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify⑥">inlinifies</a> its contents. <li> If a <a data-link-type="dfn" href="#run-in-sequence" id="ref-for-run-in-sequence">run-in sequence</a> is immediately followed by a block box that does not establish a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context⑥">block formatting context</a>, it is inserted as direct children of that block box: after its <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-marker" id="ref-for-selectordef-marker②">::marker</a> pseudo-element’s boxes (if any), but preceding any other boxes generated by the contents of the block (including the box generated by the <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-before" id="ref-for-selectordef-before①">::before</a> pseudo-element, if any). This re-parenting recurses if possible (so that the run-in effectively becomes part of the deepest subsequent “paragraph” in its formatting context, collecting newly-adjacent run-ins as it goes). <p>The reparented content is then formatted as if originally parented there. <span class="note">Note that only layout is affected, not inheritance, because property inheritance for non-anonymous boxes is based only on the element tree.</span></p> <li> Otherwise (if the <a data-link-type="dfn" href="#run-in-sequence" id="ref-for-run-in-sequence①">run-in sequence</a> is <em>not</em> followed by such a block), an anonymous block box is generated around the <span id="ref-for-run-in-sequence②">run-in sequence</span> and all immediately following inline-level content (up to, but not including, the next <span id="ref-for-run-in-sequence③">run-in sequence</span>, if any). </ul> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="run-in-sequence">run-in sequence</dfn> is a maximal sequence of consecutive sibling <a data-link-type="dfn" href="#run-in" id="ref-for-run-in④">run-in boxes</a> and intervening <a data-link-type="dfn" href="https://www.w3.org/TR/css-text-4/#white-space" id="ref-for-white-space">white space</a> and/or out-of-flow boxes.</p> <p class="note" role="note"><span class="marker">Note:</span> This statement implies that out-of-flow boxes are reparented if they are between two run-in boxes. Another alternative would be to leave behind the intervening out-of-flow boxes, or to have out-of-flow boxes impede the running-in of earlier boxes. Implementers and authors are encouraged to contact the CSSWG if they have a preferred behavior, as this one was picked somewhat at random.</p> <p>This fixup occurs before the anonymous block and inline box fixup described in <a href="https://www.w3.org/TR/CSS21/visuren.html#box-gen">CSS2§9.2</a>, and affects the determination of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-pseudo-4/#first-formatted-line" id="ref-for-first-formatted-line">first formatted line</a> of the affected elements as if the <a data-link-type="dfn" href="#run-in-sequence" id="ref-for-run-in-sequence④">run-in sequence</a> were originally in its final location in the box tree.</p> <p class="note" role="note"><span class="marker">Note:</span> As the earliest run-in represents the first text on the <a data-link-type="dfn" href="https://www.w3.org/TR/css-pseudo-4/#first-formatted-line" id="ref-for-first-formatted-line①">first formatted line</a> of its containing block, a <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter" id="ref-for-selectordef-first-letter①">::first-letter</a> pseudo-element applied to that block element selects the first letter of the run-in, rather than the first letter of its own contents.</p> <p class="note" role="note"><span class="marker">Note:</span> This run-in model is slightly different from the one proposed in earlier revisions of <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>.</p> <h2 class="no-num heading settled" id="glossary"><span class="content"> Appendix A: Glossary</span><a class="self-link" href="#glossary"></a></h2> <p>The following terms are defined here for convenience:</p> <dl> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="root-element">root element</dfn> <dd> The <a data-link-type="dfn" href="#elements" id="ref-for-elements⑦">element</a> at the root of the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#concept-document-tree" id="ref-for-concept-document-tree">document tree</a>. In a <span id="ref-for-concept-document-tree①">document tree</span> produced under the DOM, this is the <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#document-element" id="ref-for-document-element">document element</a>; in HTML it is the <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. <a data-link-type="biblio" href="#biblio-dom" title="DOM Standard">[DOM]</a> <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="principal-box">principal box</dfn> <dd> When an <a data-link-type="dfn" href="#elements" id="ref-for-elements⑧">element</a> generates one or more <a data-link-type="dfn" href="#box" id="ref-for-box①①">boxes</a>, one of them is the <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box⑨">principal box</a>, which contains its descendant boxes and generated content, and is also the box involved in any positioning scheme. <p>Some elements may generate additional boxes in addition to the principal box (such as <a class="css" data-link-type="maybe" href="#valdef-display-list-item" id="ref-for-valdef-display-list-item④">list-item</a> elements, which generate an additional marker box, or <a class="css" data-link-type="maybe" href="#valdef-display-table" id="ref-for-valdef-display-table">table</a> elements, which generate a <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box①⓪">principal</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-wrapper-box" id="ref-for-table-wrapper-box④">table wrapper box</a> and an additional <a data-link-type="dfn" href="https://www.w3.org/TR/css-tables-3/#table-grid-box" id="ref-for-table-grid-box④">table grid box</a>). These additional boxes are placed with respect to the principal box.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="inline-level|inline-level content" id="inline-level">inline-level</dfn> <dd> Content that participates in inline layout. Specifically, inline-level boxes and <a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence⑨">text sequences</a>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="block-level|block-level content" id="block-level">block-level</dfn> <dd> Content that participates in <a data-link-type="dfn" href="#block-layout" id="ref-for-block-layout">block layout</a>. Specifically, block-level boxes. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="inline-box">inline box</dfn> <dd> A non-replaced <a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level⑤">inline-level</a> box whose <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①④">inner display type</a> is <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow⑦">flow</a>. The contents of an inline box participate in the same inline formatting context as the inline box itself. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="inline">inline</dfn> <dd> Used as a shorthand for <a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box⑥">inline box</a> or <a data-link-type="dfn" href="#inline-level-box" id="ref-for-inline-level-box②">inline-level box</a> where unambiguous, or as an adjective meaning <a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level⑥">inline-level</a>. The latter usage is deprecated. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="atomic inline|atomic inline box" id="atomic-inline">atomic inline</dfn> <dd> An inline-level box that is replaced (such as an image) or that establishes a new formatting context (such as an <a class="css" data-link-type="maybe" href="#valdef-display-inline-block" id="ref-for-valdef-display-inline-block①">inline-block</a> or <span class="css">inline-table</span>) and cannot split across lines (as <a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box⑦">inline boxes</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-container" id="ref-for-ruby-container④">ruby containers</a> can). <p>Any inline-level box whose <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①⑤">inner display type</a> is not <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow⑧">flow</a> establishes a new formatting context of the specified <span id="ref-for-inner-display-type①⑥">inner display type</span>.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="block container|block container box" id="block-container">block container</dfn> <dd> A block container either contains only inline-level boxes participating in an <a data-link-type="dfn" href="#inline-formatting-context" id="ref-for-inline-formatting-context①">inline formatting context</a>, or contains only block-level boxes participating in a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context⑦">block formatting context</a> (possibly generating anonymous block boxes to ensure this constraint, as defined in <a href="https://www.w3.org/TR/CSS2/visuren.html#anonymous-block-level">CSS2§9.2.1.1</a>). <p>A block container that contains only inline-level content establishes a new <a data-link-type="dfn" href="#inline-formatting-context" id="ref-for-inline-formatting-context②">inline formatting context</a>. The element then also generates a <a data-link-type="dfn" href="https://www.w3.org/TR/css-inline-3/#root-inline-box" id="ref-for-root-inline-box">root inline box</a> which wraps all of its inline content. <span class="note">Note, this <a data-link-type="dfn" href="https://www.w3.org/TR/css-inline-3/#root-inline-box" id="ref-for-root-inline-box①">root inline box</a> concept effectively replaces the "anonymous inline element" concept introduced in <a href="https://www.w3.org/TR/CSS2/visuren.html#anonymous">CSS2§9.2.2.1</a>.</span></p> <p>A block container establishes a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context⑧">block formatting context</a> if its parent formatting context is <em>not</em> a <span id="ref-for-block-formatting-context⑨">block formatting context</span>; otherwise, when participating in a <span id="ref-for-block-formatting-context①⓪">block formatting context</span> itself, it either establishes a new <span id="ref-for-block-formatting-context①①">block formatting context</span> for its contents or continues the one in which it participates, as determined by the constraints of other properties (such as <a class="property css" data-link-type="property">overflow</a> or <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-align-3/#propdef-align-content" id="ref-for-propdef-align-content">align-content</a>).</p> <p class="note" role="note"><span class="marker">Note:</span> A block container box can both establish a block formatting context <em>and</em> an inline formatting context simultaneously.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="block-box">block box</dfn> <dd> A <a data-link-type="dfn" href="#block-level-box" id="ref-for-block-level-box">block-level box</a> that is also a <a data-link-type="dfn" href="#block-container" id="ref-for-block-container⑦">block container</a>. <p class="note" role="note"><span class="marker">Note:</span> Not all <a data-link-type="dfn" href="#block-container" id="ref-for-block-container⑧">block container</a> boxes are <a data-link-type="dfn" href="#block-level" id="ref-for-block-level⑤">block-level</a> boxes: non-replaced <a data-link-type="dfn" href="#inline-block" id="ref-for-inline-block①">inline blocks</a> and non-replaced table cells, for example, are block containers but not block-level boxes. Similarly, not all block-level boxes are block containers: block-level replaced elements (<a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display③⑥">display: block</a>) and flex containers (<span class="css" id="ref-for-propdef-display③⑦">display: flex</span>), for example, are not block containers.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="block">block</dfn> <dd> Used as a shorthand for <a data-link-type="dfn" href="#block-box" id="ref-for-block-box⑥">block box</a>, <a data-link-type="dfn" href="#block-level-box" id="ref-for-block-level-box①">block-level box</a>, or <a data-link-type="dfn" href="#block-container" id="ref-for-block-container⑨">block container box</a>, where unambiguous. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="replaced element|replaced" id="replaced-element">replaced element</dfn> <dd> An element whose content is outside the scope of the CSS formatting model, such as an image or embedded document. <span class="non-normative"> For example, the content of the HTML <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element" id="ref-for-the-img-element">img</a></code> element is often replaced by the image that its <code><a data-link-type="element-sub" href="https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-src" id="ref-for-attr-img-src">src</a></code> attribute designates. </span> <p>Replaced elements often have <a data-link-type="dfn" href="https://www.w3.org/TR/css-images-3/#natural-dimensions" id="ref-for-natural-dimensions">natural dimensions</a>. For example, a bitmap image has a natural width and a natural height specified in absolute units (from which the natural ratio can obviously be determined). On the other hand, other objects may not have any natural dimensions (for example, a blank HTML document). See <a data-link-type="biblio" href="#biblio-css-images-3" title="CSS Images Module Level 3">[css-images-3]</a>.</p> <p>User agents may consider a <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element⑥">replaced element</a> to not have any <a data-link-type="dfn" href="https://www.w3.org/TR/css-images-3/#natural-dimensions" id="ref-for-natural-dimensions①">natural dimensions</a> if it is believed that those dimensions could leak sensitive information to a third party. For example, if an HTML document changed natural size depending on the user’s bank balance, then the UA might want to act as if that resource had no <span id="ref-for-natural-dimensions②">natural dimensions</span>.</p> <p>The content of replaced elements is not considered in the CSS formatting model; however, their <a data-link-type="dfn" href="https://www.w3.org/TR/css-images-3/#natural-dimensions" id="ref-for-natural-dimensions③">natural dimensions</a> are used in various layout calculations. Replaced elements always establish an <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context①">independent formatting context</a>.</p> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="non-replaced | non-replaced element" id="non-replaced">non-replaced</dfn> element is one that is not <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element⑦">replaced</a>, i.e. whose rendering is dictated by the CSS model.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="containing-block">containing block</dfn> <dd> A rectangle that forms the basis of sizing and positioning for the <a data-link-type="dfn" href="#box" id="ref-for-box①②">boxes</a> associated with it. Notably, a <a data-link-type="dfn" href="#containing-block" id="ref-for-containing-block①">containing block</a> is <em>not a <a data-link-type="dfn" href="#box" id="ref-for-box①③">box</a></em> (it is a rectangle), however it is often derived from the dimensions of a <span id="ref-for-box①④">box</span>. Each <span id="ref-for-box①⑤">box</span> is given a position with respect to its <span id="ref-for-containing-block②">containing block</span>, but it is not confined by this <span id="ref-for-containing-block③">containing block</span>; it can <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/visufx.html#x0" id="ref-for-x0">overflow</a>. The phrase “a box’s containing block” means “the <span id="ref-for-containing-block④">containing block</span> in which the box lives,” not the one it generates. <p>In general, the <a data-link-type="dfn" href="https://www.w3.org/TR/css-box-4/#box-box-edge" id="ref-for-box-box-edge">edges</a> of a <a data-link-type="dfn" href="#box" id="ref-for-box①⑥">box</a> act as the <a data-link-type="dfn" href="#containing-block" id="ref-for-containing-block⑤">containing block</a> for descendant boxes; we say that a box “establishes” the <span id="ref-for-containing-block⑥">containing block</span> for its descendants. If properties of a <span id="ref-for-containing-block⑦">containing block</span> are referenced, they reference the values on the <span id="ref-for-box①⑦">box</span> that generated the <span id="ref-for-containing-block⑧">containing block</span>. (For the <a data-link-type="dfn" href="#initial-containing-block" id="ref-for-initial-containing-block①">initial containing block</a>, values are taken from the root element unless otherwise specified.)</p> <p>See <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> <a href="https://www.w3.org/TR/CSS2/visuren.html#containing-block">Section 9.1.2</a> and <a href="https://www.w3.org/TR/CSS2/visudet.html#containing-block-details">Section 10.1</a> and <a href="https://www.w3.org/TR/css-position-3/#def-cb"><cite>CSS Positioned Layout 3</cite> § 2.1 Containing Blocks of Positioned Boxes</a> for details.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="containing-block-chain">containing block chain</dfn> <dd> A sequence of successive <a data-link-type="dfn" href="#containing-block" id="ref-for-containing-block⑨">containing blocks</a> that form an ancestor-descendant chain through the <span id="ref-for-containing-block①⓪">containing block</span> relation. For example, an <a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box⑧">inline box</a>’s containing block is the content box of its closest <a data-link-type="dfn" href="#block-container" id="ref-for-block-container①⓪">block container</a> ancestor; if that block container is an in-flow <a data-link-type="dfn" href="#block" id="ref-for-block">block</a>, then <em>its</em> containing block is formed by its parent <span id="ref-for-block-container①①">block container</span>; if that grandparent <span id="ref-for-block-container①②">block container</span> is <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#absolute-position" id="ref-for-absolute-position">absolutely positioned</a>, then <em>its</em> containing block is the padding edges of its closest <em>positioned</em> ancestor (not necessarily its parent), and so on up to the <a data-link-type="dfn" href="#initial-containing-block" id="ref-for-initial-containing-block②">initial containing block</a>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="initial-containing-block">initial containing block</dfn> <dd> The <a data-link-type="dfn" href="#containing-block" id="ref-for-containing-block①①">containing block</a> of the <a data-link-type="dfn" href="#root-element" id="ref-for-root-element①">root element</a>. The <a data-link-type="dfn" href="#initial-containing-block" id="ref-for-initial-containing-block③">initial containing block</a> establishes a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context①②">block formatting context</a>, and takes the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#principal-writing-mode" id="ref-for-principal-writing-mode">principal writing mode</a> of the document (see <a href="https://www.w3.org/TR/css-writing-modes-4/#icb"><cite>CSS Writing Modes 4</cite> § 8.1 Propagation to the Initial Containing Block</a>). In <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#continuous-media" id="ref-for-continuous-media">continuous media</a>, it has the dimensions of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-values-4/#small-viewport-size" id="ref-for-small-viewport-size">small viewport size</a> and is anchored at the canvas origin. In <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#paged-media" id="ref-for-paged-media">paged media</a>, see <a data-link-type="biblio" href="#biblio-css-page-3" title="CSS Paged Media Module Level 3">[CSS-PAGE-3]</a> for its position and dimensions. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="formatting-context">formatting context</dfn> <dd> A <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context⑤">formatting context</a> is the environment into which a set of related boxes are laid out. Different <span id="ref-for-formatting-context⑥">formatting contexts</span> lay out their boxes according to different rules. For example, a <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-formatting-context" id="ref-for-flex-formatting-context①">flex formatting context</a> lays out boxes according to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-layout" id="ref-for-flex-layout">flex layout</a> rules <a data-link-type="biblio" href="#biblio-css-flexbox-1" title="CSS Flexible Box Layout Module Level 1">[CSS-FLEXBOX-1]</a>, whereas a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context①③">block formatting context</a> lays out boxes according to the block-and-inline layout rules <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>. Additionally, some types of <span id="ref-for-formatting-context⑦">formatting contexts</span> interleave and co-exist: for example, an <a data-link-type="dfn" href="#inline-formatting-context" id="ref-for-inline-formatting-context③">inline formatting context</a> exists within and interacts with the <span id="ref-for-block-formatting-context①④">block formatting context</span> of the element that establishes it, and a <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-container" id="ref-for-ruby-container⑤">ruby container</a> overlays a <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-formatting-context" id="ref-for-ruby-formatting-context②">ruby formatting context</a> over the <span id="ref-for-inline-formatting-context④">inline formatting context</span> in which its <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-base-container-box" id="ref-for-ruby-base-container-box">ruby base container</a> participates. <p>A box either establishes a new <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context②">independent formatting context</a> or continues the <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context⑧">formatting context</a> of its containing block. In some cases, it might additionally establish a new (non-independent) co-existing formatting context. Unless otherwise specified, however, establishing a new <span id="ref-for-formatting-context⑨">formatting context</span> creates an <span id="ref-for-independent-formatting-context③">independent formatting context</span>. The type of formatting context established by the box is determined by its <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①⑦">inner display type</a>. E.g. a <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-container" id="ref-for-grid-container⑤">grid container</a> establishes a new <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-formatting-context" id="ref-for-grid-formatting-context②">grid formatting context</a>, a <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-container" id="ref-for-ruby-container⑥">ruby container</a> establishes a new <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby-formatting-context" id="ref-for-ruby-formatting-context③">ruby formatting context</a>, and a <a data-link-type="dfn" href="#block-container" id="ref-for-block-container①③">block container</a> can establish a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context①⑤">block formatting context</a> and/or a new <a data-link-type="dfn" href="#inline-formatting-context" id="ref-for-inline-formatting-context⑤">inline formatting context</a>. See the <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display③⑧">display</a> property.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="independent-formatting-context">independent formatting context</dfn> <dd> When a box establishes an independent formatting context (whether that <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context①⓪">formatting context</a> is of the same type as its parent or not), it essentially creates a new, independent layout environment: except through the sizing of the box itself, the layout of its descendants is (generally) not affected by the rules and contents of the <span id="ref-for-formatting-context①①">formatting context</span> outside the box, and vice versa. <p class="example" id="example-7e2994e7"><a class="self-link" href="#example-7e2994e7"></a> For example, in a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context①⑥">block formatting context</a>, floated boxes affect the layout of surrounding boxes. But their effects do not escape their <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context①②">formatting context</a>: the box establishing their <span id="ref-for-formatting-context①③">formatting context</span> grows to fully contain them, and floats from outside that box are not allowed to protrude into and affect the contents inside the box. </p> <p class="example" id="example-bb8209a6"><a class="self-link" href="#example-bb8209a6"></a> As another example, margins do not collapse across <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context①④">formatting context</a> boundaries. </p> <p class="note" role="note"> Exclusions are able to affect content across <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context④">independent formatting context</a> boundaries. (At time of writing, they are the only layout feature that can.) <a data-link-type="biblio" href="#biblio-css3-exclusions" title="CSS Exclusions Module Level 1">[CSS3-EXCLUSIONS]</a> </p> <p>Certain properties can force a box to <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="establish an independent formatting context| establishes an independent formatting context| establishing an independent formatting context| established an independent formatting context" id="establish-an-independent-formatting-context"> establish an independent formatting context</dfn> in cases where it wouldn’t ordinarily. For example, making a box <a data-link-type="dfn" href="#out-of-flow" id="ref-for-out-of-flow">out-of-flow</a> causes it to <a data-link-type="dfn" href="#blockify" id="ref-for-blockify⑦">blockify</a> as well as to <a data-link-type="dfn" href="#establish-an-independent-formatting-context" id="ref-for-establish-an-independent-formatting-context">establish an independent formatting context</a>. As another example, certain values of the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-contain-2/#propdef-contain" id="ref-for-propdef-contain">contain</a> property can cause a box to <span id="ref-for-establish-an-independent-formatting-context①">establish an independent formatting context</span>. Turning a block into a <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scroll-container" id="ref-for-scroll-container">scroll container</a> will cause it to <span id="ref-for-establish-an-independent-formatting-context②">establish an independent formatting context</span>; however turning a <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#subgrid" id="ref-for-subgrid">subgrid</a> into a <span id="ref-for-scroll-container①">scroll container</span> will not—it continues to act as a subgrid, with its contents participating in the layout of its parent <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-container" id="ref-for-grid-container⑥">grid container</a>.</p> <p>A <a data-link-type="dfn" href="#block-box" id="ref-for-block-box⑦">block box</a> that <a data-link-type="dfn" href="#establish-an-independent-formatting-context" id="ref-for-establish-an-independent-formatting-context③">establishes an independent formatting context</a> establishes a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context①⑦">block formatting context</a> for its contents. In most other cases, forcing a box to <span id="ref-for-establish-an-independent-formatting-context④">establish an independent formatting context</span> is a no-op—either the box already establishes an <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context⑤">independent formatting context</a> (e.g. <a data-link-type="dfn" href="https://www.w3.org/TR/css-flexbox-1/#flex-container" id="ref-for-flex-container⑤">flex containers</a>), or it’s not possible to establish a totally independent new formatting context on that type of box (e.g. non-replaced <a data-link-type="dfn" href="#inline-box" id="ref-for-inline-box⑨">inline boxes</a>).</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="block-formatting-context">block formatting context</dfn> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="inline-formatting-context">inline formatting context</dfn> <dd> <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context①⑧">Block</a> and <a data-link-type="dfn" href="#inline-formatting-context" id="ref-for-inline-formatting-context⑥">inline formatting contexts</a> are defined in <a href="https://www.w3.org/TR/CSS2/visuren.html#normal-flow">CSS 2.1 Section 9.4</a>. <span id="ref-for-inline-formatting-context⑦">Inline formatting contexts</span> exist within (are part of their containing) <span id="ref-for-block-formatting-context①⑨">block formatting contexts</span>; for example, line boxes belonging to the <span id="ref-for-inline-formatting-context⑧">inline formatting context</span> interact with floats belonging to the <span id="ref-for-block-formatting-context②⓪">block formatting context</span>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="block-layout">block layout</dfn> <dd> The layout of <a data-link-type="dfn" href="#block-level-box" id="ref-for-block-level-box②">block-level boxes</a>, performed within a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context②①">block formatting context</a>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="block-formatting-context-root">block formatting context root</dfn> <dd> A <a data-link-type="dfn" href="#block-container" id="ref-for-block-container①④">block container</a> that establishes a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context②②">block formatting context</a>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="bfc">BFC</dfn> <dd> Abbreviation for <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context②③">block formatting context</a> or <a data-link-type="dfn" href="#block-formatting-context-root" id="ref-for-block-formatting-context-root">block formatting context root</a>. Has various informal definitions referring to boxes which contain internal floats, exclude external floats, and suppress margin collapsing, and may therefore refer specifically to one of: <ul> <li data-md> <p>a <a data-link-type="dfn" href="#block-container" id="ref-for-block-container①⑤">block container</a> that establishes a new <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context②④">block formatting context</a> for its contents</p> <li data-md> <p>a <a data-link-type="dfn" href="#block-box" id="ref-for-block-box⑧">block box</a> (i.e. a <a data-link-type="dfn" href="#block-level" id="ref-for-block-level⑥">block-level</a> block container) that establishes a <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context②⑤">block formatting context</a> for its contents (as distinguished from a block box which does not)</p> <li data-md> <p>(very loosely) any block-level box that establishes a new <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context①⑤">formatting context</a> (other than an inline formatting context)</p> </ul> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="out of flow | out-of-flow" id="out-of-flow">out-of-flow</dfn> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="in flow | in-flow" id="in-flow">in-flow</dfn> <dd> A box is <a data-link-type="dfn" href="#out-of-flow" id="ref-for-out-of-flow①">out-of-flow</a> if it is extracted from its expected position and interaction with surrounding content and laid out using a different paradigm outside the normal flow of content in its parent formatting context. This occurs if the box is floated (via <a class="property css" data-link-type="property" href="https://drafts.csswg.org/css2/#propdef-float" id="ref-for-propdef-float①">float</a>) or <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#absolute-position" id="ref-for-absolute-position①">absolutely positioned</a> (via <a class="property css" data-link-type="property" href="https://www.w3.org/TR/CSS21/visuren.html#propdef-position" id="ref-for-propdef-position①">position</a>). A box is <a data-link-type="dfn" href="#in-flow" id="ref-for-in-flow">in-flow</a> if it is not <span id="ref-for-out-of-flow②">out-of-flow</span>. <p class="note" role="note"><span class="marker">Note:</span> Some <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context①⑥">formatting contexts</a> inhibit floating, so that an element with <a class="css" data-link-type="propdesc" href="https://drafts.csswg.org/css2/#propdef-float" id="ref-for-propdef-float②">float: left</a> is not necessarily <a data-link-type="dfn" href="#out-of-flow" id="ref-for-out-of-flow③">out-of-flow</a>.</p> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="document-order">document order</dfn> <dd> The order in which boxes or content occurs in the document (which can be different from the order in which it appears for rendering). For the purpose of determining the relative order of pseudo-elements, the box-tree order is used, see <a href="https://www.w3.org/TR/css-pseudo-4/#treelike"><cite>CSS Pseudo-Elements 4</cite> § 4 Tree-Abiding Pseudo-elements</a>. </dl> <p>See <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> <a href="https://www.w3.org/TR/CSS2/visuren.html">Chapter 9</a> for a fuller definition of these terms.</p> <h2 class="no-num non-normative heading settled" id="unbox"><span class="content"> Appendix B: Effects of <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display③⑨">display: contents</a> on Unusual Elements</span><a class="self-link" href="#unbox"></a></h2> <p><em>This section is (currently) non-normative.</em></p> <p>Some elements aren’t rendered purely by CSS box concepts; for example, replaced elements (such as <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element" id="ref-for-the-img-element①">img</a></code>), many form controls (such as <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/input.html#the-input-element" id="ref-for-the-input-element">input</a></code>), and SVG elements.</p> <p>This appendix defines how they interact with <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display④⓪">display: contents</a>.</p> <h3 class="heading settled" id="unbox-html"><span class="content">HTML Elements</span><a class="self-link" href="#unbox-html"></a></h3> <dl> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element" id="ref-for-the-br-element">br</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element" id="ref-for-the-wbr-element">wbr</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element" id="ref-for-the-meter-element">meter</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element" id="ref-for-the-progress-element">progress</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/canvas.html#canvas" id="ref-for-canvas">canvas</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element" id="ref-for-the-embed-element">embed</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element" id="ref-for-the-object-element">object</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/media.html#audio" id="ref-for-audio">audio</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element" id="ref-for-the-iframe-element">iframe</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element" id="ref-for-the-img-element②">img</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/media.html#video" id="ref-for-video">video</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/obsolete.html#frame" id="ref-for-frame">frame</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/obsolete.html#frameset" id="ref-for-frameset">frameset</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/input.html#the-input-element" id="ref-for-the-input-element①">input</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element" id="ref-for-the-textarea-element">textarea</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element" id="ref-for-the-select-element">select</a></code> <dd data-md> <p><a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display④①">display: contents</a> computes to <span class="css" id="ref-for-propdef-display④②">display: none</span>.</p> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element" id="ref-for-the-legend-element①">legend</a></code> <dd data-md> <p>Per HTML, a <code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element" id="ref-for-the-legend-element②">legend</a></code> with <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display④③">display: contents</a> is not a <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend" id="ref-for-rendered-legend">rendered legend</a>, so it does not have magical display behavior. (Thus, it reacts to <span class="css" id="ref-for-propdef-display④④">display: contents</span> normally.)</p> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element" id="ref-for-the-button-element">button</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element" id="ref-for-the-details-element">details</a></code> <dt data-md><code><a data-link-type="element" href="https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element" id="ref-for-the-fieldset-element①">fieldset</a></code> <dd data-md> <p>These elements don’t have any special behavior; <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display④⑤">display: contents</a> simply removes their <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box①①">principal box</a>, and their contents render as normal.</p> <dt data-md>any other HTML element <dd data-md> <p>Behaves as normal for <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display④⑥">display: contents</a>.</p> </dl> <h3 class="heading settled" id="unbox-svg"><span class="content">SVG Elements</span><a class="self-link" href="#unbox-svg"></a></h3> <dl> <dt data-md>An <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/struct.html#elementdef-svg" id="ref-for-elementdef-svg">svg</a></code> element that has CSS box layout (this includes all <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/struct.html#elementdef-svg" id="ref-for-elementdef-svg①">svg</a></code> whose parent is an HTML element, as well as document root elements) <dd data-md> <p><a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display④⑦">display: contents</a> computes to <span class="css" id="ref-for-propdef-display④⑧">display: none</span>.</p> <dt data-md>All other SVG <a data-link-type="dfn" href="https://www.w3.org/TR/SVG2/struct.html#container-element" id="ref-for-container-element">container elements</a> that are also <a data-link-type="dfn" href="https://www.w3.org/TR/SVG2/render.html#TermRenderableElement" id="ref-for-TermRenderableElement">renderable elements</a> <dt data-md>SVG <a data-link-type="dfn" href="https://svgwg.org/svg2-draft/text.html#TermTextContentChildElement" id="ref-for-TermTextContentChildElement">text content child elements</a> <dt data-md><code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/struct.html#elementdef-use" id="ref-for-elementdef-use">use</a></code> <dd data-md> <p><a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display④⑨">display: contents</a> strips the element from the formatting tree, and hoists its contents up to display in its place. These contents include the shadow-DOM content for <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/struct.html#elementdef-use" id="ref-for-elementdef-use①">use</a></code>.</p> <dt data-md>any other SVG elements <dd data-md> <p><a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑤⓪">display: contents</a> computes to <span class="css" id="ref-for-propdef-display⑤①">display: none</span>.</p> </dl> <div class="note" role="note"> The intention here is that the <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑤②">display: none</a> behavior applies whenever the "rendering context" inside the element is different than the context outside of it. If the element’s child elements would not be valid children of the element’s parent, you cannot simply hoist them up the formatting tree. <p>For example, text content and text formatting elements in SVG require a <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/text.html#elementdef-text" id="ref-for-elementdef-text">text</a></code> element context; if you remove a <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/text.html#elementdef-text" id="ref-for-elementdef-text①">text</a></code>, its child text content and elements are no longer valid. For that reason, <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑤③">display: contents</a> on <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/text.html#elementdef-text" id="ref-for-elementdef-text②">text</a></code> prevents the entire text element from being rendered. In contrast, any valid content inside a <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/text.html#elementdef-tspan" id="ref-for-elementdef-tspan">tspan</a></code> or <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/text.html#elementdef-textPath" id="ref-for-elementdef-textPath">textPath</a></code> is also valid content inside the parent text formatting context, so the hoisting behavior applies for these elements.</p> <p>Similarly, if hoisting would convert the children from <a data-link-type="dfn" href="https://www.w3.org/TR/SVG2/render.html#TermNonRenderedElement" id="ref-for-TermNonRenderedElement">non-rendered elements</a> (e.g., a shape inside a <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/pservers.html#elementdef-pattern" id="ref-for-elementdef-pattern">pattern</a></code> or <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/struct.html#elementdef-symbol" id="ref-for-elementdef-symbol">symbol</a></code>) to <a data-link-type="dfn" href="https://www.w3.org/TR/SVG2/render.html#TermRenderedElement" id="ref-for-TermRenderedElement">rendered elements</a> (e.g., a shape that is a direct child of the <code><a data-link-type="element" href="https://www.w3.org/TR/SVG2/struct.html#elementdef-svg" id="ref-for-elementdef-svg②">svg</a></code>), that is an invalid change of rendering context. Never-rendered container elements therefore cannot be "un-boxed" by <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑤④">display: contents</a>.</p> </div> <p>When an element is stripped from the formatting tree, then any SVG attributes on that element that control layout and visual formatting are ignored when rendering the contents. However, SVG <a data-link-type="dfn" href="https://www.w3.org/TR/SVG2/styling.html#TermPresentationAttribute" id="ref-for-TermPresentationAttribute">presentation attributes</a>—which map to CSS properties—continue to affect value processing and inheritance <a data-link-type="biblio" href="#biblio-css-cascade-3" title="CSS Cascading and Inheritance Level 3">[CSS-CASCADE-3]</a>; thus such attributes can affect the layout and visual formatting of the element’s descendants by influencing the values of such properties on those descendants.</p> <h3 class="heading settled" id="unbox-mathml"><span class="content">MathML Elements</span><a class="self-link" href="#unbox-mathml"></a></h3> <p>For all MathML elements, <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑤⑤">display: contents</a> computes to <span class="css" id="ref-for-propdef-display⑤⑥">display: none</span>.</p> <h2 class="no-num heading settled" id="box-guidelines"><span class="content"> Appendix C: Box Construction Guidelines for Spec Authors</span><a class="self-link" href="#box-guidelines"></a></h2> <p><em>This section is non-normative guidance for specification authors.</em></p> <ul> <li data-md> <p>A box cannot be <a data-link-type="dfn" href="#blockify" id="ref-for-blockify⑧">blockified</a> and <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify⑦">inlinified</a> at the same time; if such a thing would occur, define which wins over the other.</p> <li data-md> <p>Non-principal non-anonymous boxes can’t be <a data-link-type="dfn" href="#blockify" id="ref-for-blockify⑨">blockified</a>: blockification affects the element’s computed values and thus determines the type of its <a data-link-type="dfn" href="#principal-box" id="ref-for-principal-box①②">principal box</a>.</p> <li data-md> <p>Boxes which <a data-link-type="dfn" href="#blockify" id="ref-for-blockify①⓪">blockify</a> their contents can’t directly contain <a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level⑦">inline-level</a> content; any boxes or text sequences generated within such an element must be <span id="ref-for-blockify①①">blockified</span> or wrapped in an <a data-link-type="dfn">anonymous</a> <a data-link-type="dfn" href="#block-container" id="ref-for-block-container①⑥">block container</a>.</p> <li data-md> <p>Boxes which <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify⑧">inlinify</a> their contents can’t directly contain <a data-link-type="dfn" href="#block-level" id="ref-for-block-level⑦">block-level</a> boxes; any boxes generated within such an element must be <a data-link-type="dfn" href="#inline-level" id="ref-for-inline-level⑧">inline-level</a>.</p> <li data-md> <p>Boxes that fundamentally cannot establish an <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context⑥">independent formatting context</a> (such as non-replaced inlines) must not be asked to <a data-link-type="dfn" href="#establish-an-independent-formatting-context" id="ref-for-establish-an-independent-formatting-context⑤">establish an independent formatting context</a>. Blockify them first, or otherwise change their box type to one that can establish an <span id="ref-for-independent-formatting-context⑦">independent formatting context</span>.</p> </ul> <h2 class="no-num heading settled" id="acknowledgments"><span class="content"> Acknowledgments</span><a class="self-link" href="#acknowledgments"></a></h2> <p>We would like to thank the many people who have attempted to separate out the disparate details of box generation over the years, most particularly Bert Bos, whose last attempt with <a class="property css" data-link-type="property">display-model</a> and <span class="property">display-role</span> didn’t get anywhere, but primed us for the current spec; Anton Prowse, whose relentless assault on CSS2.1 Chapter 9 forced some order out of the chaos; and Oriol Brufau, who teased apart dozens of fine distinctions and errors in this spec. Honorable mentions also go to David Baron, Mats Palmgren, Ilya Streltsyn, and Boris Zbarsky for their feedback.</p> <h2 class="no-num heading settled" id="changes"><span class="content"> Changes</span><a class="self-link" href="#changes"></a></h2> <h3 class="heading settled" id="changes-2020"><span class="content"> Changes Since 2023 Candidate Recommendation Snapshot</span><a class="self-link" href="#changes-2020"></a></h3> <p>Changes since the <a href="https://www.w3.org/TR/2023/CR-css-display-3-20230330/">30 March 2023 Candidate Recommendation Snapshot</a> include:</p> <ul> <li id="change-icb-definition"><a class="self-link" href="#change-icb-definition"></a> Inlined the CSS2.1 definition of the <a data-link-type="dfn" href="#initial-containing-block" id="ref-for-initial-containing-block④">initial containing block</a> for <a data-link-type="dfn" href="https://www.w3.org/TR/mediaqueries-5/#continuous-media" id="ref-for-continuous-media①">continuous media</a>, cross-referenced its <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#writing-mode" id="ref-for-writing-mode">writing mode</a> propagation as defined in <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a>, and clarified that it refers to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-values-4/#small-viewport-size" id="ref-for-small-viewport-size①">small viewport size</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/6453">Issue 6453</a>) </ul> <h3 class="heading settled" id="changes-2020①"><span class="content"> Changes Since 2020 Candidate Recommendation</span><a class="self-link" href="#changes-2020①"></a></h3> <p>A <a href="https://drafts.csswg.org/css-display-3/issues-cr-2020">Disposition of Comments</a> since the <a href="https://www.w3.org/TR/2020/CR-css-display-3-20200519/">19 May 2020 Candidate Recommendation</a> is available.</p> <p>Changes since the <a href="https://www.w3.org/TR/2020/CR-css-display-3-20200519/">19 May 2020 Candidate Recommendation</a> include:</p> <ul> <li id="change-text-run-sequence"><a class="self-link" href="#change-text-run-sequence"></a> Renamed “text run” to “<a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence①⓪">text sequence</a>”. (<a href="https://github.com/w3c/csswg-drafts/issues/7768">Issue 7768</a>) <li id="change-root-layout"><a class="self-link" href="#change-root-layout"></a> Defined <a data-link-type="dfn" href="#root-element" id="ref-for-root-element②">root element</a> and clarified its layout as a <a data-link-type="dfn" href="#block-level" id="ref-for-block-level⑧">block-level</a> in <a href="#root">§ 2.8 The Root Element’s Principal Box</a> and the definition of <a data-link-type="dfn" href="#initial-containing-block" id="ref-for-initial-containing-block⑤">initial containing block</a>. (<a href="https://github.com/w3c/csswg-drafts/pull/8095">PR 8095</a>, <a href="https://github.com/w3c/csswg-drafts/issues/7207">Issue 7207</a>, <a href="https://github.com/w3c/csswg-drafts/issues/6480">Issue 6480</a>, <a href="https://github.com/w3c/csswg-drafts/issues/7786">Issue 7786</a>) <li id="change-move-order"><a class="self-link" href="#change-move-order"></a> Pulled in the <a class="property css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order①⑥">order</a> property definition from <a data-link-type="biblio" href="#biblio-css-flexbox-1" title="CSS Flexible Box Layout Module Level 1">[CSS-FLEXBOX-1]</a>, since it also applies to <a data-link-type="dfn" href="https://www.w3.org/TR/css-grid-2/#grid-item" id="ref-for-grid-item⑤">grid items</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/5865">Issue 5865</a>) <li id="change-import-visibility"><a class="self-link" href="#change-import-visibility"></a> Imported the <a class="property css" data-link-type="property" href="#propdef-visibility" id="ref-for-propdef-visibility⑤">visibility</a> property definition from <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> and updated it to be more thorough and complete. (<a href="https://github.com/w3c/csswg-drafts/issues/6123">Issue 6123</a>) <li id="change-internal-replaced"><a class="self-link" href="#change-internal-replaced"></a> Defined that <a data-link-type="dfn" href="#replaced-element" id="ref-for-replaced-element⑧">replaced elements</a> with a <a data-link-type="dfn" href="#layout-internal" id="ref-for-layout-internal⑤">layout-internal</a> <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑤⑦">display</a> are treated as <span class="css" id="ref-for-propdef-display⑤⑧">display: inline</span>. (<a href="https://github.com/w3c/csswg-drafts/issues/6000">Issue 6000</a>) <li id="change-legacy-computation"> <a class="self-link" href="#change-legacy-computation"></a> Clarified that the <a class="production css" data-link-type="type" href="#typedef-display-legacy" id="ref-for-typedef-display-legacy②"><display-legacy></a> values actually <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#computed-value" id="ref-for-computed-value③">compute</a> to the same value as their two-keyword equivalents. (<a href="https://github.com/w3c/csswg-drafts/issues/5575">Issue 5575</a>) <blockquote> <dl> <dt>inline-… <dd> <del>Behaves as</del> <ins>Computes to</ins> <span class="css">inline …</span>. </dl> <p class="note" role="note"> <ins>Note: Although these keywords and their equivalents compute to the same value, their <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#specified-value" id="ref-for-specified-value①">specified values</a> remain distinct.</ins> </p> <p class="note" role="note"> <ins>Note: The <code class="idl"><a data-link-type="idl" href="https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle" id="ref-for-dom-window-getcomputedstyle②">getComputedStyle()</a></code> serialization rules will always output these precomposed keywords rather than the equivalent two-keyword pairs due to the <a href="https://www.w3.org/TR/cssom-1/#serializing-css-values">shortest, most backwards-compatible serialization principle</a>.</ins> </p> </blockquote> <li id="change-blockification-computed"> <a class="self-link" href="#change-blockification-computed"></a> Clarified that <a data-link-type="dfn" href="#blockify" id="ref-for-blockify①②">blockification</a> and <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify⑨">inlinification</a> are <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#computed-value" id="ref-for-computed-value④">computed value</a> changes. (<a href="https://github.com/w3c/csswg-drafts/issues/6251">Issue 6251</a>) <blockquote> <p> Some layout effects require <a data-link-type="dfn" href="#blockify" id="ref-for-blockify①③">blockification</a> or <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify①⓪">inlinification</a> of the box type, which sets the box’s <ins><a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#computed-value" id="ref-for-computed-value⑤">computed</a></ins> <a data-link-type="dfn" href="#outer-display-type" id="ref-for-outer-display-type①①">outer display type</a> to <a class="css" data-link-type="maybe" href="#valdef-display-block" id="ref-for-valdef-display-block⑨">block</a> or <a class="css" data-link-type="maybe" href="#valdef-display-inline" id="ref-for-valdef-display-inline⑧">inline</a> (respectively). </p> </blockquote> <li id="change-block-layout-def"><a class="self-link" href="#change-block-layout-def"></a> Added definition for <a data-link-type="dfn" href="#block-layout" id="ref-for-block-layout①">block layout</a> to glossary, for convenience. <li id="change-grid-refs"><a class="self-link" href="#change-grid-refs"></a> Updated references to <a href="https://www.w3.org/TR/css-grid/">CSS Grid Layout</a>. <li id="change-2020-editorial"><a class="self-link" href="#change-2020-editorial"></a> Various minor editorial clarifications and cross-linking improvements. </ul> <h3 class="heading settled" id="changes-2019"><span class="content"> Changes Since 2019 Candidate Recommendation</span><a class="self-link" href="#changes-2019"></a></h3> <p>Changes since the <a href="https://www.w3.org/TR/2019/CR-css-display-3-20190711/">11 July 2019 Candidate Recommendation</a> include:</p> <ul> <li id="change-containing-block"><a class="self-link" href="#change-containing-block"></a> Merged in additional prose from <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> into the definition of <a data-link-type="dfn" href="#containing-block" id="ref-for-containing-block①②">containing block</a>. <li id="change-dom-ignore"> <a class="self-link" href="#change-dom-ignore"></a> Clarified that, for the purpose of CSS, DOM nodes other than elements and text are ignored. <blockquote> <p> <ins>(Some source documents start from more complex trees, such as the DOM, which can have comment nodes and other types of things. For the purposes of CSS, all of these additional types of nodes are ignored, as if they didn’t exist.)</ins> </p> </blockquote> <li id="change-abspos-glossary"><a class="self-link" href="#change-abspos-glossary"></a> Improved/moved glossary definitions relating to <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#absolute-position" id="ref-for-absolute-position②">absolute positioning</a>. </ul> <p>Changes since the <a href="https://www.w3.org/TR/2018/CR-css-display-3-20180828/">28 August 2018 Candidate Recommendation</a> include:</p> <ul> <li id="change-parent"><a class="self-link" href="#change-parent"></a> Defined box tree parentage; see <a data-link-type="dfn" href="#css-parent-box" id="ref-for-css-parent-box">parent box</a>. <li id="change-abspos"><a class="self-link" href="#change-abspos"></a> Added definition of <a data-link-type="dfn" href="https://www.w3.org/TR/css-position-3/#absolute-position" id="ref-for-absolute-position③">absolutely positioned</a> to the glossary; <a href="https://www.w3.org/TR/CSS2/visuren.html#absolutely-positioned">copied from CSS2</a> for easier referencing. <li id="change-bidi-fragment"><a class="self-link" href="#change-bidi-fragment"></a> Added cross-references to various forms of fragmentation in <a href="#intro">§ 1 Introduction</a>. <li id="change-table-grid-box"><a class="self-link" href="#change-table-grid-box"></a> Renamed “table box” to “table grid box” to more easily distinguish from “table wrapper box”. <li id="change-body-propagation"><a class="self-link" href="#change-body-propagation"></a> Added “unless otherwise specified” to root → initial containing block propagation, since there are some regrettable special exceptions for 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. </ul> <h3 class="heading settled" id="changes-wd"><span class="content"> Changes Prior to Candidate Recommendation Status</span><a class="self-link" href="#changes-wd"></a></h3> <p>A <a href="https://drafts.csswg.org/css-display-3/issues-wd-2017">Disposition of Comments</a> is available.</p> <p>Changes since the <a href="https://www.w3.org/TR/2018/WD-css-display-3-20180420/">20 April 2018 Working Draft</a> include:</p> <ul> <li> Elements with <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑤⑨">display: contents</a> that behave as <span class="css" id="ref-for-propdef-display⑥⓪">display: none</span> now <em>compute to</em> <span class="css" id="ref-for-propdef-display⑥①">display: none</span>. (<a href="https://github.com/w3c/csswg-drafts/issues/2755">Issue 2755</a>) <li> Distinguished “new” <a data-link-type="dfn" href="#formatting-context" id="ref-for-formatting-context①⑦">formatting context</a> from <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context⑧">independent formatting context</a> since certain formatting contexts layer. (<a href="https://github.com/w3c/csswg-drafts/issues/2597">Issue 2597</a>, <a href="https://github.com/w3c/csswg-drafts/issues/1457">Issue 1457</a>) <li> Defined that <a data-link-type="dfn" href="#block-box" id="ref-for-block-box⑨">block boxes</a> that establish an <a data-link-type="dfn" href="#independent-formatting-context" id="ref-for-independent-formatting-context⑨">independent formatting context</a> have a used <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑥②">display</a> of <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root⑧">flow-root</a>, to provide an easier point of reference. (<a href="https://github.com/w3c/csswg-drafts/issues/1550">Issue 1550</a>) <li> Clarified that <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑥③">display</a> is not animatable (as opposed to discretely animatable). (<a href="https://github.com/w3c/csswg-drafts/issues/2938">Issue 2938</a>) <li> Minor editorial fixes. </ul> <p>Changes since the <a href="https://www.w3.org/TR/2017/WD-css-display-3-20170720/">20 July 2017 Working Draft</a> include:</p> <ul> <li data-md> <p>Tightened up rules for the <a data-link-type="dfn" href="#blockify" id="ref-for-blockify①④">blockification</a> of <a class="css" data-link-type="maybe" href="#valdef-display-inline-block" id="ref-for-valdef-display-inline-block②">inline-block</a> / <span class="css">inline flow-root</span> to ensure compatibility with CSS2. (<a href="https://github.com/w3c/csswg-drafts/issues/1246">Issue 1246</a>) Updated handling of <span class="css">run-in flow-root</span> to match. (<a href="https://github.com/w3c/csswg-drafts/issues/1715">Issue 1715</a>)</p> <li data-md> <p>Adjusted grammar of <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑥④">display</a> to list the <a class="css" data-link-type="maybe" href="#valdef-display-list-item" id="ref-for-valdef-display-list-item⑤">list-item</a> keyword last. This affects the expected serialization order. (<a href="https://github.com/w3c/csswg-drafts/issues/1621">Issue 1621</a>)</p> <li data-md> <p>Added better definition of interaction between <a data-link-type="dfn" href="#block-formatting-context" id="ref-for-block-formatting-context②⑥">block formatting contexts</a> and <a data-link-type="dfn" href="#inline-formatting-context" id="ref-for-inline-formatting-context⑨">inline formatting contexts</a> in block containers that establish inline formatting contexts. (<a href="https://github.com/w3c/csswg-drafts/issues/1553">Issue 1553</a>)</p> <li data-md> <p>More clearly defined the way property values are reflected between an element and its boxes (in the case of an element generating multiple boxes). (<a href="https://github.com/w3c/csswg-drafts/issues/1643">Issue 1643</a>)</p> <li data-md> <p>Clarified that empty text objects are ignored for CSS rendering. (<a href="https://github.com/w3c/csswg-drafts/issues/1808">Issue 1808</a>)</p> <li data-md> <p>Clarified that <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑥⑤">display</a> has no effect on document semantics, since this is a common bug in UAs. (<a href="https://github.com/w3c/csswg-drafts/issues/2355">Issue 2355</a>)</p> <li data-md> <p>Fixed error in definition of <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑥⑥">display</a>’s <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/cascade.html#computed-value" id="ref-for-computed-value⑥">computed value</a> (which is definitely not “as specified”, due to <a data-link-type="dfn" href="#blockify" id="ref-for-blockify①⑤">blockification</a> and <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify①①">inlinification</a> rules triggered by various properties). (<a href="https://github.com/w3c/csswg-drafts/issues/1716">Issue 1716</a>)</p> <li data-md> <p>Added definition for <a data-link-type="dfn" href="#document-order" id="ref-for-document-order">document order</a>.</p> <li data-md> <p>Added missing SVG elements to <a href="#unbox">Appendix B</a>’s details on <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑥⑦">display: contents</a> (<a href="https://github.com/w3c/csswg-drafts/issues/2118">Issue 2118</a>), clarified effect of SVG attributes (<a href="https://github.com/w3c/csswg-drafts/issues/2502">Issue 2502</a>), and defined behavior for MathML (<a href="https://github.com/w3c/csswg-drafts/issues/2167">Issue 2167</a>).</p> <li data-md> <p>Added some <a href="#box-guidelines">guidance</a> to future spec authors of anonymous box construction rules. (<a href="https://github.com/w3c/csswg-drafts/issues/1643">Issue 1643</a>)</p> <li data-md> <p>Pushed the section about “becoming a formatting context” back to <a href="https://www.w3.org/TR/css-contain-1/">CSS Containment</a> where it is used.</p> <li data-md> <p>Various minor wording fixes and clarifications.</p> </ul> <p>Changes since the <a href="https://www.w3.org/TR/2017/WD-css-display-3-20170126/">26 January 2017 Working Draft</a> include:</p> <ul> <li data-md> <p>Remove <span class="css">inline-list-item</span> value that is equivalent to <span class="css">inline list-item</span>.</p> <li data-md> <p>Added the notion of “<a data-link-type="dfn" href="#text-nodes" id="ref-for-text-nodes⑥">text nodes</a>” to the <a data-link-type="dfn" href="#element-tree" id="ref-for-element-tree②">element tree</a>, and “<a data-link-type="dfn" href="#css-text-sequence" id="ref-for-css-text-sequence①①">text runs</a>” to the <a data-link-type="dfn" href="#box-tree" id="ref-for-box-tree⑨">box tree</a> to define behavior in the context of <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑥⑧">display: contents</a>. (<a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-19">Issue 19</a>, <a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-32">Issue 32</a>)</p> <li data-md> <p>Defined that the root element is “in flow”. (<a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-3">Issue 3</a>)</p> <li data-md> <p>Defined interaction of <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-line" id="ref-for-selectordef-first-line">::first-line</a>/<a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter" id="ref-for-selectordef-first-letter②">::first-letter</a> and <a class="css" data-link-type="maybe" href="#valdef-display-run-in" id="ref-for-valdef-display-run-in⑤">run-in</a>. (<a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-5">Issue 5</a>, <a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-42">Issue 42</a>)</p> <li data-md> <p>Clarified that block/inline/run-in only dictates behavior in <a data-link-type="dfn" href="#flow-layout" id="ref-for-flow-layout⑥">flow layout</a>; it is ignored in other contexts.</p> <li data-md> <p>Run-ins are a type of inline box, not just "like" an inline box.</p> <li data-md> <p>Fixed the lack of recursion in of run-in’s box-tree munging. (<a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-45">Issue 45</a>)</p> <li data-md> <p>Added an appendix on how <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑥⑨">display: contents</a> works on “unusual elements”. (<a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-8">Issue 8</a>, <a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-18">Issue 18</a>)</p> <li data-md> <p>Fix <a data-link-type="dfn" href="#blockify" id="ref-for-blockify①⑥">blockification</a> and <a data-link-type="dfn" href="#inlinify" id="ref-for-inlinify①②">inlinification</a> rules, particularly handling of layout-internal types. (<a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-35">Issue 35</a>, <a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-57">Issue 57</a>)</p> <li data-md> <p>Clarified interaction of various box tree fixups. (<a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-38">Issue 38</a>, <a href="https://drafts.csswg.org/css-display-3/issues-wd-2017#issue-48">Issue 48</a>)</p> <li data-md> <p>Added the definition of “becoming a formatting context”.</p> <li data-md> <p>Miscellaneous minor fixes and minor clarifications.</p> </ul> <p>A <a href="https://drafts.csswg.org/css-display-3/issues-wd-2017">Disposition of Comments</a> is also available.</p> <p>Changes since the <a href="https://www.w3.org/TR/2015/WD-css-display-3-20151015/">15 October 2015 Working Draft</a> include:</p> <ul> <li>Deferred the <span class="css">box-suppress/display-or-not</span> property to the next level of Display, in order to provide time for further discussion of use cases. <li>Specified the effects of <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑦⓪">display: contents</a> on unusual elements such as replaced elements and form controls. <li>Clarified that an element’s <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-before" id="ref-for-selectordef-before②">::before</a> and <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-after" id="ref-for-selectordef-after①">::after</a> pseudo-elements still exist if its own box is not generated due to <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑦①">display: contents</a>. <li>Clarified that event bubbling is not affected by <a class="css" data-link-type="propdesc" href="#propdef-display" id="ref-for-propdef-display⑦②">display: contents</a>. <li>Clarified interaction of run-ins with out-of-flow elements and <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter" id="ref-for-selectordef-first-letter③">::first-letter</a>. <li>Switched <span class="css">table-caption</span> and <span class="css">table-cell</span> to use <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root⑨">flow-root</a> as their <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①⑧">inner display type</a>, since they always form a formatting context root. <li>Closed off remaining issues and added at-risk list. </ul> <p>Changes since the <a href="https://www.w3.org/TR/2015/WD-css-display-3-20150721/">21 July 2015 Working Draft</a> include:</p> <ul> <li>Added definitions for <a data-link-type="dfn" href="#in-flow" id="ref-for-in-flow①">in-flow</a> and <a data-link-type="dfn" href="#out-of-flow" id="ref-for-out-of-flow④">out-of-flow</a> to glossary. </ul> <p>Changes since the <a href="https://www.w3.org/TR/2014/WD-css-display-3-20140911/">11 September 2014 Working Draft</a> include:</p> <ul> <li>Removed <span class="css">display-inside</span>, <span class="css">display-outside</span>, and <span class="css">display-extras</span> longhands, in favor of just making <a class="property css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑦③">display</a> multi-value. (This was done to impose constraints on what can be combined. Future levels of this specification may relax some or all of those restrictions if they become unnecessary or unwanted.) <li>Created the <a class="css" data-link-type="maybe" href="#valdef-display-flow" id="ref-for-valdef-display-flow⑨">flow</a> and <a class="css" data-link-type="maybe" href="#valdef-display-flow-root" id="ref-for-valdef-display-flow-root①⓪">flow-root</a> <a data-link-type="dfn" href="#inner-display-type" id="ref-for-inner-display-type①⑨">inner display types</a> to better express flow layout <a data-link-type="dfn" href="#display-type" id="ref-for-display-type③">display types</a> and to create an explicit switch for making an element a <a data-link-type="dfn" href="#bfc" id="ref-for-bfc①">BFC</a> root. (This should eliminate the need for hacks like <span class="css">::after { clear: both; }</span> and <a class="css" data-link-type="propdesc">overflow: hidden</a> that are intended to accomplish this purpose.) </ul> <h2 class="no-num heading settled" id="priv"><span class="content"> Privacy Considerations</span><a class="self-link" href="#priv"></a></h2> <p>This specification introduces no new privacy considerations.</p> <h3 class="no-num heading settled" id="sec"><span class="content"> Security Considerations</span><a class="self-link" href="#sec"></a></h3> <p>This specification introduces no new security considerations.</p> <h3 class="no-num heading settled" id="security-privacy-self-review"><span class="content"> Self-Review Questionnaire</span><a class="self-link" href="#security-privacy-self-review"></a></h3> <p>Per the <a href="https://www.w3.org/TR/security-privacy-questionnaire/#questions"> Self-Review Questionnaire: Security and Privacy: Questions to Consider</a></p> <ol> <li> Does this specification deal with personally-identifiable information? <p>No. </p> <li> Does this specification deal with high-value data? <p>No. </p> <li> Does this specification introduce new state for an origin that persists across browsing sessions? <p>No. </p> <li> Does this specification expose persistent, cross-origin state to the web? <p>No. </p> <li> Does this specification expose any other data to an origin that it doesn’t currently have access to? <p>No. </p> <li> Does this specification enable new script execution/loading mechanisms? <p>No. </p> <li> Does this specification allow an origin access to a user’s location? <p>No. </p> <li> Does this specification allow an origin access to sensors on a user’s device? <p>No. </p> <li> Does this specification allow an origin access to aspects of a user’s local computing environment? <p>No. </p> <li> Does this specification allow an origin access to other devices? <p>No. </p> <li> Does this specification allow an origin some measure of control over a user agent’s native UI? <p>No. </p> <li> Does this specification expose temporary identifiers to the web? <p>No. </p> <li> Does this specification distinguish between behavior in first-party and third-party contexts? <p>No. </p> <li> How should this specification work in the context of a user agent’s "incognito" mode? <p>No differently. </p> <li> Does this specification persist data to a user’s local device? <p>No. </p> <li> Does this specification have a "Security Considerations" and "Privacy Considerations" section? <p>Yes. </p> <li> Does this specification allow downgrading default security characteristics? <p>No. </p> </ol> </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><strong class="advisement"></code>, like this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong></p> <h3 class="no-ref heading settled" id="w3c-conformance-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#w3c-conformance-classes"></a></h3> <p>Conformance to this specification is defined for three conformance classes: </p> <dl> <dt>style sheet <dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS style sheet</a>. <dt>renderer <dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders documents that use them. <dt>authoring tool <dd>A <a href="https://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a> that writes a style sheet. </dl> <p>A style sheet is conformant to this specification if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module. </p> <p>A renderer is conformant to this specification if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by this specification by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.) </p> <p>An authoring tool is conformant to this specification if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module. </p> <h3 class="no-ref heading settled" id="w3c-partial"><span class="content"> Partial implementations</span><a class="self-link" href="#w3c-partial"></a></h3> <p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers <strong>must</strong> treat as invalid (and <a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignore as appropriate</a>) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents <strong>must not</strong> selectively ignore unsupported component values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored.</p> <h4 class="heading settled" id="w3c-conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#w3c-conform-future-proofing"></a></h4> <p>To avoid clashes with future stable CSS features, the CSSWG recommends <a href="https://www.w3.org/TR/CSS/#future-proofing">following best practices</a> for the implementation of <a href="https://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="https://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p> <h3 class="no-ref heading settled" id="w3c-testing"><span class="content"> Non-experimental implementations</span><a class="self-link" href="#w3c-testing"></a></h3> <p>Once a specification reaches the Candidate Recommendation stage, non-experimental implementations are possible, and implementors should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec. </p> <p>To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group. </p> <p>Further information on submitting testcases and implementation reports can be found from on the CSS Working Group’s website at <a href="https://www.w3.org/Style/CSS/Test/">https://www.w3.org/Style/CSS/Test/</a>. Questions should be directed to the <a href="https://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list.</p> <h3 class="no-ref heading settled" id="w3c-cr-exit-criteria"><span class="content"> CR exit criteria</span><a class="self-link" href="#w3c-cr-exit-criteria"></a></h3> <p> For this specification to be advanced to Proposed Recommendation, there must be at least two independent, interoperable implementations of each feature. Each feature may be implemented by a different set of products, there is no requirement that all features be implemented by a single product. For the purposes of this criterion, we define the following terms: </p> <dl> <dt>independent <dd>each implementation must be developed by a different party and cannot share, reuse, or derive from code used by another qualifying implementation. Sections of code that have no bearing on the implementation of this specification are exempt from this requirement. <dt>interoperable <dd>passing the respective test case(s) in the official CSS test suite, or, if the implementation is not a Web browser, an equivalent test. Every relevant test in the test suite should have an equivalent test created if such a user agent (UA) is to be used to claim interoperability. In addition if such a UA is to be used to claim interoperability, then there must one or more additional UAs which can also pass those equivalent tests in the same way for the purpose of interoperability. The equivalent tests must be made publicly available for the purposes of peer review. <dt>implementation <dd> a user agent which: <ol class="inline"> <li>implements the specification. <li>is available to the general public. The implementation may be a shipping product or other publicly available version (i.e., beta version, preview release, or "nightly build"). Non-shipping product releases must have implemented the feature(s) for a period of at least one month in order to demonstrate stability. <li>is not experimental (i.e., a version specifically designed to pass the test suite and is not intended for normal usage going forward). </ol> </dl> <p>The specification will remain Candidate Recommendation for at least six months.</p> <script src="https://www.w3.org/scripts/TR/2021/fixup.js"></script> <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2> <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3> <ul class="index"> <li><a href="#anonymous">anonymous</a><span>, in § 1</span> <li><a href="#anonymous">anonymous box</a><span>, in § 1</span> <li><a href="#atomic-inline">atomic inline</a><span>, in § Unnumbered section</span> <li><a href="#atomic-inline">atomic inline box</a><span>, in § Unnumbered section</span> <li><a href="#bfc">BFC</a><span>, in § Unnumbered section</span> <li> block <ul> <li><a href="#block">definition of</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-block">value for display, <display-outside></a><span>, in § 2.1</span> </ul> <li><a href="#block-box">block box</a><span>, in § Unnumbered section</span> <li><a href="#block-container">block container</a><span>, in § Unnumbered section</span> <li><a href="#block-container">block container box</a><span>, in § Unnumbered section</span> <li><a href="#block-formatting-context">block formatting context</a><span>, in § Unnumbered section</span> <li><a href="#block-formatting-context-root">block formatting context root</a><span>, in § Unnumbered section</span> <li><a href="#blockify">blockification</a><span>, in § 2.7</span> <li><a href="#blockify">blockify</a><span>, in § 2.7</span> <li><a href="#block-layout">block layout</a><span>, in § Unnumbered section</span> <li><a href="#block-level">block-level</a><span>, in § Unnumbered section</span> <li><a href="#block-level-box">block-level box</a><span>, in § 2.1</span> <li><a href="#block-level">block-level content</a><span>, in § Unnumbered section</span> <li><a href="#box">box</a><span>, in § 1</span> <li><a href="#box-tree">box tree</a><span>, in § 1</span> <li><a href="#valdef-visibility-collapse">collapse</a><span>, in § 4</span> <li><a href="#collapsed">collapsed</a><span>, in § 4</span> <li><a href="#containing-block">containing block</a><span>, in § Unnumbered section</span> <li><a href="#containing-block-chain">containing block chain</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-contents">contents</a><span>, in § 2.5</span> <li><a href="#propdef-display">display</a><span>, in § 2</span> <li><a href="#typedef-display-box"><display-box></a><span>, in § 2</span> <li><a href="#typedef-display-inside"><display-inside></a><span>, in § 2</span> <li><a href="#typedef-display-internal"><display-internal></a><span>, in § 2</span> <li><a href="#typedef-display-legacy"><display-legacy></a><span>, in § 2</span> <li><a href="#typedef-display-listitem"><display-listitem></a><span>, in § 2</span> <li><a href="#typedef-display-outside"><display-outside></a><span>, in § 2</span> <li><a href="#display-type">display type</a><span>, in § 2</span> <li><a href="#document-order">document order</a><span>, in § Unnumbered section</span> <li><a href="#elements">element</a><span>, in § 1</span> <li><a href="#element-tree">element tree</a><span>, in § 1</span> <li><a href="#establish-an-independent-formatting-context">establish an independent formatting context</a><span>, in § Unnumbered section</span> <li><a href="#establish-an-independent-formatting-context">established an independent formatting context</a><span>, in § Unnumbered section</span> <li><a href="#establish-an-independent-formatting-context">establishes an independent formatting context</a><span>, in § Unnumbered section</span> <li><a href="#establish-an-independent-formatting-context">establishing an independent formatting context</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-flex">flex</a><span>, in § 2.2</span> <li><a href="#valdef-display-flow">flow</a><span>, in § 2.2</span> <li><a href="#flow-layout">flow layout</a><span>, in § 2.2</span> <li><a href="#valdef-display-flow-root">flow-root</a><span>, in § 2.2</span> <li><a href="#formatting-context">formatting context</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-grid">grid</a><span>, in § 2.2</span> <li><a href="#valdef-visibility-hidden">hidden</a><span>, in § 4</span> <li><a href="#independent-formatting-context">independent formatting context</a><span>, in § Unnumbered section</span> <li><a href="#in-flow">in flow</a><span>, in § Unnumbered section</span> <li><a href="#in-flow">in-flow</a><span>, in § Unnumbered section</span> <li><a href="#initial-containing-block">initial containing block</a><span>, in § Unnumbered section</span> <li> inline <ul> <li><a href="#inline">definition of</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-inline">value for display, <display-outside></a><span>, in § 2.1</span> </ul> <li><a href="#inline-block">inline block</a><span>, in § 2</span> <li><a href="#valdef-display-inline-block">inline-block</a><span>, in § 2.6</span> <li><a href="#inline-block">inline block box</a><span>, in § 2</span> <li><a href="#inline-box">inline box</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-inline-flex">inline-flex</a><span>, in § 2.6</span> <li><a href="#inline-formatting-context">inline formatting context</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-inline-grid">inline-grid</a><span>, in § 2.6</span> <li><a href="#inline-level">inline-level</a><span>, in § Unnumbered section</span> <li><a href="#inline-level-box">inline-level box</a><span>, in § 2.1</span> <li><a href="#inline-level">inline-level content</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-inline-table">inline-table</a><span>, in § 2.6</span> <li><a href="#inlinify">inlinification</a><span>, in § 2.7</span> <li><a href="#inlinify">inlinify</a><span>, in § 2.7</span> <li><a href="#inner-display-type">inner</a><span>, in § 2</span> <li><a href="#inner-display-type">inner display type</a><span>, in § 2</span> <li><a href="#valdef-order-integer"><integer></a><span>, in § 3</span> <li><a href="#internal-ruby-box">internal ruby box</a><span>, in § 2.4</span> <li><a href="#internal-ruby-element">internal ruby element</a><span>, in § 2.4</span> <li><a href="#internal-table-box">internal table box</a><span>, in § 2.4</span> <li><a href="#internal-table-element">internal table element</a><span>, in § 2.4</span> <li><a href="#invisible">Invisible</a><span>, in § 4</span> <li><a href="#layout-internal">layout-internal</a><span>, in § 2.4</span> <li><a href="#valdef-display-list-item">list-item</a><span>, in § 2.3</span> <li><a href="#valdef-display-none">none</a><span>, in § 2.5</span> <li><a href="#non-replaced">non-replaced</a><span>, in § Unnumbered section</span> <li><a href="#non-replaced">non-replaced element</a><span>, in § Unnumbered section</span> <li><a href="#propdef-order">order</a><span>, in § 3</span> <li><a href="#order-modified-document-order">order-modified document order</a><span>, in § 3</span> <li><a href="#outer-display-type">outer</a><span>, in § 2</span> <li><a href="#outer-display-type">outer display type</a><span>, in § 2</span> <li><a href="#out-of-flow">out of flow</a><span>, in § Unnumbered section</span> <li><a href="#out-of-flow">out-of-flow</a><span>, in § Unnumbered section</span> <li><a href="#css-parent-box">parent box</a><span>, in § 1</span> <li><a href="#principal-box">principal box</a><span>, in § Unnumbered section</span> <li><a href="#replaced-element">replaced</a><span>, in § Unnumbered section</span> <li><a href="#replaced-element">replaced element</a><span>, in § Unnumbered section</span> <li><a href="#root-element">root element</a><span>, in § Unnumbered section</span> <li><a href="#valdef-display-ruby">ruby</a><span>, in § 2.2</span> <li><a href="#valdef-display-ruby-base">ruby-base</a><span>, in § 2.4</span> <li><a href="#valdef-display-ruby-base-container">ruby-base-container</a><span>, in § 2.4</span> <li><a href="#valdef-display-ruby-text">ruby-text</a><span>, in § 2.4</span> <li><a href="#valdef-display-ruby-text-container">ruby-text-container</a><span>, in § 2.4</span> <li> run-in <ul> <li><a href="#run-in">definition of</a><span>, in § 5</span> <li><a href="#valdef-display-run-in">value for display, <display-outside></a><span>, in § 2.1</span> </ul> <li><a href="#run-in">run-in box</a><span>, in § 5</span> <li><a href="#run-in-sequence">run-in sequence</a><span>, in § 5</span> <li><a href="#valdef-display-table">table</a><span>, in § 2.2</span> <li><a href="#valdef-display-table-caption">table-caption</a><span>, in § 2.4</span> <li><a href="#table-caption-box">table caption box</a><span>, in § 2.4</span> <li><a href="#valdef-display-table-cell">table-cell</a><span>, in § 2.4</span> <li><a href="#valdef-display-table-column">table-column</a><span>, in § 2.4</span> <li><a href="#valdef-display-table-column-group">table-column-group</a><span>, in § 2.4</span> <li><a href="#valdef-display-table-footer-group">table-footer-group</a><span>, in § 2.4</span> <li><a href="#valdef-display-table-header-group">table-header-group</a><span>, in § 2.4</span> <li><a href="#valdef-display-table-row">table-row</a><span>, in § 2.4</span> <li><a href="#valdef-display-table-row-group">table-row-group</a><span>, in § 2.4</span> <li><a href="#text-nodes">text node</a><span>, in § 1</span> <li><a href="#css-text-sequence">text sequence</a><span>, in § 1</span> <li><a href="#propdef-visibility">visibility</a><span>, in § 4</span> <li><a href="#valdef-visibility-visible">visible</a><span>, in § 4</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="fde954ee">align-content</span> </ul> <li> <a data-link-type="biblio">[CSS-BOX-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="60669dde">box edge</span> </ul> <li> <a data-link-type="biblio">[CSS-BREAK-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="62c772f5">fragment</span> </ul> <li> <a data-link-type="biblio">[CSS-BREAK-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="d65c0e81">box fragment</span> <li><span class="dfn-paneled" id="04004305">fragmentation</span> </ul> <li> <a data-link-type="biblio">[CSS-CASCADE-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="cbeb753c">inheritance</span> <li><span class="dfn-paneled" id="fdef2996">inherited property</span> </ul> <li> <a data-link-type="biblio">[CSS-CONTAIN-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="5dfeee7f">contain</span> </ul> <li> <a data-link-type="biblio">[CSS-FLEXBOX-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="cc7f0a64">flex container</span> <li><span class="dfn-paneled" id="31765884">flex formatting context</span> <li><span class="dfn-paneled" id="9f6d5ab0">flex item</span> <li><span class="dfn-paneled" id="07e702cf">flex layout</span> </ul> <li> <a data-link-type="biblio">[CSS-GRID-2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="df72a52c">grid container</span> <li><span class="dfn-paneled" id="6f8683f4">grid formatting context</span> <li><span class="dfn-paneled" id="ba30fc9a">grid item</span> <li><span class="dfn-paneled" id="bbc693a1">subgrid</span> <li><span class="dfn-paneled" id="e25926df">subgrid <small>(for grid-template-rows)</small></span> </ul> <li> <a data-link-type="biblio">[CSS-IMAGES-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="487e1aa9">natural dimension</span> </ul> <li> <a data-link-type="biblio">[CSS-INLINE-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="8af3edff">root inline box</span> </ul> <li> <a data-link-type="biblio">[CSS-OVERFLOW-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a3cabdb1">scroll container</span> </ul> <li> <a data-link-type="biblio">[CSS-POSITION-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="4cf3c57e">absolute position</span> <li><span class="dfn-paneled" id="d9b71dda">absolutely position</span> </ul> <li> <a data-link-type="biblio">[CSS-PSEUDO-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="70503bd6">::after</span> <li><span class="dfn-paneled" id="7c6f51b7">::before</span> <li><span class="dfn-paneled" id="63b59bd9">::first-letter</span> <li><span class="dfn-paneled" id="4bda66a9">::first-line</span> <li><span class="dfn-paneled" id="b6b63ba4">::marker</span> <li><span class="dfn-paneled" id="99a0ef70">first formatted line</span> </ul> <li> <a data-link-type="biblio">[CSS-RUBY-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="153743a1">ruby base container</span> <li><span class="dfn-paneled" id="be5da72e">ruby container</span> <li><span class="dfn-paneled" id="470cd324">ruby formatting context</span> </ul> <li> <a data-link-type="biblio">[CSS-SPEECH-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="6cb2de13">always</span> </ul> <li> <a data-link-type="biblio">[CSS-TABLES-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="28f05b35">table grid box</span> <li><span class="dfn-paneled" id="1b178ec1">table wrapper box</span> </ul> <li> <a data-link-type="biblio">[CSS-TEXT-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ba466582">white space</span> </ul> <li> <a data-link-type="biblio">[CSS-UI-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="73bc6606">pointer-events</span> </ul> <li> <a data-link-type="biblio">[CSS-VALUES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="bdb4e757">&&</span> <li><span class="dfn-paneled" id="d73c993d"><integer></span> <li><span class="dfn-paneled" id="d4441b24">?</span> <li><span class="dfn-paneled" id="8a110a7b">CSS-wide keywords</span> <li><span class="dfn-paneled" id="a959f189">small viewport size</span> <li><span class="dfn-paneled" id="4eb9d37e">|</span> <li><span class="dfn-paneled" id="a0336d84">||</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="953ffdad">principal writing mode</span> <li><span class="dfn-paneled" id="eb6008ce">writing mode</span> </ul> <li> <a data-link-type="biblio">[CSS2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ef28f956">border</span> <li><span class="dfn-paneled" id="ab2f3e73">computed value</span> <li><span class="dfn-paneled" id="000546c6">overflow</span> <li><span class="dfn-paneled" id="dc76e65c">position</span> <li><span class="dfn-paneled" id="f409a95c">speak</span> <li><span class="dfn-paneled" id="9ce36abc">specified value</span> </ul> <li> <a data-link-type="biblio">[CSS22]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="0570259e">float</span> </ul> <li> <a data-link-type="biblio">[CSSOM]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="bfb148e6">getComputedStyle(elt)</span> </ul> <li> <a data-link-type="biblio">[DOM]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="2f0ba72c">document element</span> <li><span class="dfn-paneled" id="7bf10631">document tree</span> </ul> <li> <a data-link-type="biblio">[HTML]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="2c82d279">audio</span> <li><span class="dfn-paneled" id="2f0492ac">body</span> <li><span class="dfn-paneled" id="efab6432">br</span> <li><span class="dfn-paneled" id="bfff6250">button</span> <li><span class="dfn-paneled" id="0fc40460">canvas</span> <li><span class="dfn-paneled" id="1748bbeb">details</span> <li><span class="dfn-paneled" id="49a6cb20">embed</span> <li><span class="dfn-paneled" id="5b914404">fieldset</span> <li><span class="dfn-paneled" id="88ed8860">frame</span> <li><span class="dfn-paneled" id="cf87e3bd">frameset</span> <li><span class="dfn-paneled" id="c3dd181e">html</span> <li><span class="dfn-paneled" id="87fcd40c">iframe</span> <li><span class="dfn-paneled" id="f0811ff8">img</span> <li><span class="dfn-paneled" id="d7d642a2">input</span> <li><span class="dfn-paneled" id="61885b99">legend</span> <li><span class="dfn-paneled" id="b23654ab">meter</span> <li><span class="dfn-paneled" id="99b5cef6">object</span> <li><span class="dfn-paneled" id="b90b2ad5">progress</span> <li><span class="dfn-paneled" id="0008a4b3">rendered legend</span> <li><span class="dfn-paneled" id="85188fb3">select</span> <li><span class="dfn-paneled" id="b996b941">src</span> <li><span class="dfn-paneled" id="89436b29">summary</span> <li><span class="dfn-paneled" id="fc736137">textarea</span> <li><span class="dfn-paneled" id="aa7bbf63">video</span> <li><span class="dfn-paneled" id="90d63fe4">wbr</span> </ul> <li> <a data-link-type="biblio">[MEDIAQUERIES-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="9e462db5">continuous media</span> <li><span class="dfn-paneled" id="23af89d0">paged media</span> </ul> <li> <a data-link-type="biblio">[SELECTORS-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ad0c2f10">document language</span> <li><span class="dfn-paneled" id="4d06fa38">pseudo-element</span> </ul> <li> <a data-link-type="biblio">[SVG2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="a7f9a4cb">container element</span> <li><span class="dfn-paneled" id="abb19516">non-rendered element</span> <li><span class="dfn-paneled" id="a17bc661">pattern</span> <li><span class="dfn-paneled" id="a7e8836e">presentation attributes</span> <li><span class="dfn-paneled" id="40439e69">renderable element</span> <li><span class="dfn-paneled" id="685aea54">rendered element</span> <li><span class="dfn-paneled" id="45c278c3">svg</span> <li><span class="dfn-paneled" id="cd1011a5">symbol</span> <li><span class="dfn-paneled" id="91a37aa8">text</span> <li><span class="dfn-paneled" id="dd41218a">text content child element</span> <li><span class="dfn-paneled" id="81f3587f">textPath</span> <li><span class="dfn-paneled" id="1628bded">tspan</span> <li><span class="dfn-paneled" id="356d6b6e">use</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://www.w3.org/TR/css-align-3/"><cite>CSS Box Alignment Module Level 3</cite></a>. 17 February 2023. WD. URL: <a href="https://www.w3.org/TR/css-align-3/">https://www.w3.org/TR/css-align-3/</a> <dt id="biblio-css-box-4">[CSS-BOX-4] <dd>Elika Etemad. <a href="https://www.w3.org/TR/css-box-4/"><cite>CSS Box Model Module Level 4</cite></a>. 4 August 2024. WD. URL: <a href="https://www.w3.org/TR/css-box-4/">https://www.w3.org/TR/css-box-4/</a> <dt id="biblio-css-break-3">[CSS-BREAK-3] <dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-break-3/"><cite>CSS Fragmentation Module Level 3</cite></a>. 4 December 2018. CR. URL: <a href="https://www.w3.org/TR/css-break-3/">https://www.w3.org/TR/css-break-3/</a> <dt id="biblio-css-break-4">[CSS-BREAK-4] <dd>Rossen Atanassov; Elika Etemad. <a href="https://www.w3.org/TR/css-break-4/"><cite>CSS Fragmentation Module Level 4</cite></a>. 18 December 2018. WD. URL: <a href="https://www.w3.org/TR/css-break-4/">https://www.w3.org/TR/css-break-4/</a> <dt id="biblio-css-cascade-3">[CSS-CASCADE-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-3/"><cite>CSS Cascading and Inheritance Level 3</cite></a>. 11 February 2021. REC. URL: <a href="https://www.w3.org/TR/css-cascade-3/">https://www.w3.org/TR/css-cascade-3/</a> <dt id="biblio-css-cascade-5">[CSS-CASCADE-5] <dd>Elika Etemad; Miriam Suzanne; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-cascade-5/"><cite>CSS Cascading and Inheritance Level 5</cite></a>. 13 January 2022. CR. URL: <a href="https://www.w3.org/TR/css-cascade-5/">https://www.w3.org/TR/css-cascade-5/</a> <dt id="biblio-css-contain-2">[CSS-CONTAIN-2] <dd>Tab Atkins Jr.; Florian Rivoal; Vladimir Levin. <a href="https://www.w3.org/TR/css-contain-2/"><cite>CSS Containment Module Level 2</cite></a>. 17 September 2022. WD. URL: <a href="https://www.w3.org/TR/css-contain-2/">https://www.w3.org/TR/css-contain-2/</a> <dt id="biblio-css-flexbox-1">[CSS-FLEXBOX-1] <dd>Tab Atkins Jr.; et al. <a href="https://www.w3.org/TR/css-flexbox-1/"><cite>CSS Flexible Box Layout Module Level 1</cite></a>. 19 November 2018. CR. URL: <a href="https://www.w3.org/TR/css-flexbox-1/">https://www.w3.org/TR/css-flexbox-1/</a> <dt id="biblio-css-grid-1">[CSS-GRID-1] <dd>Tab Atkins Jr.; et al. <a href="https://www.w3.org/TR/css-grid-1/"><cite>CSS Grid Layout Module Level 1</cite></a>. 18 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-grid-1/">https://www.w3.org/TR/css-grid-1/</a> <dt id="biblio-css-grid-2">[CSS-GRID-2] <dd>Tab Atkins Jr.; Elika Etemad; Rossen Atanassov. <a href="https://www.w3.org/TR/css-grid-2/"><cite>CSS Grid Layout Module Level 2</cite></a>. 18 December 2020. CR. URL: <a href="https://www.w3.org/TR/css-grid-2/">https://www.w3.org/TR/css-grid-2/</a> <dt id="biblio-css-images-3">[CSS-IMAGES-3] <dd>Tab Atkins Jr.; Elika Etemad; Lea Verou. <a href="https://www.w3.org/TR/css-images-3/"><cite>CSS Images Module Level 3</cite></a>. 18 December 2023. CR. URL: <a href="https://www.w3.org/TR/css-images-3/">https://www.w3.org/TR/css-images-3/</a> <dt id="biblio-css-inline-3">[CSS-INLINE-3] <dd>Elika Etemad. <a href="https://www.w3.org/TR/css-inline-3/"><cite>CSS Inline Layout Module Level 3</cite></a>. 12 August 2024. WD. URL: <a href="https://www.w3.org/TR/css-inline-3/">https://www.w3.org/TR/css-inline-3/</a> <dt id="biblio-css-overflow-3">[CSS-OVERFLOW-3] <dd>Elika Etemad; Florian Rivoal. <a href="https://www.w3.org/TR/css-overflow-3/"><cite>CSS Overflow Module Level 3</cite></a>. 29 March 2023. WD. URL: <a href="https://www.w3.org/TR/css-overflow-3/">https://www.w3.org/TR/css-overflow-3/</a> <dt id="biblio-css-page-3">[CSS-PAGE-3] <dd>Elika Etemad. <a href="https://www.w3.org/TR/css-page-3/"><cite>CSS Paged Media Module Level 3</cite></a>. 14 September 2023. WD. URL: <a href="https://www.w3.org/TR/css-page-3/">https://www.w3.org/TR/css-page-3/</a> <dt id="biblio-css-position-3">[CSS-POSITION-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-position-3/"><cite>CSS Positioned Layout Module Level 3</cite></a>. 10 August 2024. WD. URL: <a href="https://www.w3.org/TR/css-position-3/">https://www.w3.org/TR/css-position-3/</a> <dt id="biblio-css-pseudo-4">[CSS-PSEUDO-4] <dd>Daniel Glazman; Elika Etemad; Alan Stearns. <a href="https://www.w3.org/TR/css-pseudo-4/"><cite>CSS Pseudo-Elements Module Level 4</cite></a>. 30 December 2022. WD. URL: <a href="https://www.w3.org/TR/css-pseudo-4/">https://www.w3.org/TR/css-pseudo-4/</a> <dt id="biblio-css-ruby-1">[CSS-RUBY-1] <dd>Elika Etemad; et al. <a href="https://www.w3.org/TR/css-ruby-1/"><cite>CSS Ruby Annotation Layout Module Level 1</cite></a>. 31 December 2022. WD. URL: <a href="https://www.w3.org/TR/css-ruby-1/">https://www.w3.org/TR/css-ruby-1/</a> <dt id="biblio-css-speech-1">[CSS-SPEECH-1] <dd>Léonie Watson; Elika Etemad. <a href="https://www.w3.org/TR/css-speech-1/"><cite>CSS Speech Module Level 1</cite></a>. 14 February 2023. CR. URL: <a href="https://www.w3.org/TR/css-speech-1/">https://www.w3.org/TR/css-speech-1/</a> <dt id="biblio-css-tables-3">[CSS-TABLES-3] <dd>François Remy; Greg Whitworth; David Baron. <a href="https://www.w3.org/TR/css-tables-3/"><cite>CSS Table Module Level 3</cite></a>. 27 July 2019. WD. URL: <a href="https://www.w3.org/TR/css-tables-3/">https://www.w3.org/TR/css-tables-3/</a> <dt id="biblio-css-text-4">[CSS-TEXT-4] <dd>Elika Etemad; et al. <a href="https://www.w3.org/TR/css-text-4/"><cite>CSS Text Module Level 4</cite></a>. 29 May 2024. WD. URL: <a href="https://www.w3.org/TR/css-text-4/">https://www.w3.org/TR/css-text-4/</a> <dt id="biblio-css-ui-4">[CSS-UI-4] <dd>Florian Rivoal. <a href="https://www.w3.org/TR/css-ui-4/"><cite>CSS Basic User Interface Module Level 4</cite></a>. 16 March 2021. WD. URL: <a href="https://www.w3.org/TR/css-ui-4/">https://www.w3.org/TR/css-ui-4/</a> <dt id="biblio-css-values-3">[CSS-VALUES-3] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-3/"><cite>CSS Values and Units Module Level 3</cite></a>. 22 March 2024. CR. URL: <a href="https://www.w3.org/TR/css-values-3/">https://www.w3.org/TR/css-values-3/</a> <dt id="biblio-css-values-4">[CSS-VALUES-4] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-values-4/"><cite>CSS Values and Units Module Level 4</cite></a>. 12 March 2024. WD. URL: <a href="https://www.w3.org/TR/css-values-4/">https://www.w3.org/TR/css-values-4/</a> <dt id="biblio-css-writing-modes-3">[CSS-WRITING-MODES-3] <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-3/"><cite>CSS Writing Modes Level 3</cite></a>. 10 December 2019. REC. URL: <a href="https://www.w3.org/TR/css-writing-modes-3/">https://www.w3.org/TR/css-writing-modes-3/</a> <dt id="biblio-css-writing-modes-4">[CSS-WRITING-MODES-4] <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-writing-modes-4/"><cite>CSS Writing Modes Level 4</cite></a>. 30 July 2019. CR. URL: <a href="https://www.w3.org/TR/css-writing-modes-4/">https://www.w3.org/TR/css-writing-modes-4/</a> <dt id="biblio-css2">[CSS2] <dd>Bert Bos; et al. <a href="https://www.w3.org/TR/CSS21/"><cite>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</cite></a>. 7 June 2011. REC. URL: <a href="https://www.w3.org/TR/CSS21/">https://www.w3.org/TR/CSS21/</a> <dt id="biblio-css22">[CSS22] <dd>Bert Bos. <a href="https://www.w3.org/TR/CSS22/"><cite>Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification</cite></a>. 12 April 2016. WD. URL: <a href="https://www.w3.org/TR/CSS22/">https://www.w3.org/TR/CSS22/</a> <dt id="biblio-cssom">[CSSOM] <dd>Daniel Glazman; Emilio Cobos Álvarez. <a href="https://www.w3.org/TR/cssom-1/"><cite>CSS Object Model (CSSOM)</cite></a>. 26 August 2021. WD. URL: <a href="https://www.w3.org/TR/cssom-1/">https://www.w3.org/TR/cssom-1/</a> <dt id="biblio-dom">[DOM] <dd>Anne van Kesteren. <a href="https://dom.spec.whatwg.org/"><cite>DOM Standard</cite></a>. Living Standard. URL: <a href="https://dom.spec.whatwg.org/">https://dom.spec.whatwg.org/</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-mediaqueries-5">[MEDIAQUERIES-5] <dd>Dean Jackson; et al. <a href="https://www.w3.org/TR/mediaqueries-5/"><cite>Media Queries Level 5</cite></a>. 18 December 2021. WD. URL: <a href="https://www.w3.org/TR/mediaqueries-5/">https://www.w3.org/TR/mediaqueries-5/</a> <dt id="biblio-rfc2119">[RFC2119] <dd>S. Bradner. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><cite>Key words for use in RFCs to Indicate Requirement Levels</cite></a>. March 1997. Best Current Practice. URL: <a href="https://datatracker.ietf.org/doc/html/rfc2119">https://datatracker.ietf.org/doc/html/rfc2119</a> <dt id="biblio-selectors-4">[SELECTORS-4] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/selectors-4/"><cite>Selectors Level 4</cite></a>. 11 November 2022. WD. URL: <a href="https://www.w3.org/TR/selectors-4/">https://www.w3.org/TR/selectors-4/</a> <dt id="biblio-svg2">[SVG2] <dd>Amelia Bellamy-Royds; et al. <a href="https://www.w3.org/TR/SVG2/"><cite>Scalable Vector Graphics (SVG) 2</cite></a>. 4 October 2018. CR. URL: <a href="https://www.w3.org/TR/SVG2/">https://www.w3.org/TR/SVG2/</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-css3-exclusions">[CSS3-EXCLUSIONS] <dd>Rossen Atanassov; Vincent Hardy; Alan Stearns. <a href="https://www.w3.org/TR/css3-exclusions/"><cite>CSS Exclusions Module Level 1</cite></a>. 15 January 2015. WD. URL: <a href="https://www.w3.org/TR/css3-exclusions/">https://www.w3.org/TR/css3-exclusions/</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">Animation type <th scope="col">Canonical order <th scope="col">Computed value <th scope="col">Media <tbody> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-display" id="ref-for-propdef-display⑦④">display</a> <td>[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> <td>inline <td>all elements <td>no <td>n/a <td>not animatable <td>per grammar <td>a pair of keywords representing the inner and outer display types plus optional list-item flag, or a <display-internal> or <display-box> keyword; see prose in a variety of specs for computation rules <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-order" id="ref-for-propdef-order①⑦">order</a> <td><integer> <td>0 <td>flex items and grid items <td>no <td>n/a <td>by computed value type <td>per grammar <td>specified integer <td> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-visibility" id="ref-for-propdef-visibility⑥">visibility</a> <td>visible | hidden | collapse <td>visible <td>all elements <td>yes <td>N/A <td>discrete <td>per grammar <td>as specified <td>visual </table> </div> <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 = { "000546c6": {"dfnID":"000546c6","dfnText":"overflow","external":true,"refSections":[{"refs":[{"id":"ref-for-x0"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/CSS21/visufx.html#x0"}, "0008a4b3": {"dfnID":"0008a4b3","dfnText":"rendered legend","external":true,"refSections":[{"refs":[{"id":"ref-for-rendered-legend"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend"}, "04004305": {"dfnID":"04004305","dfnText":"fragmentation","external":true,"refSections":[{"refs":[{"id":"ref-for-fragmentation"},{"id":"ref-for-fragmentation\u2460"}],"title":"1. \nIntroduction"}],"url":"https://www.w3.org/TR/css-break-4/#fragmentation"}, "0570259e": {"dfnID":"0570259e","dfnText":"float","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-float"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-propdef-float\u2460"},{"id":"ref-for-propdef-float\u2461"}],"title":"\nAppendix A: Glossary"}],"url":"https://drafts.csswg.org/css2/#propdef-float"}, "07e702cf": {"dfnID":"07e702cf","dfnText":"flex layout","external":true,"refSections":[{"refs":[{"id":"ref-for-flex-layout"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-flexbox-1/#flex-layout"}, "0fc40460": {"dfnID":"0fc40460","dfnText":"canvas","external":true,"refSections":[{"refs":[{"id":"ref-for-canvas"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/canvas.html#canvas"}, "153743a1": {"dfnID":"153743a1","dfnText":"ruby base container","external":true,"refSections":[{"refs":[{"id":"ref-for-ruby-base-container-box"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-ruby-1/#ruby-base-container-box"}, "1628bded": {"dfnID":"1628bded","dfnText":"tspan","external":true,"refSections":[{"refs":[{"id":"ref-for-elementdef-tspan"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/text.html#elementdef-tspan"}, "1748bbeb": {"dfnID":"1748bbeb","dfnText":"details","external":true,"refSections":[{"refs":[{"id":"ref-for-the-details-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element"}, "1b178ec1": {"dfnID":"1b178ec1","dfnText":"table wrapper box","external":true,"refSections":[{"refs":[{"id":"ref-for-table-wrapper-box"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-table-wrapper-box\u2460"},{"id":"ref-for-table-wrapper-box\u2461"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-table-wrapper-box\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-table-wrapper-box\u2463"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-tables-3/#table-wrapper-box"}, "23af89d0": {"dfnID":"23af89d0","dfnText":"paged media","external":true,"refSections":[{"refs":[{"id":"ref-for-paged-media"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/mediaqueries-5/#paged-media"}, "28f05b35": {"dfnID":"28f05b35","dfnText":"table grid box","external":true,"refSections":[{"refs":[{"id":"ref-for-table-grid-box"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-table-grid-box\u2460"},{"id":"ref-for-table-grid-box\u2461"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-table-grid-box\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-table-grid-box\u2463"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-tables-3/#table-grid-box"}, "2c82d279": {"dfnID":"2c82d279","dfnText":"audio","external":true,"refSections":[{"refs":[{"id":"ref-for-audio"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/media.html#audio"}, "2f0492ac": {"dfnID":"2f0492ac","dfnText":"body","external":true,"refSections":[{"refs":[{"id":"ref-for-the-body-element"}],"title":"\nChanges Since 2019 Candidate Recommendation"}],"url":"https://html.spec.whatwg.org/multipage/sections.html#the-body-element"}, "2f0ba72c": {"dfnID":"2f0ba72c","dfnText":"document element","external":true,"refSections":[{"refs":[{"id":"ref-for-document-element"}],"title":"\nAppendix A: Glossary"}],"url":"https://dom.spec.whatwg.org/#document-element"}, "31765884": {"dfnID":"31765884","dfnText":"flex formatting context","external":true,"refSections":[{"refs":[{"id":"ref-for-flex-formatting-context"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-flex-formatting-context\u2460"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-flexbox-1/#flex-formatting-context"}, "356d6b6e": {"dfnID":"356d6b6e","dfnText":"use","external":true,"refSections":[{"refs":[{"id":"ref-for-elementdef-use"},{"id":"ref-for-elementdef-use\u2460"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/struct.html#elementdef-use"}, "40439e69": {"dfnID":"40439e69","dfnText":"renderable element","external":true,"refSections":[{"refs":[{"id":"ref-for-TermRenderableElement"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/render.html#TermRenderableElement"}, "45c278c3": {"dfnID":"45c278c3","dfnText":"svg","external":true,"refSections":[{"refs":[{"id":"ref-for-elementdef-svg"},{"id":"ref-for-elementdef-svg\u2460"},{"id":"ref-for-elementdef-svg\u2461"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/struct.html#elementdef-svg"}, "470cd324": {"dfnID":"470cd324","dfnText":"ruby formatting context","external":true,"refSections":[{"refs":[{"id":"ref-for-ruby-formatting-context"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-ruby-formatting-context\u2460"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-ruby-formatting-context\u2461"},{"id":"ref-for-ruby-formatting-context\u2462"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-ruby-1/#ruby-formatting-context"}, "487e1aa9": {"dfnID":"487e1aa9","dfnText":"natural dimension","external":true,"refSections":[{"refs":[{"id":"ref-for-natural-dimensions"},{"id":"ref-for-natural-dimensions\u2460"},{"id":"ref-for-natural-dimensions\u2461"},{"id":"ref-for-natural-dimensions\u2462"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-images-3/#natural-dimensions"}, "49a6cb20": {"dfnID":"49a6cb20","dfnText":"embed","external":true,"refSections":[{"refs":[{"id":"ref-for-the-embed-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element"}, "4bda66a9": {"dfnID":"4bda66a9","dfnText":"::first-line","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-first-line"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-first-line"}, "4cf3c57e": {"dfnID":"4cf3c57e","dfnText":"absolute position","external":true,"refSections":[{"refs":[{"id":"ref-for-absolute-position"},{"id":"ref-for-absolute-position\u2460"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-absolute-position\u2461"},{"id":"ref-for-absolute-position\u2462"}],"title":"\nChanges Since 2019 Candidate Recommendation"}],"url":"https://www.w3.org/TR/css-position-3/#absolute-position"}, "4d06fa38": {"dfnID":"4d06fa38","dfnText":"pseudo-element","external":true,"refSections":[{"refs":[{"id":"ref-for-pseudo-element"}],"title":"1. \nIntroduction"}],"url":"https://www.w3.org/TR/selectors-4/#pseudo-element"}, "4eb9d37e": {"dfnID":"4eb9d37e","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"},{"id":"ref-for-comb-one\u2463"},{"id":"ref-for-comb-one\u2464"},{"id":"ref-for-comb-one\u2465"},{"id":"ref-for-comb-one\u2466"},{"id":"ref-for-comb-one\u2467"},{"id":"ref-for-comb-one\u2468"},{"id":"ref-for-comb-one\u2460\u24ea"},{"id":"ref-for-comb-one\u2460\u2460"},{"id":"ref-for-comb-one\u2460\u2461"},{"id":"ref-for-comb-one\u2460\u2462"},{"id":"ref-for-comb-one\u2460\u2463"},{"id":"ref-for-comb-one\u2460\u2464"},{"id":"ref-for-comb-one\u2460\u2465"},{"id":"ref-for-comb-one\u2460\u2466"},{"id":"ref-for-comb-one\u2460\u2467"},{"id":"ref-for-comb-one\u2460\u2468"},{"id":"ref-for-comb-one\u2461\u24ea"},{"id":"ref-for-comb-one\u2461\u2460"},{"id":"ref-for-comb-one\u2461\u2461"},{"id":"ref-for-comb-one\u2461\u2462"},{"id":"ref-for-comb-one\u2461\u2463"},{"id":"ref-for-comb-one\u2461\u2464"},{"id":"ref-for-comb-one\u2461\u2465"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-comb-one\u2461\u2466"},{"id":"ref-for-comb-one\u2461\u2467"}],"title":"4. \nInvisibility: the visibility property"}],"url":"https://www.w3.org/TR/css-values-4/#comb-one"}, "5b914404": {"dfnID":"5b914404","dfnText":"fieldset","external":true,"refSections":[{"refs":[{"id":"ref-for-the-fieldset-element"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-the-fieldset-element\u2460"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element"}, "5dfeee7f": {"dfnID":"5dfeee7f","dfnText":"contain","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-contain"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-contain-2/#propdef-contain"}, "60669dde": {"dfnID":"60669dde","dfnText":"box edge","external":true,"refSections":[{"refs":[{"id":"ref-for-box-box-edge"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-box-4/#box-box-edge"}, "61885b99": {"dfnID":"61885b99","dfnText":"legend","external":true,"refSections":[{"refs":[{"id":"ref-for-the-legend-element"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-the-legend-element\u2460"},{"id":"ref-for-the-legend-element\u2461"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element"}, "62c772f5": {"dfnID":"62c772f5","dfnText":"fragment","external":true,"refSections":[{"refs":[{"id":"ref-for-fragment"},{"id":"ref-for-fragment\u2460"}],"title":"1. \nIntroduction"}],"url":"https://www.w3.org/TR/css-break-3/#fragment"}, "63b59bd9": {"dfnID":"63b59bd9","dfnText":"::first-letter","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-first-letter"}],"title":"Unnumbered Section"},{"refs":[{"id":"ref-for-selectordef-first-letter\u2460"}],"title":"5. \nRun-In Layout"},{"refs":[{"id":"ref-for-selectordef-first-letter\u2461"},{"id":"ref-for-selectordef-first-letter\u2462"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter"}, "685aea54": {"dfnID":"685aea54","dfnText":"rendered element","external":true,"refSections":[{"refs":[{"id":"ref-for-TermRenderedElement"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/render.html#TermRenderedElement"}, "6cb2de13": {"dfnID":"6cb2de13","dfnText":"always","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-speak-always"},{"id":"ref-for-valdef-speak-always\u2460"}],"title":"4. \nInvisibility: the visibility property"}],"url":"https://www.w3.org/TR/css-speech-1/#valdef-speak-always"}, "6f8683f4": {"dfnID":"6f8683f4","dfnText":"grid formatting context","external":true,"refSections":[{"refs":[{"id":"ref-for-grid-formatting-context"},{"id":"ref-for-grid-formatting-context\u2460"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-grid-formatting-context\u2461"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-grid-2/#grid-formatting-context"}, "70503bd6": {"dfnID":"70503bd6","dfnText":"::after","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-after"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-selectordef-after\u2460"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-after"}, "73bc6606": {"dfnID":"73bc6606","dfnText":"pointer-events","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-pointer-events"}],"title":"4. \nInvisibility: the visibility property"}],"url":"https://drafts.csswg.org/css-ui-4/#propdef-pointer-events"}, "7bf10631": {"dfnID":"7bf10631","dfnText":"document tree","external":true,"refSections":[{"refs":[{"id":"ref-for-concept-document-tree"},{"id":"ref-for-concept-document-tree\u2460"}],"title":"\nAppendix A: Glossary"}],"url":"https://dom.spec.whatwg.org/#concept-document-tree"}, "7c6f51b7": {"dfnID":"7c6f51b7","dfnText":"::before","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-before"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-selectordef-before\u2460"}],"title":"5. \nRun-In Layout"},{"refs":[{"id":"ref-for-selectordef-before\u2461"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-before"}, "81f3587f": {"dfnID":"81f3587f","dfnText":"textPath","external":true,"refSections":[{"refs":[{"id":"ref-for-elementdef-textPath"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/text.html#elementdef-textPath"}, "85188fb3": {"dfnID":"85188fb3","dfnText":"select","external":true,"refSections":[{"refs":[{"id":"ref-for-the-select-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element"}, "87fcd40c": {"dfnID":"87fcd40c","dfnText":"iframe","external":true,"refSections":[{"refs":[{"id":"ref-for-the-iframe-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element"}, "88ed8860": {"dfnID":"88ed8860","dfnText":"frame","external":true,"refSections":[{"refs":[{"id":"ref-for-frame"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/obsolete.html#frame"}, "89436b29": {"dfnID":"89436b29","dfnText":"summary","external":true,"refSections":[{"refs":[{"id":"ref-for-the-summary-element"}],"title":"2.5. \nBox Generation: the none and contents keywords"}],"url":"https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element"}, "8a110a7b": {"dfnID":"8a110a7b","dfnText":"CSS-wide keywords","external":true,"refSections":[{"refs":[{"id":"ref-for-css-wide-keywords"}],"title":"1.2. \nValue Definitions"}],"url":"https://www.w3.org/TR/css-values-4/#css-wide-keywords"}, "8af3edff": {"dfnID":"8af3edff","dfnText":"root inline box","external":true,"refSections":[{"refs":[{"id":"ref-for-root-inline-box"},{"id":"ref-for-root-inline-box\u2460"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-inline-3/#root-inline-box"}, "90d63fe4": {"dfnID":"90d63fe4","dfnText":"wbr","external":true,"refSections":[{"refs":[{"id":"ref-for-the-wbr-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element"}, "91a37aa8": {"dfnID":"91a37aa8","dfnText":"text","external":true,"refSections":[{"refs":[{"id":"ref-for-elementdef-text"},{"id":"ref-for-elementdef-text\u2460"},{"id":"ref-for-elementdef-text\u2461"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/text.html#elementdef-text"}, "953ffdad": {"dfnID":"953ffdad","dfnText":"principal writing mode","external":true,"refSections":[{"refs":[{"id":"ref-for-principal-writing-mode"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#principal-writing-mode"}, "99a0ef70": {"dfnID":"99a0ef70","dfnText":"first formatted line","external":true,"refSections":[{"refs":[{"id":"ref-for-first-formatted-line"},{"id":"ref-for-first-formatted-line\u2460"}],"title":"5. \nRun-In Layout"}],"url":"https://www.w3.org/TR/css-pseudo-4/#first-formatted-line"}, "99b5cef6": {"dfnID":"99b5cef6","dfnText":"object","external":true,"refSections":[{"refs":[{"id":"ref-for-the-object-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element"}, "9ce36abc": {"dfnID":"9ce36abc","dfnText":"specified value","external":true,"refSections":[{"refs":[{"id":"ref-for-specified-value"}],"title":"2.6. \nPrecomposed Inline-level Display Values"},{"refs":[{"id":"ref-for-specified-value\u2460"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"https://www.w3.org/TR/CSS21/cascade.html#specified-value"}, "9e462db5": {"dfnID":"9e462db5","dfnText":"continuous media","external":true,"refSections":[{"refs":[{"id":"ref-for-continuous-media"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-continuous-media\u2460"}],"title":"\nChanges Since 2023 Candidate Recommendation Snapshot"}],"url":"https://www.w3.org/TR/mediaqueries-5/#continuous-media"}, "9f6d5ab0": {"dfnID":"9f6d5ab0","dfnText":"flex item","external":true,"refSections":[{"refs":[{"id":"ref-for-flex-item"},{"id":"ref-for-flex-item\u2460"},{"id":"ref-for-flex-item\u2461"},{"id":"ref-for-flex-item\u2462"},{"id":"ref-for-flex-item\u2463"}],"title":"3. \nDisplay Order: the order property"}],"url":"https://www.w3.org/TR/css-flexbox-1/#flex-item"}, "a0336d84": {"dfnID":"a0336d84","dfnText":"||","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-any"}],"title":"2. \nBox Layout Modes: the display property"}],"url":"https://www.w3.org/TR/css-values-4/#comb-any"}, "a17bc661": {"dfnID":"a17bc661","dfnText":"pattern","external":true,"refSections":[{"refs":[{"id":"ref-for-elementdef-pattern"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/pservers.html#elementdef-pattern"}, "a3cabdb1": {"dfnID":"a3cabdb1","dfnText":"scroll container","external":true,"refSections":[{"refs":[{"id":"ref-for-scroll-container"},{"id":"ref-for-scroll-container\u2460"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-overflow-3/#scroll-container"}, "a7e8836e": {"dfnID":"a7e8836e","dfnText":"presentation attributes","external":true,"refSections":[{"refs":[{"id":"ref-for-TermPresentationAttribute"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/styling.html#TermPresentationAttribute"}, "a7f9a4cb": {"dfnID":"a7f9a4cb","dfnText":"container element","external":true,"refSections":[{"refs":[{"id":"ref-for-container-element"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/struct.html#container-element"}, "a959f189": {"dfnID":"a959f189","dfnText":"small viewport size","external":true,"refSections":[{"refs":[{"id":"ref-for-small-viewport-size"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-small-viewport-size\u2460"}],"title":"\nChanges Since 2023 Candidate Recommendation Snapshot"}],"url":"https://www.w3.org/TR/css-values-4/#small-viewport-size"}, "aa7bbf63": {"dfnID":"aa7bbf63","dfnText":"video","external":true,"refSections":[{"refs":[{"id":"ref-for-video"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/media.html#video"}, "ab2f3e73": {"dfnID":"ab2f3e73","dfnText":"computed value","external":true,"refSections":[{"refs":[{"id":"ref-for-computed-value"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-computed-value\u2460"},{"id":"ref-for-computed-value\u2461"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-computed-value\u2462"},{"id":"ref-for-computed-value\u2463"},{"id":"ref-for-computed-value\u2464"}],"title":"\nChanges Since 2020 Candidate Recommendation"},{"refs":[{"id":"ref-for-computed-value\u2465"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"https://www.w3.org/TR/CSS21/cascade.html#computed-value"}, "abb19516": {"dfnID":"abb19516","dfnText":"non-rendered element","external":true,"refSections":[{"refs":[{"id":"ref-for-TermNonRenderedElement"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/render.html#TermNonRenderedElement"}, "ad0c2f10": {"dfnID":"ad0c2f10","dfnText":"document language","external":true,"refSections":[{"refs":[{"id":"ref-for-document-language"}],"title":"2. \nBox Layout Modes: the display property"}],"url":"https://www.w3.org/TR/selectors-4/#document-language"}, "anonymous": {"dfnID":"anonymous","dfnText":"anonymous box","external":false,"refSections":[{"refs":[{"id":"ref-for-anonymous"},{"id":"ref-for-anonymous\u2460"}],"title":"1. \nIntroduction"}],"url":"#anonymous"}, "atomic-inline": {"dfnID":"atomic-inline","dfnText":"atomic inline","external":false,"refSections":[],"url":"#atomic-inline"}, "b23654ab": {"dfnID":"b23654ab","dfnText":"meter","external":true,"refSections":[{"refs":[{"id":"ref-for-the-meter-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element"}, "b6b63ba4": {"dfnID":"b6b63ba4","dfnText":"::marker","external":true,"refSections":[{"refs":[{"id":"ref-for-selectordef-marker"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-selectordef-marker\u2460"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-selectordef-marker\u2461"}],"title":"5. \nRun-In Layout"}],"url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-marker"}, "b90b2ad5": {"dfnID":"b90b2ad5","dfnText":"progress","external":true,"refSections":[{"refs":[{"id":"ref-for-the-progress-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element"}, "b996b941": {"dfnID":"b996b941","dfnText":"src","external":true,"refSections":[{"refs":[{"id":"ref-for-attr-img-src"}],"title":"\nAppendix A: Glossary"}],"url":"https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-src"}, "ba30fc9a": {"dfnID":"ba30fc9a","dfnText":"grid item","external":true,"refSections":[{"refs":[{"id":"ref-for-grid-item"},{"id":"ref-for-grid-item\u2460"},{"id":"ref-for-grid-item\u2461"},{"id":"ref-for-grid-item\u2462"},{"id":"ref-for-grid-item\u2463"}],"title":"3. \nDisplay Order: the order property"},{"refs":[{"id":"ref-for-grid-item\u2464"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"https://www.w3.org/TR/css-grid-2/#grid-item"}, "ba466582": {"dfnID":"ba466582","dfnText":"white space","external":true,"refSections":[{"refs":[{"id":"ref-for-white-space"}],"title":"5. \nRun-In Layout"}],"url":"https://www.w3.org/TR/css-text-4/#white-space"}, "bbc693a1": {"dfnID":"bbc693a1","dfnText":"subgrid","external":true,"refSections":[{"refs":[{"id":"ref-for-subgrid"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-grid-2/#subgrid"}, "bdb4e757": {"dfnID":"bdb4e757","dfnText":"&&","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-all"},{"id":"ref-for-comb-all\u2460"}],"title":"2. \nBox Layout Modes: the display property"}],"url":"https://www.w3.org/TR/css-values-4/#comb-all"}, "be5da72e": {"dfnID":"be5da72e","dfnText":"ruby container","external":true,"refSections":[{"refs":[{"id":"ref-for-ruby-container"},{"id":"ref-for-ruby-container\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-ruby-container\u2461"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-ruby-container\u2462"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-ruby-container\u2463"},{"id":"ref-for-ruby-container\u2464"},{"id":"ref-for-ruby-container\u2465"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-ruby-1/#ruby-container"}, "bfb148e6": {"dfnID":"bfb148e6","dfnText":"getComputedStyle(elt)","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-window-getcomputedstyle"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-dom-window-getcomputedstyle\u2460"}],"title":"2.6. \nPrecomposed Inline-level Display Values"},{"refs":[{"id":"ref-for-dom-window-getcomputedstyle\u2461"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle"}, "bfc": {"dfnID":"bfc","dfnText":"BFC","external":false,"refSections":[{"refs":[{"id":"ref-for-bfc"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-bfc\u2460"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#bfc"}, "bfff6250": {"dfnID":"bfff6250","dfnText":"button","external":true,"refSections":[{"refs":[{"id":"ref-for-the-button-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element"}, "block": {"dfnID":"block","dfnText":"block","external":false,"refSections":[{"refs":[{"id":"ref-for-block"}],"title":"\nAppendix A: Glossary"}],"url":"#block"}, "block-box": {"dfnID":"block-box","dfnText":"block box","external":false,"refSections":[{"refs":[{"id":"ref-for-block-box"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-block-box\u2460"},{"id":"ref-for-block-box\u2461"},{"id":"ref-for-block-box\u2462"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-block-box\u2463"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-block-box\u2464"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-block-box\u2465"},{"id":"ref-for-block-box\u2466"},{"id":"ref-for-block-box\u2467"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-block-box\u2468"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#block-box"}, "block-container": {"dfnID":"block-container","dfnText":"block container","external":false,"refSections":[{"refs":[{"id":"ref-for-block-container"},{"id":"ref-for-block-container\u2460"},{"id":"ref-for-block-container\u2461"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-block-container\u2462"},{"id":"ref-for-block-container\u2463"},{"id":"ref-for-block-container\u2464"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-block-container\u2465"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-block-container\u2466"},{"id":"ref-for-block-container\u2467"},{"id":"ref-for-block-container\u2468"},{"id":"ref-for-block-container\u2460\u24ea"},{"id":"ref-for-block-container\u2460\u2460"},{"id":"ref-for-block-container\u2460\u2461"},{"id":"ref-for-block-container\u2460\u2462"},{"id":"ref-for-block-container\u2460\u2463"},{"id":"ref-for-block-container\u2460\u2464"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-block-container\u2460\u2465"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"}],"url":"#block-container"}, "block-formatting-context": {"dfnID":"block-formatting-context","dfnText":"block formatting context","external":false,"refSections":[{"refs":[{"id":"ref-for-block-formatting-context"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-block-formatting-context\u2460"},{"id":"ref-for-block-formatting-context\u2461"},{"id":"ref-for-block-formatting-context\u2462"},{"id":"ref-for-block-formatting-context\u2463"},{"id":"ref-for-block-formatting-context\u2464"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-block-formatting-context\u2465"}],"title":"5. \nRun-In Layout"},{"refs":[{"id":"ref-for-block-formatting-context\u2466"},{"id":"ref-for-block-formatting-context\u2467"},{"id":"ref-for-block-formatting-context\u2468"},{"id":"ref-for-block-formatting-context\u2460\u24ea"},{"id":"ref-for-block-formatting-context\u2460\u2460"},{"id":"ref-for-block-formatting-context\u2460\u2461"},{"id":"ref-for-block-formatting-context\u2460\u2462"},{"id":"ref-for-block-formatting-context\u2460\u2463"},{"id":"ref-for-block-formatting-context\u2460\u2464"},{"id":"ref-for-block-formatting-context\u2460\u2465"},{"id":"ref-for-block-formatting-context\u2460\u2466"},{"id":"ref-for-block-formatting-context\u2460\u2467"},{"id":"ref-for-block-formatting-context\u2460\u2468"},{"id":"ref-for-block-formatting-context\u2461\u24ea"},{"id":"ref-for-block-formatting-context\u2461\u2460"},{"id":"ref-for-block-formatting-context\u2461\u2461"},{"id":"ref-for-block-formatting-context\u2461\u2462"},{"id":"ref-for-block-formatting-context\u2461\u2463"},{"id":"ref-for-block-formatting-context\u2461\u2464"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-block-formatting-context\u2461\u2465"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#block-formatting-context"}, "block-formatting-context-root": {"dfnID":"block-formatting-context-root","dfnText":"block formatting context root","external":false,"refSections":[{"refs":[{"id":"ref-for-block-formatting-context-root"}],"title":"\nAppendix A: Glossary"}],"url":"#block-formatting-context-root"}, "block-layout": {"dfnID":"block-layout","dfnText":"block layout","external":false,"refSections":[{"refs":[{"id":"ref-for-block-layout"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-block-layout\u2460"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#block-layout"}, "block-level": {"dfnID":"block-level","dfnText":"block-level","external":false,"refSections":[{"refs":[{"id":"ref-for-block-level"},{"id":"ref-for-block-level\u2460"},{"id":"ref-for-block-level\u2461"},{"id":"ref-for-block-level\u2462"},{"id":"ref-for-block-level\u2463"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-block-level\u2464"},{"id":"ref-for-block-level\u2465"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-block-level\u2466"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"},{"refs":[{"id":"ref-for-block-level\u2467"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#block-level"}, "block-level-box": {"dfnID":"block-level-box","dfnText":"block-level","external":false,"refSections":[{"refs":[{"id":"ref-for-block-level-box"},{"id":"ref-for-block-level-box\u2460"},{"id":"ref-for-block-level-box\u2461"}],"title":"\nAppendix A: Glossary"}],"url":"#block-level-box"}, "blockify": {"dfnID":"blockify","dfnText":"blockification","external":false,"refSections":[{"refs":[{"id":"ref-for-blockify"},{"id":"ref-for-blockify\u2460"},{"id":"ref-for-blockify\u2461"},{"id":"ref-for-blockify\u2462"},{"id":"ref-for-blockify\u2463"},{"id":"ref-for-blockify\u2464"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-blockify\u2465"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-blockify\u2466"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-blockify\u2467"},{"id":"ref-for-blockify\u2468"},{"id":"ref-for-blockify\u2460\u24ea"},{"id":"ref-for-blockify\u2460\u2460"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"},{"refs":[{"id":"ref-for-blockify\u2460\u2461"},{"id":"ref-for-blockify\u2460\u2462"}],"title":"\nChanges Since 2020 Candidate Recommendation"},{"refs":[{"id":"ref-for-blockify\u2460\u2463"},{"id":"ref-for-blockify\u2460\u2464"},{"id":"ref-for-blockify\u2460\u2465"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#blockify"}, "box": {"dfnID":"box","dfnText":"box","external":false,"refSections":[{"refs":[{"id":"ref-for-box"},{"id":"ref-for-box\u2460"},{"id":"ref-for-box\u2461"},{"id":"ref-for-box\u2462"},{"id":"ref-for-box\u2463"},{"id":"ref-for-box\u2464"},{"id":"ref-for-box\u2465"},{"id":"ref-for-box\u2466"},{"id":"ref-for-box\u2467"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-box\u2468"},{"id":"ref-for-box\u2460\u24ea"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-box\u2460\u2460"},{"id":"ref-for-box\u2460\u2461"},{"id":"ref-for-box\u2460\u2462"},{"id":"ref-for-box\u2460\u2463"},{"id":"ref-for-box\u2460\u2464"},{"id":"ref-for-box\u2460\u2465"},{"id":"ref-for-box\u2460\u2466"}],"title":"\nAppendix A: Glossary"}],"url":"#box"}, "box-tree": {"dfnID":"box-tree","dfnText":"box tree","external":false,"refSections":[{"refs":[{"id":"ref-for-box-tree"},{"id":"ref-for-box-tree\u2460"},{"id":"ref-for-box-tree\u2461"},{"id":"ref-for-box-tree\u2462"},{"id":"ref-for-box-tree\u2463"},{"id":"ref-for-box-tree\u2464"},{"id":"ref-for-box-tree\u2465"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-box-tree\u2466"},{"id":"ref-for-box-tree\u2467"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-box-tree\u2468"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#box-tree"}, "c3dd181e": {"dfnID":"c3dd181e","dfnText":"html","external":true,"refSections":[{"refs":[{"id":"ref-for-the-html-element"}],"title":"\nAppendix A: Glossary"}],"url":"https://html.spec.whatwg.org/multipage/semantics.html#the-html-element"}, "cbeb753c": {"dfnID":"cbeb753c","dfnText":"inheritance","external":true,"refSections":[{"refs":[{"id":"ref-for-inheritance"}],"title":"2.5. \nBox Generation: the none and contents keywords"}],"url":"https://www.w3.org/TR/css-cascade-5/#inheritance"}, "cc7f0a64": {"dfnID":"cc7f0a64","dfnText":"flex container","external":true,"refSections":[{"refs":[{"id":"ref-for-flex-container"},{"id":"ref-for-flex-container\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-flex-container\u2461"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-flex-container\u2462"},{"id":"ref-for-flex-container\u2463"}],"title":"3. \nDisplay Order: the order property"},{"refs":[{"id":"ref-for-flex-container\u2464"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-flexbox-1/#flex-container"}, "cd1011a5": {"dfnID":"cd1011a5","dfnText":"symbol","external":true,"refSections":[{"refs":[{"id":"ref-for-elementdef-symbol"}],"title":"SVG Elements"}],"url":"https://www.w3.org/TR/SVG2/struct.html#elementdef-symbol"}, "cf87e3bd": {"dfnID":"cf87e3bd","dfnText":"frameset","external":true,"refSections":[{"refs":[{"id":"ref-for-frameset"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/obsolete.html#frameset"}, "collapsed": {"dfnID":"collapsed","dfnText":"collapsed","external":false,"refSections":[],"url":"#collapsed"}, "containing-block": {"dfnID":"containing-block","dfnText":"containing block","external":false,"refSections":[{"refs":[{"id":"ref-for-containing-block"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-containing-block\u2460"},{"id":"ref-for-containing-block\u2461"},{"id":"ref-for-containing-block\u2462"},{"id":"ref-for-containing-block\u2463"},{"id":"ref-for-containing-block\u2464"},{"id":"ref-for-containing-block\u2465"},{"id":"ref-for-containing-block\u2466"},{"id":"ref-for-containing-block\u2467"},{"id":"ref-for-containing-block\u2468"},{"id":"ref-for-containing-block\u2460\u24ea"},{"id":"ref-for-containing-block\u2460\u2460"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-containing-block\u2460\u2461"}],"title":"\nChanges Since 2019 Candidate Recommendation"}],"url":"#containing-block"}, "containing-block-chain": {"dfnID":"containing-block-chain","dfnText":"containing block chain","external":false,"refSections":[],"url":"#containing-block-chain"}, "css-parent-box": {"dfnID":"css-parent-box","dfnText":"parent box","external":false,"refSections":[{"refs":[{"id":"ref-for-css-parent-box"}],"title":"\nChanges Since 2019 Candidate Recommendation"}],"url":"#css-parent-box"}, "css-text-sequence": {"dfnID":"css-text-sequence","dfnText":"text sequence","external":false,"refSections":[{"refs":[{"id":"ref-for-css-text-sequence"},{"id":"ref-for-css-text-sequence\u2460"},{"id":"ref-for-css-text-sequence\u2461"},{"id":"ref-for-css-text-sequence\u2462"},{"id":"ref-for-css-text-sequence\u2463"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-css-text-sequence\u2464"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-css-text-sequence\u2465"},{"id":"ref-for-css-text-sequence\u2466"},{"id":"ref-for-css-text-sequence\u2467"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-css-text-sequence\u2468"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-css-text-sequence\u2460\u24ea"}],"title":"\nChanges Since 2020 Candidate Recommendation"},{"refs":[{"id":"ref-for-css-text-sequence\u2460\u2460"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#css-text-sequence"}, "d4441b24": {"dfnID":"d4441b24","dfnText":"?","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-opt"},{"id":"ref-for-mult-opt\u2460"}],"title":"2. \nBox Layout Modes: the display property"}],"url":"https://www.w3.org/TR/css-values-4/#mult-opt"}, "d65c0e81": {"dfnID":"d65c0e81","dfnText":"box fragment","external":true,"refSections":[{"refs":[{"id":"ref-for-box-fragment"}],"title":"1. \nIntroduction"}],"url":"https://www.w3.org/TR/css-break-4/#box-fragment"}, "d73c993d": {"dfnID":"d73c993d","dfnText":"<integer>","external":true,"refSections":[{"refs":[{"id":"ref-for-integer-value"},{"id":"ref-for-integer-value\u2460"}],"title":"3. \nDisplay Order: the order property"}],"url":"https://www.w3.org/TR/css-values-4/#integer-value"}, "d7d642a2": {"dfnID":"d7d642a2","dfnText":"input","external":true,"refSections":[{"refs":[{"id":"ref-for-the-input-element"}],"title":"\nAppendix B: Effects of display: contents on Unusual Elements"},{"refs":[{"id":"ref-for-the-input-element\u2460"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/input.html#the-input-element"}, "d9b71dda": {"dfnID":"d9b71dda","dfnText":"absolutely position","external":true,"refSections":[{"refs":[{"id":"ref-for-absolute-position"},{"id":"ref-for-absolute-position\u2460"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-absolute-position\u2461"},{"id":"ref-for-absolute-position\u2462"}],"title":"\nChanges Since 2019 Candidate Recommendation"}],"url":"https://www.w3.org/TR/css-position-3/#absolute-position"}, "dc76e65c": {"dfnID":"dc76e65c","dfnText":"position","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-position"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-propdef-position\u2460"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/CSS21/visuren.html#propdef-position"}, "dd41218a": {"dfnID":"dd41218a","dfnText":"text content child element","external":true,"refSections":[{"refs":[{"id":"ref-for-TermTextContentChildElement"}],"title":"SVG Elements"}],"url":"https://svgwg.org/svg2-draft/text.html#TermTextContentChildElement"}, "df72a52c": {"dfnID":"df72a52c","dfnText":"grid container","external":true,"refSections":[{"refs":[{"id":"ref-for-grid-container"},{"id":"ref-for-grid-container\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-grid-container\u2461"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-grid-container\u2462"},{"id":"ref-for-grid-container\u2463"}],"title":"3. \nDisplay Order: the order property"},{"refs":[{"id":"ref-for-grid-container\u2464"},{"id":"ref-for-grid-container\u2465"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-grid-2/#grid-container"}, "display-type": {"dfnID":"display-type","dfnText":"display type","external":false,"refSections":[{"refs":[{"id":"ref-for-display-type"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-display-type\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-display-type\u2461"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-display-type\u2462"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#display-type"}, "document-order": {"dfnID":"document-order","dfnText":"document order","external":false,"refSections":[{"refs":[{"id":"ref-for-document-order"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#document-order"}, "e25926df": {"dfnID":"e25926df","dfnText":"subgrid (for grid-template-rows)","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-grid-template-rows-subgrid"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"}],"url":"https://www.w3.org/TR/css-grid-2/#valdef-grid-template-rows-subgrid"}, "eb6008ce": {"dfnID":"eb6008ce","dfnText":"writing mode","external":true,"refSections":[{"refs":[{"id":"ref-for-writing-mode"}],"title":"\nChanges Since 2023 Candidate Recommendation Snapshot"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#writing-mode"}, "ef28f956": {"dfnID":"ef28f956","dfnText":"border","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-border"}],"title":"1. \nIntroduction"}],"url":"https://www.w3.org/TR/CSS21/box.html#propdef-border"}, "efab6432": {"dfnID":"efab6432","dfnText":"br","external":true,"refSections":[{"refs":[{"id":"ref-for-the-br-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element"}, "element-tree": {"dfnID":"element-tree","dfnText":"tree","external":false,"refSections":[{"refs":[{"id":"ref-for-element-tree"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-element-tree\u2460"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-element-tree\u2461"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#element-tree"}, "elements": {"dfnID":"elements","dfnText":"elements","external":false,"refSections":[{"refs":[{"id":"ref-for-elements"},{"id":"ref-for-elements\u2460"},{"id":"ref-for-elements\u2461"},{"id":"ref-for-elements\u2462"},{"id":"ref-for-elements\u2463"},{"id":"ref-for-elements\u2464"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-elements\u2465"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-elements\u2466"},{"id":"ref-for-elements\u2467"}],"title":"\nAppendix A: Glossary"}],"url":"#elements"}, "establish-an-independent-formatting-context": {"dfnID":"establish-an-independent-formatting-context","dfnText":"\n\t\t\t\testablish an independent formatting context","external":false,"refSections":[{"refs":[{"id":"ref-for-establish-an-independent-formatting-context"},{"id":"ref-for-establish-an-independent-formatting-context\u2460"},{"id":"ref-for-establish-an-independent-formatting-context\u2461"},{"id":"ref-for-establish-an-independent-formatting-context\u2462"},{"id":"ref-for-establish-an-independent-formatting-context\u2463"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-establish-an-independent-formatting-context\u2464"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"}],"url":"#establish-an-independent-formatting-context"}, "f0811ff8": {"dfnID":"f0811ff8","dfnText":"img","external":true,"refSections":[{"refs":[{"id":"ref-for-the-img-element"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-the-img-element\u2460"}],"title":"\nAppendix B: Effects of display: contents on Unusual Elements"},{"refs":[{"id":"ref-for-the-img-element\u2461"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element"}, "f409a95c": {"dfnID":"f409a95c","dfnText":"speak","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-speak"},{"id":"ref-for-propdef-speak\u2460"}],"title":"4. \nInvisibility: the visibility property"}],"url":"https://www.w3.org/TR/CSS21/aural.html#propdef-speak"}, "fc736137": {"dfnID":"fc736137","dfnText":"textarea","external":true,"refSections":[{"refs":[{"id":"ref-for-the-textarea-element"}],"title":"HTML Elements"}],"url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element"}, "fde954ee": {"dfnID":"fde954ee","dfnText":"align-content","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-align-content"}],"title":"\nAppendix A: Glossary"}],"url":"https://www.w3.org/TR/css-align-3/#propdef-align-content"}, "fdef2996": {"dfnID":"fdef2996","dfnText":"inherited property","external":true,"refSections":[{"refs":[{"id":"ref-for-inherited-property"}],"title":"1. \nIntroduction"}],"url":"https://www.w3.org/TR/css-cascade-5/#inherited-property"}, "flow-layout": {"dfnID":"flow-layout","dfnText":"flow layout","external":false,"refSections":[{"refs":[{"id":"ref-for-flow-layout"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-flow-layout\u2460"},{"id":"ref-for-flow-layout\u2461"},{"id":"ref-for-flow-layout\u2462"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-flow-layout\u2463"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-flow-layout\u2464"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-flow-layout\u2465"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#flow-layout"}, "formatting-context": {"dfnID":"formatting-context","dfnText":"formatting context","external":false,"refSections":[{"refs":[{"id":"ref-for-formatting-context"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-formatting-context\u2460"},{"id":"ref-for-formatting-context\u2461"},{"id":"ref-for-formatting-context\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-formatting-context\u2463"}],"title":"3. \nDisplay Order: the order property"},{"refs":[{"id":"ref-for-formatting-context\u2464"},{"id":"ref-for-formatting-context\u2465"},{"id":"ref-for-formatting-context\u2466"},{"id":"ref-for-formatting-context\u2467"},{"id":"ref-for-formatting-context\u2468"},{"id":"ref-for-formatting-context\u2460\u24ea"},{"id":"ref-for-formatting-context\u2460\u2460"},{"id":"ref-for-formatting-context\u2460\u2461"},{"id":"ref-for-formatting-context\u2460\u2462"},{"id":"ref-for-formatting-context\u2460\u2463"},{"id":"ref-for-formatting-context\u2460\u2464"},{"id":"ref-for-formatting-context\u2460\u2465"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-formatting-context\u2460\u2466"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#formatting-context"}, "in-flow": {"dfnID":"in-flow","dfnText":"in-flow","external":false,"refSections":[{"refs":[{"id":"ref-for-in-flow"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-in-flow\u2460"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#in-flow"}, "independent-formatting-context": {"dfnID":"independent-formatting-context","dfnText":"independent formatting context","external":false,"refSections":[{"refs":[{"id":"ref-for-independent-formatting-context"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-independent-formatting-context\u2460"},{"id":"ref-for-independent-formatting-context\u2461"},{"id":"ref-for-independent-formatting-context\u2462"},{"id":"ref-for-independent-formatting-context\u2463"},{"id":"ref-for-independent-formatting-context\u2464"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-independent-formatting-context\u2465"},{"id":"ref-for-independent-formatting-context\u2466"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"},{"refs":[{"id":"ref-for-independent-formatting-context\u2467"},{"id":"ref-for-independent-formatting-context\u2468"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#independent-formatting-context"}, "initial-containing-block": {"dfnID":"initial-containing-block","dfnText":"initial containing block","external":false,"refSections":[{"refs":[{"id":"ref-for-initial-containing-block"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-initial-containing-block\u2460"},{"id":"ref-for-initial-containing-block\u2461"},{"id":"ref-for-initial-containing-block\u2462"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-initial-containing-block\u2463"}],"title":"\nChanges Since 2023 Candidate Recommendation Snapshot"},{"refs":[{"id":"ref-for-initial-containing-block\u2464"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#initial-containing-block"}, "inline": {"dfnID":"inline","dfnText":"inline","external":false,"refSections":[],"url":"#inline"}, "inline-block": {"dfnID":"inline-block","dfnText":"inline block","external":false,"refSections":[{"refs":[{"id":"ref-for-inline-block"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-inline-block\u2460"}],"title":"\nAppendix A: Glossary"}],"url":"#inline-block"}, "inline-box": {"dfnID":"inline-box","dfnText":"inline box","external":false,"refSections":[{"refs":[{"id":"ref-for-inline-box"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-inline-box\u2460"},{"id":"ref-for-inline-box\u2461"},{"id":"ref-for-inline-box\u2462"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-inline-box\u2463"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-inline-box\u2464"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-inline-box\u2465"},{"id":"ref-for-inline-box\u2466"},{"id":"ref-for-inline-box\u2467"},{"id":"ref-for-inline-box\u2468"}],"title":"\nAppendix A: Glossary"}],"url":"#inline-box"}, "inline-formatting-context": {"dfnID":"inline-formatting-context","dfnText":"inline formatting context","external":false,"refSections":[{"refs":[{"id":"ref-for-inline-formatting-context"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-inline-formatting-context\u2460"},{"id":"ref-for-inline-formatting-context\u2461"},{"id":"ref-for-inline-formatting-context\u2462"},{"id":"ref-for-inline-formatting-context\u2463"},{"id":"ref-for-inline-formatting-context\u2464"},{"id":"ref-for-inline-formatting-context\u2465"},{"id":"ref-for-inline-formatting-context\u2466"},{"id":"ref-for-inline-formatting-context\u2467"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-inline-formatting-context\u2468"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#inline-formatting-context"}, "inline-level": {"dfnID":"inline-level","dfnText":"inline-level","external":false,"refSections":[{"refs":[{"id":"ref-for-inline-level"},{"id":"ref-for-inline-level\u2460"},{"id":"ref-for-inline-level\u2461"},{"id":"ref-for-inline-level\u2462"},{"id":"ref-for-inline-level\u2463"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-inline-level\u2464"},{"id":"ref-for-inline-level\u2465"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-inline-level\u2466"},{"id":"ref-for-inline-level\u2467"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"}],"url":"#inline-level"}, "inline-level-box": {"dfnID":"inline-level-box","dfnText":"inline-level","external":false,"refSections":[{"refs":[{"id":"ref-for-inline-level-box"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-inline-level-box\u2460"}],"title":"5. \nRun-In Layout"},{"refs":[{"id":"ref-for-inline-level-box\u2461"}],"title":"\nAppendix A: Glossary"}],"url":"#inline-level-box"}, "inlinify": {"dfnID":"inlinify","dfnText":"inlinification","external":false,"refSections":[{"refs":[{"id":"ref-for-inlinify"},{"id":"ref-for-inlinify\u2460"},{"id":"ref-for-inlinify\u2461"},{"id":"ref-for-inlinify\u2462"},{"id":"ref-for-inlinify\u2463"},{"id":"ref-for-inlinify\u2464"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-inlinify\u2465"}],"title":"5. \nRun-In Layout"},{"refs":[{"id":"ref-for-inlinify\u2466"},{"id":"ref-for-inlinify\u2467"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"},{"refs":[{"id":"ref-for-inlinify\u2468"},{"id":"ref-for-inlinify\u2460\u24ea"}],"title":"\nChanges Since 2020 Candidate Recommendation"},{"refs":[{"id":"ref-for-inlinify\u2460\u2460"},{"id":"ref-for-inlinify\u2460\u2461"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#inlinify"}, "inner-display-type": {"dfnID":"inner-display-type","dfnText":"inner display type","external":false,"refSections":[{"refs":[{"id":"ref-for-inner-display-type"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-inner-display-type\u2460"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-inner-display-type\u2461"},{"id":"ref-for-inner-display-type\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-inner-display-type\u2463"},{"id":"ref-for-inner-display-type\u2464"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-inner-display-type\u2465"},{"id":"ref-for-inner-display-type\u2466"},{"id":"ref-for-inner-display-type\u2467"},{"id":"ref-for-inner-display-type\u2468"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-inner-display-type\u2460\u24ea"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-inner-display-type\u2460\u2460"},{"id":"ref-for-inner-display-type\u2460\u2461"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-inner-display-type\u2460\u2462"}],"title":"5. \nRun-In Layout"},{"refs":[{"id":"ref-for-inner-display-type\u2460\u2463"},{"id":"ref-for-inner-display-type\u2460\u2464"},{"id":"ref-for-inner-display-type\u2460\u2465"},{"id":"ref-for-inner-display-type\u2460\u2466"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-inner-display-type\u2460\u2467"},{"id":"ref-for-inner-display-type\u2460\u2468"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#inner-display-type"}, "internal-ruby-box": {"dfnID":"internal-ruby-box","dfnText":"internal ruby box","external":false,"refSections":[],"url":"#internal-ruby-box"}, "internal-ruby-element": {"dfnID":"internal-ruby-element","dfnText":"internal ruby element","external":false,"refSections":[],"url":"#internal-ruby-element"}, "internal-table-box": {"dfnID":"internal-table-box","dfnText":"internal table box","external":false,"refSections":[],"url":"#internal-table-box"}, "internal-table-element": {"dfnID":"internal-table-element","dfnText":"internal table element","external":false,"refSections":[{"refs":[{"id":"ref-for-internal-table-element"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"}],"url":"#internal-table-element"}, "invisible": {"dfnID":"invisible","dfnText":"Invisible","external":false,"refSections":[{"refs":[{"id":"ref-for-invisible"},{"id":"ref-for-invisible\u2460"},{"id":"ref-for-invisible\u2461"},{"id":"ref-for-invisible\u2462"},{"id":"ref-for-invisible\u2463"},{"id":"ref-for-invisible\u2464"}],"title":"4. \nInvisibility: the visibility property"}],"url":"#invisible"}, "layout-internal": {"dfnID":"layout-internal","dfnText":"layout-internal","external":false,"refSections":[{"refs":[{"id":"ref-for-layout-internal"},{"id":"ref-for-layout-internal\u2460"},{"id":"ref-for-layout-internal\u2461"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-layout-internal\u2462"},{"id":"ref-for-layout-internal\u2463"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-layout-internal\u2464"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#layout-internal"}, "non-replaced": {"dfnID":"non-replaced","dfnText":"non-replaced","external":false,"refSections":[],"url":"#non-replaced"}, "order-modified-document-order": {"dfnID":"order-modified-document-order","dfnText":"order-modified document order","external":false,"refSections":[],"url":"#order-modified-document-order"}, "out-of-flow": {"dfnID":"out-of-flow","dfnText":"out-of-flow","external":false,"refSections":[{"refs":[{"id":"ref-for-out-of-flow"},{"id":"ref-for-out-of-flow\u2460"},{"id":"ref-for-out-of-flow\u2461"},{"id":"ref-for-out-of-flow\u2462"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-out-of-flow\u2463"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#out-of-flow"}, "outer-display-type": {"dfnID":"outer-display-type","dfnText":"outer display type","external":false,"refSections":[{"refs":[{"id":"ref-for-outer-display-type"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-outer-display-type\u2460"},{"id":"ref-for-outer-display-type\u2461"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-outer-display-type\u2462"},{"id":"ref-for-outer-display-type\u2463"},{"id":"ref-for-outer-display-type\u2464"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-outer-display-type\u2465"},{"id":"ref-for-outer-display-type\u2466"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-outer-display-type\u2467"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-outer-display-type\u2468"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-outer-display-type\u2460\u24ea"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-outer-display-type\u2460\u2460"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#outer-display-type"}, "principal-box": {"dfnID":"principal-box","dfnText":"principal box","external":false,"refSections":[{"refs":[{"id":"ref-for-principal-box"},{"id":"ref-for-principal-box\u2460"},{"id":"ref-for-principal-box\u2461"},{"id":"ref-for-principal-box\u2462"},{"id":"ref-for-principal-box\u2463"},{"id":"ref-for-principal-box\u2464"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-principal-box\u2465"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-principal-box\u2466"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-principal-box\u2467"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-principal-box\u2468"},{"id":"ref-for-principal-box\u2460\u24ea"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-principal-box\u2460\u2460"}],"title":"HTML Elements"},{"refs":[{"id":"ref-for-principal-box\u2460\u2461"}],"title":"\nAppendix C: Box Construction Guidelines for Spec Authors"}],"url":"#principal-box"}, "propdef-display": {"dfnID":"propdef-display","dfnText":"display","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-display\u2462"},{"id":"ref-for-propdef-display\u2463"},{"id":"ref-for-propdef-display\u2464"},{"id":"ref-for-propdef-display\u2465"},{"id":"ref-for-propdef-display\u2466"},{"id":"ref-for-propdef-display\u2467"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-propdef-display\u2468"}],"title":"1.1. \nModule interactions"},{"refs":[{"id":"ref-for-propdef-display\u2460\u24ea"},{"id":"ref-for-propdef-display\u2460\u2460"},{"id":"ref-for-propdef-display\u2460\u2461"},{"id":"ref-for-propdef-display\u2460\u2462"},{"id":"ref-for-propdef-display\u2460\u2463"},{"id":"ref-for-propdef-display\u2460\u2464"},{"id":"ref-for-propdef-display\u2460\u2465"},{"id":"ref-for-propdef-display\u2460\u2466"},{"id":"ref-for-propdef-display\u2460\u2467"},{"id":"ref-for-propdef-display\u2460\u2468"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-propdef-display\u2461\u24ea"},{"id":"ref-for-propdef-display\u2461\u2460"},{"id":"ref-for-propdef-display\u2461\u2461"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-propdef-display\u2461\u2462"},{"id":"ref-for-propdef-display\u2461\u2463"},{"id":"ref-for-propdef-display\u2461\u2464"},{"id":"ref-for-propdef-display\u2461\u2465"},{"id":"ref-for-propdef-display\u2461\u2466"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-propdef-display\u2461\u2467"}],"title":"2.6. \nPrecomposed Inline-level Display Values"},{"refs":[{"id":"ref-for-propdef-display\u2461\u2468"},{"id":"ref-for-propdef-display\u2462\u24ea"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-propdef-display\u2462\u2460"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-propdef-display\u2462\u2461"},{"id":"ref-for-propdef-display\u2462\u2462"},{"id":"ref-for-propdef-display\u2462\u2463"},{"id":"ref-for-propdef-display\u2462\u2464"}],"title":"4. \nInvisibility: the visibility property"},{"refs":[{"id":"ref-for-propdef-display\u2462\u2465"},{"id":"ref-for-propdef-display\u2462\u2466"},{"id":"ref-for-propdef-display\u2462\u2467"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-propdef-display\u2462\u2468"},{"id":"ref-for-propdef-display\u2463\u24ea"}],"title":"\nAppendix B: Effects of display: contents on Unusual Elements"},{"refs":[{"id":"ref-for-propdef-display\u2463\u2460"},{"id":"ref-for-propdef-display\u2463\u2461"},{"id":"ref-for-propdef-display\u2463\u2462"},{"id":"ref-for-propdef-display\u2463\u2463"},{"id":"ref-for-propdef-display\u2463\u2464"},{"id":"ref-for-propdef-display\u2463\u2465"}],"title":"HTML Elements"},{"refs":[{"id":"ref-for-propdef-display\u2463\u2466"},{"id":"ref-for-propdef-display\u2463\u2467"},{"id":"ref-for-propdef-display\u2463\u2468"},{"id":"ref-for-propdef-display\u2464\u24ea"},{"id":"ref-for-propdef-display\u2464\u2460"},{"id":"ref-for-propdef-display\u2464\u2461"},{"id":"ref-for-propdef-display\u2464\u2462"},{"id":"ref-for-propdef-display\u2464\u2463"}],"title":"SVG Elements"},{"refs":[{"id":"ref-for-propdef-display\u2464\u2464"},{"id":"ref-for-propdef-display\u2464\u2465"}],"title":"MathML Elements"},{"refs":[{"id":"ref-for-propdef-display\u2464\u2466"},{"id":"ref-for-propdef-display\u2464\u2467"}],"title":"\nChanges Since 2020 Candidate Recommendation"},{"refs":[{"id":"ref-for-propdef-display\u2464\u2468"},{"id":"ref-for-propdef-display\u2465\u24ea"},{"id":"ref-for-propdef-display\u2465\u2460"},{"id":"ref-for-propdef-display\u2465\u2461"},{"id":"ref-for-propdef-display\u2465\u2462"},{"id":"ref-for-propdef-display\u2465\u2463"},{"id":"ref-for-propdef-display\u2465\u2464"},{"id":"ref-for-propdef-display\u2465\u2465"},{"id":"ref-for-propdef-display\u2465\u2466"},{"id":"ref-for-propdef-display\u2465\u2467"},{"id":"ref-for-propdef-display\u2465\u2468"},{"id":"ref-for-propdef-display\u2466\u24ea"},{"id":"ref-for-propdef-display\u2466\u2460"},{"id":"ref-for-propdef-display\u2466\u2461"},{"id":"ref-for-propdef-display\u2466\u2462"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#propdef-display"}, "propdef-order": {"dfnID":"propdef-order","dfnText":"order","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-order"},{"id":"ref-for-propdef-order\u2460"},{"id":"ref-for-propdef-order\u2461"},{"id":"ref-for-propdef-order\u2462"},{"id":"ref-for-propdef-order\u2463"}],"title":"3. \nDisplay Order: the order property"},{"refs":[{"id":"ref-for-propdef-order\u2464"},{"id":"ref-for-propdef-order\u2465"},{"id":"ref-for-propdef-order\u2466"},{"id":"ref-for-propdef-order\u2467"},{"id":"ref-for-propdef-order\u2468"},{"id":"ref-for-propdef-order\u2460\u24ea"},{"id":"ref-for-propdef-order\u2460\u2460"},{"id":"ref-for-propdef-order\u2460\u2461"},{"id":"ref-for-propdef-order\u2460\u2462"},{"id":"ref-for-propdef-order\u2460\u2463"},{"id":"ref-for-propdef-order\u2460\u2464"}],"title":"3.1. \nReordering and Accessibility"},{"refs":[{"id":"ref-for-propdef-order\u2460\u2465"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#propdef-order"}, "propdef-visibility": {"dfnID":"propdef-visibility","dfnText":"visibility","external":false,"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":"4. \nInvisibility: the visibility property"},{"refs":[{"id":"ref-for-propdef-visibility\u2464"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#propdef-visibility"}, "replaced-element": {"dfnID":"replaced-element","dfnText":"replaced element","external":false,"refSections":[{"refs":[{"id":"ref-for-replaced-element"},{"id":"ref-for-replaced-element\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-replaced-element\u2461"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-replaced-element\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-replaced-element\u2463"},{"id":"ref-for-replaced-element\u2464"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-replaced-element\u2465"},{"id":"ref-for-replaced-element\u2466"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-replaced-element\u2467"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#replaced-element"}, "root-element": {"dfnID":"root-element","dfnText":"root element","external":false,"refSections":[{"refs":[{"id":"ref-for-root-element"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-root-element\u2460"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-root-element\u2461"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#root-element"}, "run-in": {"dfnID":"run-in","dfnText":"run-in box","external":false,"refSections":[{"refs":[{"id":"ref-for-run-in"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-run-in\u2460"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-run-in\u2461"},{"id":"ref-for-run-in\u2462"},{"id":"ref-for-run-in\u2463"}],"title":"5. \nRun-In Layout"}],"url":"#run-in"}, "run-in-sequence": {"dfnID":"run-in-sequence","dfnText":"run-in sequence","external":false,"refSections":[{"refs":[{"id":"ref-for-run-in-sequence"},{"id":"ref-for-run-in-sequence\u2460"},{"id":"ref-for-run-in-sequence\u2461"},{"id":"ref-for-run-in-sequence\u2462"},{"id":"ref-for-run-in-sequence\u2463"}],"title":"5. \nRun-In Layout"}],"url":"#run-in-sequence"}, "table-caption-box": {"dfnID":"table-caption-box","dfnText":"table caption box","external":false,"refSections":[],"url":"#table-caption-box"}, "text-nodes": {"dfnID":"text-nodes","dfnText":"text nodes","external":false,"refSections":[{"refs":[{"id":"ref-for-text-nodes"},{"id":"ref-for-text-nodes\u2460"},{"id":"ref-for-text-nodes\u2461"},{"id":"ref-for-text-nodes\u2462"},{"id":"ref-for-text-nodes\u2463"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-text-nodes\u2464"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-text-nodes\u2465"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#text-nodes"}, "typedef-display-box": {"dfnID":"typedef-display-box","dfnText":"<display-box>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-display-box"},{"id":"ref-for-typedef-display-box\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-typedef-display-box\u2461"}],"title":"2.5. \nBox Generation: the none and contents keywords"}],"url":"#typedef-display-box"}, "typedef-display-inside": {"dfnID":"typedef-display-inside","dfnText":"<display-inside>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-display-inside"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-typedef-display-inside\u2460"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-typedef-display-inside\u2461"},{"id":"ref-for-typedef-display-inside\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"}],"url":"#typedef-display-inside"}, "typedef-display-internal": {"dfnID":"typedef-display-internal","dfnText":"<display-internal>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-display-internal"},{"id":"ref-for-typedef-display-internal\u2460"},{"id":"ref-for-typedef-display-internal\u2461"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-typedef-display-internal\u2462"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"}],"url":"#typedef-display-internal"}, "typedef-display-legacy": {"dfnID":"typedef-display-legacy","dfnText":"<display-legacy>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-display-legacy"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-typedef-display-legacy\u2460"}],"title":"2.6. \nPrecomposed Inline-level Display Values"},{"refs":[{"id":"ref-for-typedef-display-legacy\u2461"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#typedef-display-legacy"}, "typedef-display-listitem": {"dfnID":"typedef-display-listitem","dfnText":"<display-listitem>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-display-listitem"}],"title":"2. \nBox Layout Modes: the display property"}],"url":"#typedef-display-listitem"}, "typedef-display-outside": {"dfnID":"typedef-display-outside","dfnText":"<display-outside>","external":false,"refSections":[{"refs":[{"id":"ref-for-typedef-display-outside"},{"id":"ref-for-typedef-display-outside\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-typedef-display-outside\u2461"},{"id":"ref-for-typedef-display-outside\u2462"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-typedef-display-outside\u2463"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"}],"url":"#typedef-display-outside"}, "valdef-display-block": {"dfnID":"valdef-display-block","dfnText":"block","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-block"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-block\u2460"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-valdef-display-block\u2461"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-block\u2462"},{"id":"ref-for-valdef-display-block\u2463"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-valdef-display-block\u2464"},{"id":"ref-for-valdef-display-block\u2465"},{"id":"ref-for-valdef-display-block\u2466"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-valdef-display-block\u2467"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"},{"refs":[{"id":"ref-for-valdef-display-block\u2468"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#valdef-display-block"}, "valdef-display-contents": {"dfnID":"valdef-display-contents","dfnText":"contents","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-contents"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-valdef-display-contents\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-contents\u2461"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-valdef-display-contents\u2462"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-valdef-display-contents\u2463"}],"title":"2.8. \nThe Root Element\u2019s Principal Box"}],"url":"#valdef-display-contents"}, "valdef-display-flex": {"dfnID":"valdef-display-flex","dfnText":"flex","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-flex"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-flex\u2460"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-flex\u2461"}],"title":"2.7. \nAutomatic Box Type Transformations"}],"url":"#valdef-display-flex"}, "valdef-display-flow": {"dfnID":"valdef-display-flow","dfnText":"flow","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-flow"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-valdef-display-flow\u2460"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-flow\u2461"},{"id":"ref-for-valdef-display-flow\u2462"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-valdef-display-flow\u2463"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-valdef-display-flow\u2464"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-valdef-display-flow\u2465"}],"title":"5. \nRun-In Layout"},{"refs":[{"id":"ref-for-valdef-display-flow\u2466"},{"id":"ref-for-valdef-display-flow\u2467"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-valdef-display-flow\u2468"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#valdef-display-flow"}, "valdef-display-flow-root": {"dfnID":"valdef-display-flow-root","dfnText":"flow-root","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-flow-root"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-flow-root\u2460"},{"id":"ref-for-valdef-display-flow-root\u2461"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-flow-root\u2462"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-valdef-display-flow-root\u2463"},{"id":"ref-for-valdef-display-flow-root\u2464"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-valdef-display-flow-root\u2465"},{"id":"ref-for-valdef-display-flow-root\u2466"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-valdef-display-flow-root\u2467"},{"id":"ref-for-valdef-display-flow-root\u2468"},{"id":"ref-for-valdef-display-flow-root\u2460\u24ea"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#valdef-display-flow-root"}, "valdef-display-grid": {"dfnID":"valdef-display-grid","dfnText":"grid","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-grid"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-grid\u2460"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-grid\u2461"}],"title":"2.7. \nAutomatic Box Type Transformations"}],"url":"#valdef-display-grid"}, "valdef-display-inline": {"dfnID":"valdef-display-inline","dfnText":"inline","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-inline"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-inline\u2460"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-valdef-display-inline\u2461"},{"id":"ref-for-valdef-display-inline\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-inline\u2463"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-valdef-display-inline\u2464"},{"id":"ref-for-valdef-display-inline\u2465"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"},{"refs":[{"id":"ref-for-valdef-display-inline\u2466"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-valdef-display-inline\u2467"}],"title":"\nChanges Since 2020 Candidate Recommendation"}],"url":"#valdef-display-inline"}, "valdef-display-inline-block": {"dfnID":"valdef-display-inline-block","dfnText":"inline-block","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-inline-block"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-inline-block\u2460"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-valdef-display-inline-block\u2461"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#valdef-display-inline-block"}, "valdef-display-inline-flex": {"dfnID":"valdef-display-inline-flex","dfnText":"inline-flex","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-inline-flex"}],"title":"2. \nBox Layout Modes: the display property"}],"url":"#valdef-display-inline-flex"}, "valdef-display-inline-grid": {"dfnID":"valdef-display-inline-grid","dfnText":"inline-grid","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-inline-grid"}],"title":"2. \nBox Layout Modes: the display property"}],"url":"#valdef-display-inline-grid"}, "valdef-display-inline-table": {"dfnID":"valdef-display-inline-table","dfnText":"inline-table","external":false,"refSections":[],"url":"#valdef-display-inline-table"}, "valdef-display-list-item": {"dfnID":"valdef-display-list-item","dfnText":"list-item","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-list-item"},{"id":"ref-for-valdef-display-list-item\u2460"},{"id":"ref-for-valdef-display-list-item\u2461"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-list-item\u2462"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-valdef-display-list-item\u2463"}],"title":"\nAppendix A: Glossary"},{"refs":[{"id":"ref-for-valdef-display-list-item\u2464"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#valdef-display-list-item"}, "valdef-display-none": {"dfnID":"valdef-display-none","dfnText":"none","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-none"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-valdef-display-none\u2460"},{"id":"ref-for-valdef-display-none\u2461"},{"id":"ref-for-valdef-display-none\u2462"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-none\u2463"}],"title":"2.5. \nBox Generation: the none and contents keywords"},{"refs":[{"id":"ref-for-valdef-display-none\u2464"}],"title":"2.7. \nAutomatic Box Type Transformations"},{"refs":[{"id":"ref-for-valdef-display-none\u2465"}],"title":"4. \nInvisibility: the visibility property"}],"url":"#valdef-display-none"}, "valdef-display-ruby": {"dfnID":"valdef-display-ruby","dfnText":"ruby","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-ruby"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-ruby\u2460"},{"id":"ref-for-valdef-display-ruby\u2461"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-ruby\u2462"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"}],"url":"#valdef-display-ruby"}, "valdef-display-ruby-base": {"dfnID":"valdef-display-ruby-base","dfnText":"ruby-base","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-ruby-base"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"}],"url":"#valdef-display-ruby-base"}, "valdef-display-ruby-base-container": {"dfnID":"valdef-display-ruby-base-container","dfnText":"ruby-base-container","external":false,"refSections":[],"url":"#valdef-display-ruby-base-container"}, "valdef-display-ruby-text": {"dfnID":"valdef-display-ruby-text","dfnText":"ruby-text","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-ruby-text"}],"title":"2.4. \nLayout-Internal Display Types: the table-* and ruby-* keywords"}],"url":"#valdef-display-ruby-text"}, "valdef-display-ruby-text-container": {"dfnID":"valdef-display-ruby-text-container","dfnText":"ruby-text-container","external":false,"refSections":[],"url":"#valdef-display-ruby-text-container"}, "valdef-display-run-in": {"dfnID":"valdef-display-run-in","dfnText":"run-in","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-run-in"}],"title":"1. \nIntroduction"},{"refs":[{"id":"ref-for-valdef-display-run-in\u2460"}],"title":"2. \nBox Layout Modes: the display property"},{"refs":[{"id":"ref-for-valdef-display-run-in\u2461"}],"title":"2.1. \nOuter Display Roles for Flow Layout: the block, inline, and run-in keywords"},{"refs":[{"id":"ref-for-valdef-display-run-in\u2462"}],"title":"2.2. \nInner Display Layout Models: the flow, flow-root, table, flex, grid, and ruby keywords"},{"refs":[{"id":"ref-for-valdef-display-run-in\u2463"}],"title":"2.3. \nGenerating Marker Boxes: the list-item keyword"},{"refs":[{"id":"ref-for-valdef-display-run-in\u2464"}],"title":"\nChanges Prior to Candidate Recommendation Status"}],"url":"#valdef-display-run-in"}, "valdef-display-table": {"dfnID":"valdef-display-table","dfnText":"table","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-display-table"}],"title":"\nAppendix A: Glossary"}],"url":"#valdef-display-table"}, "valdef-display-table-caption": {"dfnID":"valdef-display-table-caption","dfnText":"table-caption","external":false,"refSections":[],"url":"#valdef-display-table-caption"}, "valdef-display-table-cell": {"dfnID":"valdef-display-table-cell","dfnText":"table-cell","external":false,"refSections":[],"url":"#valdef-display-table-cell"}, "valdef-display-table-column": {"dfnID":"valdef-display-table-column","dfnText":"table-column","external":false,"refSections":[],"url":"#valdef-display-table-column"}, "valdef-display-table-column-group": {"dfnID":"valdef-display-table-column-group","dfnText":"table-column-group","external":false,"refSections":[],"url":"#valdef-display-table-column-group"}, "valdef-display-table-footer-group": {"dfnID":"valdef-display-table-footer-group","dfnText":"table-footer-group","external":false,"refSections":[],"url":"#valdef-display-table-footer-group"}, "valdef-display-table-header-group": {"dfnID":"valdef-display-table-header-group","dfnText":"table-header-group","external":false,"refSections":[],"url":"#valdef-display-table-header-group"}, "valdef-display-table-row": {"dfnID":"valdef-display-table-row","dfnText":"table-row","external":false,"refSections":[],"url":"#valdef-display-table-row"}, "valdef-display-table-row-group": {"dfnID":"valdef-display-table-row-group","dfnText":"table-row-group","external":false,"refSections":[],"url":"#valdef-display-table-row-group"}, "valdef-order-integer": {"dfnID":"valdef-order-integer","dfnText":"<integer>","external":false,"refSections":[],"url":"#valdef-order-integer"}, "valdef-visibility-collapse": {"dfnID":"valdef-visibility-collapse","dfnText":"collapse","external":false,"refSections":[],"url":"#valdef-visibility-collapse"}, "valdef-visibility-hidden": {"dfnID":"valdef-visibility-hidden","dfnText":"hidden","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-visibility-hidden"}],"title":"4. \nInvisibility: the visibility property"}],"url":"#valdef-visibility-hidden"}, "valdef-visibility-visible": {"dfnID":"valdef-visibility-visible","dfnText":"visible","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-visibility-visible"}],"title":"4. \nInvisibility: the visibility property"}],"url":"#valdef-visibility-visible"}, }; 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 = { "#typedef-display-box": "Expands to: contents | none", "#typedef-display-inside": "Expands to: flex | flow | flow-root | grid | ruby | table", "#typedef-display-internal": "Expands to: ruby-base | ruby-base-container | ruby-text | ruby-text-container | table-caption | table-cell | table-column | table-column-group | table-footer-group | table-header-group | table-row | table-row-group", "#typedef-display-legacy": "Expands to: inline-block | inline-flex | inline-grid | inline-table", "#typedef-display-listitem": "Expands to: list-item", "#typedef-display-outside": "Expands to: block | inline | run-in", }; function setTypeTitles() { for(let el of document.querySelectorAll("a[href]")) { if(el.href in linkTitleData && !el.hasAttribute("title")) { el.setAttribute("title", linkTitleData[el.href]); } } } document.addEventListener("DOMContentLoaded", setTypeTitles); } </script> <script>/* Boilerplate: script-ref-hints */ "use strict"; { let refsData = { "#anonymous": {"displayText":"anonymous box","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"anonymous box","type":"dfn","url":"#anonymous"}, "#bfc": {"displayText":"bfc","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"bfc","type":"dfn","url":"#bfc"}, "#block": {"displayText":"block","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block","type":"dfn","url":"#block"}, "#block-box": {"displayText":"block box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block box","type":"dfn","url":"#block-box"}, "#block-container": {"displayText":"block container","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block container","type":"dfn","url":"#block-container"}, "#block-formatting-context": {"displayText":"block formatting context","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block formatting context","type":"dfn","url":"#block-formatting-context"}, "#block-formatting-context-root": {"displayText":"block formatting context root","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block formatting context root","type":"dfn","url":"#block-formatting-context-root"}, "#block-layout": {"displayText":"block layout","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block layout","type":"dfn","url":"#block-layout"}, "#block-level": {"displayText":"block-level","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block-level","type":"dfn","url":"#block-level"}, "#block-level-box": {"displayText":"block-level box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block-level box","type":"dfn","url":"#block-level-box"}, "#blockify": {"displayText":"blockify","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"blockify","type":"dfn","url":"#blockify"}, "#box": {"displayText":"box","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"box","type":"dfn","url":"#box"}, "#box-tree": {"displayText":"box tree","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"box tree","type":"dfn","url":"#box-tree"}, "#containing-block": {"displayText":"containing block","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"containing block","type":"dfn","url":"#containing-block"}, "#css-parent-box": {"displayText":"parent box","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"parent box","type":"dfn","url":"#css-parent-box"}, "#css-text-sequence": {"displayText":"text sequence","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"text sequence","type":"dfn","url":"#css-text-sequence"}, "#display-type": {"displayText":"display type","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"display type","type":"dfn","url":"#display-type"}, "#document-order": {"displayText":"document order","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"document order","type":"dfn","url":"#document-order"}, "#element-tree": {"displayText":"element tree","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"element tree","type":"dfn","url":"#element-tree"}, "#elements": {"displayText":"element","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"element","type":"dfn","url":"#elements"}, "#establish-an-independent-formatting-context": {"displayText":"establish an independent formatting context","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"establish an independent formatting context","type":"dfn","url":"#establish-an-independent-formatting-context"}, "#flow-layout": {"displayText":"flow layout","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"flow layout","type":"dfn","url":"#flow-layout"}, "#formatting-context": {"displayText":"formatting context","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"formatting context","type":"dfn","url":"#formatting-context"}, "#in-flow": {"displayText":"in-flow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"in-flow","type":"dfn","url":"#in-flow"}, "#independent-formatting-context": {"displayText":"independent formatting context","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"independent formatting context","type":"dfn","url":"#independent-formatting-context"}, "#initial-containing-block": {"displayText":"initial containing block","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"initial containing block","type":"dfn","url":"#initial-containing-block"}, "#inline-block": {"displayText":"inline block box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline block box","type":"dfn","url":"#inline-block"}, "#inline-box": {"displayText":"inline box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline box","type":"dfn","url":"#inline-box"}, "#inline-formatting-context": {"displayText":"inline formatting context","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline formatting context","type":"dfn","url":"#inline-formatting-context"}, "#inline-level": {"displayText":"inline-level","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline-level","type":"dfn","url":"#inline-level"}, "#inline-level-box": {"displayText":"inline-level box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline-level box","type":"dfn","url":"#inline-level-box"}, "#inlinify": {"displayText":"inlinify","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inlinify","type":"dfn","url":"#inlinify"}, "#inner-display-type": {"displayText":"inner display type","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inner display type","type":"dfn","url":"#inner-display-type"}, "#internal-table-element": {"displayText":"internal table element","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"internal table element","type":"dfn","url":"#internal-table-element"}, "#invisible": {"displayText":"invisible","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"invisible","type":"dfn","url":"#invisible"}, "#layout-internal": {"displayText":"layout-internal","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"layout-internal","type":"dfn","url":"#layout-internal"}, "#out-of-flow": {"displayText":"out-of-flow","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"out-of-flow","type":"dfn","url":"#out-of-flow"}, "#outer-display-type": {"displayText":"outer display type","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"outer display type","type":"dfn","url":"#outer-display-type"}, "#principal-box": {"displayText":"principal box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"principal box","type":"dfn","url":"#principal-box"}, "#propdef-display": {"displayText":"display","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"display","type":"property","url":"#propdef-display"}, "#propdef-order": {"displayText":"order","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"order","type":"property","url":"#propdef-order"}, "#propdef-visibility": {"displayText":"visibility","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"visibility","type":"property","url":"#propdef-visibility"}, "#replaced-element": {"displayText":"replaced element","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"replaced element","type":"dfn","url":"#replaced-element"}, "#root-element": {"displayText":"root element","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"root element","type":"dfn","url":"#root-element"}, "#run-in": {"displayText":"run-in box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"run-in box","type":"dfn","url":"#run-in"}, "#run-in-sequence": {"displayText":"run-in sequence","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"run-in sequence","type":"dfn","url":"#run-in-sequence"}, "#text-nodes": {"displayText":"text node","export":true,"for_":["CSS"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"text node","type":"dfn","url":"#text-nodes"}, "#typedef-display-box": {"displayText":"<display-box>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"<display-box>","type":"type","url":"#typedef-display-box"}, "#typedef-display-inside": {"displayText":"<display-inside>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"<display-inside>","type":"type","url":"#typedef-display-inside"}, "#typedef-display-internal": {"displayText":"<display-internal>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"<display-internal>","type":"type","url":"#typedef-display-internal"}, "#typedef-display-legacy": {"displayText":"<display-legacy>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"<display-legacy>","type":"type","url":"#typedef-display-legacy"}, "#typedef-display-listitem": {"displayText":"<display-listitem>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"<display-listitem>","type":"type","url":"#typedef-display-listitem"}, "#typedef-display-outside": {"displayText":"<display-outside>","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"<display-outside>","type":"type","url":"#typedef-display-outside"}, "#valdef-display-block": {"displayText":"block","export":true,"for_":["<display-outside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"block","type":"value","url":"#valdef-display-block"}, "#valdef-display-contents": {"displayText":"contents","export":true,"for_":["<display-box>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"contents","type":"value","url":"#valdef-display-contents"}, "#valdef-display-flex": {"displayText":"flex","export":true,"for_":["<display-inside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"flex","type":"value","url":"#valdef-display-flex"}, "#valdef-display-flow": {"displayText":"flow","export":true,"for_":["<display-inside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"flow","type":"value","url":"#valdef-display-flow"}, "#valdef-display-flow-root": {"displayText":"flow-root","export":true,"for_":["<display-inside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"flow-root","type":"value","url":"#valdef-display-flow-root"}, "#valdef-display-grid": {"displayText":"grid","export":true,"for_":["<display-inside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"grid","type":"value","url":"#valdef-display-grid"}, "#valdef-display-inline": {"displayText":"inline","export":true,"for_":["<display-outside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline","type":"value","url":"#valdef-display-inline"}, "#valdef-display-inline-block": {"displayText":"inline-block","export":true,"for_":["<display-legacy>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline-block","type":"value","url":"#valdef-display-inline-block"}, "#valdef-display-inline-flex": {"displayText":"inline-flex","export":true,"for_":["<display-legacy>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline-flex","type":"value","url":"#valdef-display-inline-flex"}, "#valdef-display-inline-grid": {"displayText":"inline-grid","export":true,"for_":["<display-legacy>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"inline-grid","type":"value","url":"#valdef-display-inline-grid"}, "#valdef-display-list-item": {"displayText":"list-item","export":true,"for_":["<display-listitem>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"list-item","type":"value","url":"#valdef-display-list-item"}, "#valdef-display-none": {"displayText":"none","export":true,"for_":["<display-box>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"none","type":"value","url":"#valdef-display-none"}, "#valdef-display-ruby": {"displayText":"ruby","export":true,"for_":["<display-inside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"ruby","type":"value","url":"#valdef-display-ruby"}, "#valdef-display-ruby-base": {"displayText":"ruby-base","export":true,"for_":["<display-internal>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"ruby-base","type":"value","url":"#valdef-display-ruby-base"}, "#valdef-display-ruby-text": {"displayText":"ruby-text","export":true,"for_":["<display-internal>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"ruby-text","type":"value","url":"#valdef-display-ruby-text"}, "#valdef-display-run-in": {"displayText":"run-in","export":true,"for_":["<display-outside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"run-in","type":"value","url":"#valdef-display-run-in"}, "#valdef-display-table": {"displayText":"table","export":true,"for_":["<display-inside>","display"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"table","type":"value","url":"#valdef-display-table"}, "#valdef-visibility-hidden": {"displayText":"hidden","export":true,"for_":["visibility"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"hidden","type":"value","url":"#valdef-visibility-hidden"}, "#valdef-visibility-visible": {"displayText":"visible","export":true,"for_":["visibility"],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"local","text":"visible","type":"value","url":"#valdef-visibility-visible"}, "https://dom.spec.whatwg.org/#concept-document-tree": {"displayText":"document tree","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"document tree","type":"dfn","url":"https://dom.spec.whatwg.org/#concept-document-tree"}, "https://dom.spec.whatwg.org/#document-element": {"displayText":"document element","export":true,"for_":[],"level":"1","normative":true,"shortname":"dom","spec":"dom","status":"current","text":"document element","type":"dfn","url":"https://dom.spec.whatwg.org/#document-element"}, "https://drafts.csswg.org/css-ui-4/#propdef-pointer-events": {"displayText":"pointer-events","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-ui","spec":"css-ui-4","status":"current","text":"pointer-events","type":"property","url":"https://drafts.csswg.org/css-ui-4/#propdef-pointer-events"}, "https://drafts.csswg.org/css2/#propdef-float": {"displayText":"float","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css22","status":"current","text":"float","type":"property","url":"https://drafts.csswg.org/css2/#propdef-float"}, "https://html.spec.whatwg.org/multipage/canvas.html#canvas": {"displayText":"canvas","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"canvas","type":"element","url":"https://html.spec.whatwg.org/multipage/canvas.html#canvas"}, "https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-src": {"displayText":"src","export":true,"for_":["img"],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"src","type":"element-attr","url":"https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-src"}, "https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element": {"displayText":"img","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"img","type":"element","url":"https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element"}, "https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element": {"displayText":"button","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"button","type":"element","url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element"}, "https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element": {"displayText":"fieldset","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"fieldset","type":"element","url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element"}, "https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element": {"displayText":"legend","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"legend","type":"element","url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element"}, "https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element": {"displayText":"meter","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"meter","type":"element","url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element"}, "https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element": {"displayText":"progress","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"progress","type":"element","url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element"}, "https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element": {"displayText":"select","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"select","type":"element","url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element"}, "https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element": {"displayText":"textarea","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"textarea","type":"element","url":"https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element"}, "https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element": {"displayText":"embed","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"embed","type":"element","url":"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element"}, "https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element": {"displayText":"iframe","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"iframe","type":"element","url":"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element"}, "https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element": {"displayText":"object","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"object","type":"element","url":"https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element"}, "https://html.spec.whatwg.org/multipage/input.html#the-input-element": {"displayText":"input","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"input","type":"element","url":"https://html.spec.whatwg.org/multipage/input.html#the-input-element"}, "https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element": {"displayText":"details","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"details","type":"element","url":"https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element"}, "https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element": {"displayText":"summary","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"summary","type":"element","url":"https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element"}, "https://html.spec.whatwg.org/multipage/media.html#audio": {"displayText":"audio","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"audio","type":"element","url":"https://html.spec.whatwg.org/multipage/media.html#audio"}, "https://html.spec.whatwg.org/multipage/media.html#video": {"displayText":"video","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"video","type":"element","url":"https://html.spec.whatwg.org/multipage/media.html#video"}, "https://html.spec.whatwg.org/multipage/obsolete.html#frame": {"displayText":"frame","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"frame","type":"element","url":"https://html.spec.whatwg.org/multipage/obsolete.html#frame"}, "https://html.spec.whatwg.org/multipage/obsolete.html#frameset": {"displayText":"frameset","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"frameset","type":"element","url":"https://html.spec.whatwg.org/multipage/obsolete.html#frameset"}, "https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend": {"displayText":"rendered legend","export":false,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"rendered legend","type":"dfn","url":"https://html.spec.whatwg.org/multipage/rendering.html#rendered-legend"}, "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://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element": {"displayText":"br","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"br","type":"element","url":"https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element"}, "https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element": {"displayText":"wbr","export":true,"for_":[],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"wbr","type":"element","url":"https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element"}, "https://svgwg.org/svg2-draft/text.html#TermTextContentChildElement": {"displayText":"text content child element","export":false,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"current","text":"text content child element","type":"dfn","url":"https://svgwg.org/svg2-draft/text.html#TermTextContentChildElement"}, "https://www.w3.org/TR/CSS21/aural.html#propdef-speak": {"displayText":"speak","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css21","status":"snapshot","text":"speak","type":"property","url":"https://www.w3.org/TR/CSS21/aural.html#propdef-speak"}, "https://www.w3.org/TR/CSS21/box.html#propdef-border": {"displayText":"border","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css21","status":"snapshot","text":"border","type":"property","url":"https://www.w3.org/TR/CSS21/box.html#propdef-border"}, "https://www.w3.org/TR/CSS21/cascade.html#computed-value": {"displayText":"computed value","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css21","status":"snapshot","text":"computed value","type":"dfn","url":"https://www.w3.org/TR/CSS21/cascade.html#computed-value"}, "https://www.w3.org/TR/CSS21/cascade.html#specified-value": {"displayText":"specified value","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css21","status":"snapshot","text":"specified value","type":"dfn","url":"https://www.w3.org/TR/CSS21/cascade.html#specified-value"}, "https://www.w3.org/TR/CSS21/visufx.html#x0": {"displayText":"overflow","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css21","status":"snapshot","text":"overflow","type":"dfn","url":"https://www.w3.org/TR/CSS21/visufx.html#x0"}, "https://www.w3.org/TR/CSS21/visuren.html#propdef-position": {"displayText":"position","export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css21","status":"snapshot","text":"position","type":"property","url":"https://www.w3.org/TR/CSS21/visuren.html#propdef-position"}, "https://www.w3.org/TR/SVG2/pservers.html#elementdef-pattern": {"displayText":"pattern","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"pattern","type":"element","url":"https://www.w3.org/TR/SVG2/pservers.html#elementdef-pattern"}, "https://www.w3.org/TR/SVG2/render.html#TermNonRenderedElement": {"displayText":"non-rendered element","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"non-rendered element","type":"dfn","url":"https://www.w3.org/TR/SVG2/render.html#TermNonRenderedElement"}, "https://www.w3.org/TR/SVG2/render.html#TermRenderableElement": {"displayText":"renderable element","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"renderable element","type":"dfn","url":"https://www.w3.org/TR/SVG2/render.html#TermRenderableElement"}, "https://www.w3.org/TR/SVG2/render.html#TermRenderedElement": {"displayText":"rendered element","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"rendered element","type":"dfn","url":"https://www.w3.org/TR/SVG2/render.html#TermRenderedElement"}, "https://www.w3.org/TR/SVG2/struct.html#container-element": {"displayText":"container element","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"container element","type":"dfn","url":"https://www.w3.org/TR/SVG2/struct.html#container-element"}, "https://www.w3.org/TR/SVG2/struct.html#elementdef-svg": {"displayText":"svg","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"svg","type":"element","url":"https://www.w3.org/TR/SVG2/struct.html#elementdef-svg"}, "https://www.w3.org/TR/SVG2/struct.html#elementdef-symbol": {"displayText":"symbol","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"symbol","type":"element","url":"https://www.w3.org/TR/SVG2/struct.html#elementdef-symbol"}, "https://www.w3.org/TR/SVG2/struct.html#elementdef-use": {"displayText":"use","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"use","type":"element","url":"https://www.w3.org/TR/SVG2/struct.html#elementdef-use"}, "https://www.w3.org/TR/SVG2/styling.html#TermPresentationAttribute": {"displayText":"presentation attributes","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"presentation attributes","type":"dfn","url":"https://www.w3.org/TR/SVG2/styling.html#TermPresentationAttribute"}, "https://www.w3.org/TR/SVG2/text.html#elementdef-text": {"displayText":"text","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"text","type":"element","url":"https://www.w3.org/TR/SVG2/text.html#elementdef-text"}, "https://www.w3.org/TR/SVG2/text.html#elementdef-textPath": {"displayText":"textPath","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"textpath","type":"element","url":"https://www.w3.org/TR/SVG2/text.html#elementdef-textPath"}, "https://www.w3.org/TR/SVG2/text.html#elementdef-tspan": {"displayText":"tspan","export":true,"for_":[],"level":"2","normative":true,"shortname":"svg","spec":"svg2","status":"snapshot","text":"tspan","type":"element","url":"https://www.w3.org/TR/SVG2/text.html#elementdef-tspan"}, "https://www.w3.org/TR/css-align-3/#propdef-align-content": {"displayText":"align-content","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-align","spec":"css-align-3","status":"snapshot","text":"align-content","type":"property","url":"https://www.w3.org/TR/css-align-3/#propdef-align-content"}, "https://www.w3.org/TR/css-box-4/#box-box-edge": {"displayText":"box edge","export":true,"for_":["box"],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"snapshot","text":"box edge","type":"dfn","url":"https://www.w3.org/TR/css-box-4/#box-box-edge"}, "https://www.w3.org/TR/css-break-3/#fragment": {"displayText":"fragment","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-break","spec":"css-break-3","status":"snapshot","text":"fragment","type":"dfn","url":"https://www.w3.org/TR/css-break-3/#fragment"}, "https://www.w3.org/TR/css-break-4/#box-fragment": {"displayText":"box fragment","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-break","spec":"css-break-4","status":"snapshot","text":"box fragment","type":"dfn","url":"https://www.w3.org/TR/css-break-4/#box-fragment"}, "https://www.w3.org/TR/css-break-4/#fragmentation": {"displayText":"fragmentation","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-break","spec":"css-break-4","status":"snapshot","text":"fragmentation","type":"dfn","url":"https://www.w3.org/TR/css-break-4/#fragmentation"}, "https://www.w3.org/TR/css-cascade-5/#inheritance": {"displayText":"inheritance","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"inheritance","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#inheritance"}, "https://www.w3.org/TR/css-cascade-5/#inherited-property": {"displayText":"inherited property","export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"inherited property","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#inherited-property"}, "https://www.w3.org/TR/css-contain-2/#propdef-contain": {"displayText":"contain","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-contain","spec":"css-contain-2","status":"snapshot","text":"contain","type":"property","url":"https://www.w3.org/TR/css-contain-2/#propdef-contain"}, "https://www.w3.org/TR/css-flexbox-1/#flex-container": {"displayText":"flex container","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"snapshot","text":"flex container","type":"dfn","url":"https://www.w3.org/TR/css-flexbox-1/#flex-container"}, "https://www.w3.org/TR/css-flexbox-1/#flex-formatting-context": {"displayText":"flex formatting context","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"snapshot","text":"flex formatting context","type":"dfn","url":"https://www.w3.org/TR/css-flexbox-1/#flex-formatting-context"}, "https://www.w3.org/TR/css-flexbox-1/#flex-item": {"displayText":"flex item","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"snapshot","text":"flex item","type":"dfn","url":"https://www.w3.org/TR/css-flexbox-1/#flex-item"}, "https://www.w3.org/TR/css-flexbox-1/#flex-layout": {"displayText":"flex layout","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-flexbox","spec":"css-flexbox-1","status":"snapshot","text":"flex layout","type":"dfn","url":"https://www.w3.org/TR/css-flexbox-1/#flex-layout"}, "https://www.w3.org/TR/css-grid-2/#grid-container": {"displayText":"grid container","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"snapshot","text":"grid container","type":"dfn","url":"https://www.w3.org/TR/css-grid-2/#grid-container"}, "https://www.w3.org/TR/css-grid-2/#grid-formatting-context": {"displayText":"grid formatting context","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"snapshot","text":"grid formatting context","type":"dfn","url":"https://www.w3.org/TR/css-grid-2/#grid-formatting-context"}, "https://www.w3.org/TR/css-grid-2/#grid-item": {"displayText":"grid item","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"snapshot","text":"grid item","type":"dfn","url":"https://www.w3.org/TR/css-grid-2/#grid-item"}, "https://www.w3.org/TR/css-grid-2/#subgrid": {"displayText":"subgrid","export":true,"for_":[],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"snapshot","text":"subgrid","type":"dfn","url":"https://www.w3.org/TR/css-grid-2/#subgrid"}, "https://www.w3.org/TR/css-grid-2/#valdef-grid-template-rows-subgrid": {"displayText":"subgrid","export":true,"for_":["grid-template-rows","grid-template-columns"],"level":"2","normative":true,"shortname":"css-grid","spec":"css-grid-2","status":"snapshot","text":"subgrid","type":"value","url":"https://www.w3.org/TR/css-grid-2/#valdef-grid-template-rows-subgrid"}, "https://www.w3.org/TR/css-images-3/#natural-dimensions": {"displayText":"natural dimension","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-images","spec":"css-images-3","status":"snapshot","text":"natural dimension","type":"dfn","url":"https://www.w3.org/TR/css-images-3/#natural-dimensions"}, "https://www.w3.org/TR/css-inline-3/#root-inline-box": {"displayText":"root inline box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"snapshot","text":"root inline box","type":"dfn","url":"https://www.w3.org/TR/css-inline-3/#root-inline-box"}, "https://www.w3.org/TR/css-overflow-3/#scroll-container": {"displayText":"scroll container","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"snapshot","text":"scroll container","type":"dfn","url":"https://www.w3.org/TR/css-overflow-3/#scroll-container"}, "https://www.w3.org/TR/css-position-3/#absolute-position": {"displayText":"absolutely position","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-position","spec":"css-position-3","status":"snapshot","text":"absolutely position","type":"dfn","url":"https://www.w3.org/TR/css-position-3/#absolute-position"}, "https://www.w3.org/TR/css-pseudo-4/#first-formatted-line": {"displayText":"first formatted line","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"snapshot","text":"first formatted line","type":"dfn","url":"https://www.w3.org/TR/css-pseudo-4/#first-formatted-line"}, "https://www.w3.org/TR/css-pseudo-4/#selectordef-after": {"displayText":"::after","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"snapshot","text":"::after","type":"selector","url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-after"}, "https://www.w3.org/TR/css-pseudo-4/#selectordef-before": {"displayText":"::before","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"snapshot","text":"::before","type":"selector","url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-before"}, "https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter": {"displayText":"::first-letter","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"snapshot","text":"::first-letter","type":"selector","url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-first-letter"}, "https://www.w3.org/TR/css-pseudo-4/#selectordef-first-line": {"displayText":"::first-line","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"snapshot","text":"::first-line","type":"selector","url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-first-line"}, "https://www.w3.org/TR/css-pseudo-4/#selectordef-marker": {"displayText":"::marker","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-pseudo","spec":"css-pseudo-4","status":"snapshot","text":"::marker","type":"selector","url":"https://www.w3.org/TR/css-pseudo-4/#selectordef-marker"}, "https://www.w3.org/TR/css-ruby-1/#ruby-base-container-box": {"displayText":"ruby base container","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-ruby","spec":"css-ruby-1","status":"snapshot","text":"ruby base container","type":"dfn","url":"https://www.w3.org/TR/css-ruby-1/#ruby-base-container-box"}, "https://www.w3.org/TR/css-ruby-1/#ruby-container": {"displayText":"ruby container","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-ruby","spec":"css-ruby-1","status":"snapshot","text":"ruby container","type":"dfn","url":"https://www.w3.org/TR/css-ruby-1/#ruby-container"}, "https://www.w3.org/TR/css-ruby-1/#ruby-formatting-context": {"displayText":"ruby formatting context","export":true,"for_":[],"level":"1","normative":true,"shortname":"css-ruby","spec":"css-ruby-1","status":"snapshot","text":"ruby formatting context","type":"dfn","url":"https://www.w3.org/TR/css-ruby-1/#ruby-formatting-context"}, "https://www.w3.org/TR/css-speech-1/#valdef-speak-always": {"displayText":"always","export":true,"for_":["speak"],"level":"1","normative":true,"shortname":"css-speech","spec":"css-speech-1","status":"snapshot","text":"always","type":"value","url":"https://www.w3.org/TR/css-speech-1/#valdef-speak-always"}, "https://www.w3.org/TR/css-tables-3/#table-grid-box": {"displayText":"table grid box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-tables","spec":"css-tables-3","status":"snapshot","text":"table grid box","type":"dfn","url":"https://www.w3.org/TR/css-tables-3/#table-grid-box"}, "https://www.w3.org/TR/css-tables-3/#table-wrapper-box": {"displayText":"table wrapper box","export":true,"for_":[],"level":"3","normative":true,"shortname":"css-tables","spec":"css-tables-3","status":"snapshot","text":"table wrapper box","type":"dfn","url":"https://www.w3.org/TR/css-tables-3/#table-wrapper-box"}, "https://www.w3.org/TR/css-text-4/#white-space": {"displayText":"white space","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-text","spec":"css-text-4","status":"snapshot","text":"white space","type":"dfn","url":"https://www.w3.org/TR/css-text-4/#white-space"}, "https://www.w3.org/TR/css-values-4/#comb-all": {"displayText":"&&","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"&&","type":"grammar","url":"https://www.w3.org/TR/css-values-4/#comb-all"}, "https://www.w3.org/TR/css-values-4/#comb-any": {"displayText":"||","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"||","type":"grammar","url":"https://www.w3.org/TR/css-values-4/#comb-any"}, "https://www.w3.org/TR/css-values-4/#comb-one": {"displayText":"|","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"|","type":"grammar","url":"https://www.w3.org/TR/css-values-4/#comb-one"}, "https://www.w3.org/TR/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":"snapshot","text":"css-wide keywords","type":"dfn","url":"https://www.w3.org/TR/css-values-4/#css-wide-keywords"}, "https://www.w3.org/TR/css-values-4/#integer-value": {"displayText":"<integer>","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"<integer>","type":"type","url":"https://www.w3.org/TR/css-values-4/#integer-value"}, "https://www.w3.org/TR/css-values-4/#mult-opt": {"displayText":"?","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"?","type":"grammar","url":"https://www.w3.org/TR/css-values-4/#mult-opt"}, "https://www.w3.org/TR/css-values-4/#small-viewport-size": {"displayText":"small viewport size","export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"small viewport size","type":"dfn","url":"https://www.w3.org/TR/css-values-4/#small-viewport-size"}, "https://www.w3.org/TR/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":"snapshot","text":"principal writing mode","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#principal-writing-mode"}, "https://www.w3.org/TR/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":"snapshot","text":"writing mode","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#writing-mode"}, "https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle": {"displayText":"getComputedStyle(elt)","export":true,"for_":["Window"],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"snapshot","text":"getComputedStyle(elt)","type":"method","url":"https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle"}, "https://www.w3.org/TR/mediaqueries-5/#continuous-media": {"displayText":"continuous media","export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"snapshot","text":"continuous media","type":"dfn","url":"https://www.w3.org/TR/mediaqueries-5/#continuous-media"}, "https://www.w3.org/TR/mediaqueries-5/#paged-media": {"displayText":"paged media","export":true,"for_":[],"level":"5","normative":true,"shortname":"mediaqueries","spec":"mediaqueries-5","status":"snapshot","text":"paged media","type":"dfn","url":"https://www.w3.org/TR/mediaqueries-5/#paged-media"}, "https://www.w3.org/TR/selectors-4/#document-language": {"displayText":"document language","export":true,"for_":[],"level":"4","normative":true,"shortname":"selectors","spec":"selectors-4","status":"snapshot","text":"document language","type":"dfn","url":"https://www.w3.org/TR/selectors-4/#document-language"}, "https://www.w3.org/TR/selectors-4/#pseudo-element": {"displayText":"pseudo-element","export":true,"for_":[],"level":"4","normative":true,"shortname":"selectors","spec":"selectors-4","status":"snapshot","text":"pseudo-element","type":"dfn","url":"https://www.w3.org/TR/selectors-4/#pseudo-element"}, }; function mkRefHint(link, ref) { const linkText = link.textContent; let dfnTextElements = ''; if (ref.displayText.toLowerCase() != linkText.toLowerCase()) { // Give the original term if it's being displayed in a different way. // But allow casing differences, they're insignificant. dfnTextElements = mk.li({}, mk.b({}, "Term: "), mk.span({}, ref.displayText) ); } const forList = ref.for_; let forListElements; if(forList.length == 0) { forListElements = []; } else if(forList.length == 1) { forListElements = mk.li({}, mk.b({}, "For: "), mk.span({}, forList[0]), ); } else { forListElements = mk.li({}, mk.b({}, "For: "), mk.ul({}, ...forList.map(forItem => mk.li({}, mk.span({}, forItem) ), ), ), ); } const url = ref.url; const safeUrl = encodeURIComponent(url); const hintPanel = mk.aside({ class: "ref-hint", id: `ref-hint-for-${safeUrl}`, "data-for": url, "aria-labelled-by": `ref-hint-for-${safeUrl}`, }, mk.ul({}, dfnTextElements, mk.li({}, mk.b({}, "URL: "), mk.a({ href: url, class: "ref" }, url), ), mk.li({}, mk.b({}, "Type: "), mk.span({}, `${ref.type}`), ), mk.li({}, mk.b({}, "Spec: "), mk.span({}, `${ref.spec ? ref.spec : ''}`), ), forListElements ), ); hintPanel.forLink = link; setupRefHintEventListeners(link, hintPanel); return hintPanel; } function hideAllRefHints() { queryAll(".ref-hint").forEach(el=>hideRefHint(el)); } function hideRefHint(refHint) { const link = refHint.forLink; link.setAttribute("aria-expanded", "false"); if(refHint.teardownEventListeners) { refHint.teardownEventListeners(); } refHint.remove(); } function showRefHint(link) { if(link.classList.contains("dfn-link")) return; const url = link.getAttribute("href"); const ref = refsData[url]; if(!ref) return; hideAllRefHints(); // Only display one at this time. const refHint = mkRefHint(link, ref); append(document.body, refHint); link.setAttribute("aria-expanded", "true"); positionRefHint(refHint); } function setupRefHintEventListeners(link, refHint) { if (refHint.teardownEventListeners) return; // Add event handlers to hide the refHint after the user moves away // from both the link and refHint, if not hovering either within one second. let timeout = null; const startHidingRefHint = (event) => { if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { hideRefHint(refHint); }, 1000); } const resetHidingRefHint = (event) => { if (timeout) clearTimeout(timeout); timeout = null; }; link.addEventListener("mouseleave", startHidingRefHint); link.addEventListener("mouseenter", resetHidingRefHint); link.addEventListener("blur", startHidingRefHint); link.addEventListener("focus", resetHidingRefHint); refHint.addEventListener("mouseleave", startHidingRefHint); refHint.addEventListener("mouseenter", resetHidingRefHint); refHint.addEventListener("blur", startHidingRefHint); refHint.addEventListener("focus", resetHidingRefHint); refHint.teardownEventListeners = () => { // remove event listeners resetHidingRefHint(); link.removeEventListener("mouseleave", startHidingRefHint); link.removeEventListener("mouseenter", resetHidingRefHint); link.removeEventListener("blur", startHidingRefHint); link.removeEventListener("focus", resetHidingRefHint); refHint.removeEventListener("mouseleave", startHidingRefHint); refHint.removeEventListener("mouseenter", resetHidingRefHint); refHint.removeEventListener("blur", startHidingRefHint); refHint.removeEventListener("focus", resetHidingRefHint); }; } function positionRefHint(refHint) { const link = refHint.forLink; const linkPos = getBounds(link); refHint.style.top = linkPos.bottom + "px"; refHint.style.left = linkPos.left + "px"; const panelPos = refHint.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount); refHint.style.left = newLeft + "px"; } } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function showRefHintListener(e) { // If the target isn't in a link (or is a link), // just ignore it. let link = e.target.closest("a"); if(!link) return; // If the target is in a ref-hint panel // (aka a link in the already-open one), // also just ignore it. if(link.closest(".ref-hint")) return; // Otherwise, show the panel for the link. showRefHint(link); } function hideAllHintsListener(e) { // If the click is inside a ref-hint panel, ignore it. if(e.target.closest(".ref-hint")) return; // Otherwise, close all the current panels. hideAllRefHints(); } document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("mousedown", showRefHintListener); document.body.addEventListener("focus", showRefHintListener); document.body.addEventListener("click", hideAllHintsListener); }); window.addEventListener("resize", () => { // Hide any open ref hint. hideAllRefHints(); }); } </script>