CINXE.COM
CSS Text 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 Text Module Level 3</title> <meta content="CRD" name="w3c-status"> <meta content="Bikeshed version 828e63d35, updated Fri Sep 20 07:33:07 2024 -0700" name="generator"> <link href="https://www.w3.org/TR/css-text-3/" rel="canonical"> <meta content="f6f87e8a658db9c9da864b228ddb5097e23c871a" name="revision"> <meta content="dark light" name="color-scheme"> <style type="text/css"> img { vertical-align: middle; } span[lang] { font-size: 125%; line-height: 1; vertical-align: middle; } /* Bidi & spaces example */ .egbidiwsaA,.egbidiwsbB,.egbidiwsaB,.egbidiwsbC { white-space: pre; font-size: 80%; font-family: monospace; vertical-align: 2px; margin: 1px; } .egbidiwsaA { background: lime; padding: 2px; } .egbidiwsbB { border: 2px solid blue; } .egbidiwsaB { background: yellow; border: 2px dotted white; } .egbidiwsbC { border:2px dotted red; } .hyphens-ex { border: thin solid black; display: inline-block; padding: 4pt; } /* Start Letter-spacing Tutorial */ .ls-ex { font-size: 200%; margin-left: 1em; margin-right: 1em; } .ls-fixed-width { width: 10em; } .color-box { background: rgb(224, 203, 82); } .bad { color: red; } .good { color: green; } /* End Letter-spacing Tutorial */ .char { border: 1px dotted gray; } .quarter { font-size: 25%; } tt[lang="ja"] { font-family: "MS Gothic", "Osaka", monospace; } div.figure table { margin: auto; } .feedback { background: #FFEECC; border-color: orange; } .feedback:before { content: "Info Needed"; color: #FF8800; } .data .no { color: red; } .data .ok { color: green; } .data th em { display: block; font-size: smaller; font-weight: normal; font-style: italic; } .no-quote.no-quote::before, .no-quote.no-quote::after { content: none; } /* Displaying the output of text layout, particularly when line-breaking is being invoked, and thus having a visible width is good. */ pre.output { margin: 1em; border: solid thin silver; padding: 0.25em; display: table; } </style> <style> #jp-title-break td samp, #jp-title-break td pre { font-size: 1.5em; width: 9em; line-height: 2; padding: 0.5em 1em; display: block; margin: auto; border: solid gray 1px; background: white; } </style> <style> .pairs-table th { text-align: center; } </style> <style>/* Boilerplate: style-autolinks */ .css.css, .property.property, .descriptor.descriptor { color: var(--a-normal-text); font-size: inherit; font-family: inherit; } .css::before, .property::before, .descriptor::before { content: "‘"; } .css::after, .property::after, .descriptor::after { content: "’"; } .property, .descriptor { /* Don't wrap property and descriptor names */ white-space: nowrap; } .type { /* CSS value <type> */ font-style: italic; } pre .property::before, pre .property::after { content: ""; } [data-link-type="property"]::before, [data-link-type="propdesc"]::before, [data-link-type="descriptor"]::before, [data-link-type="value"]::before, [data-link-type="function"]::before, [data-link-type="at-rule"]::before, [data-link-type="selector"]::before, [data-link-type="maybe"]::before { content: "‘"; } [data-link-type="property"]::after, [data-link-type="propdesc"]::after, [data-link-type="descriptor"]::after, [data-link-type="value"]::after, [data-link-type="function"]::after, [data-link-type="at-rule"]::after, [data-link-type="selector"]::after, [data-link-type="maybe"]::after { content: "’"; } [data-link-type].production::before, [data-link-type].production::after, .prod [data-link-type]::before, .prod [data-link-type]::after { content: ""; } [data-link-type=element], [data-link-type=element-attr] { font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace; font-size: .9em; } [data-link-type=element]::before { content: "<" } [data-link-type=element]::after { content: ">" } [data-link-type=biblio] { white-space: pre; } @media (prefers-color-scheme: dark) { :root { --selflink-text: black; --selflink-bg: silver; --selflink-hover-text: white; } } </style> <style>/* Boilerplate: style-colors */ /* Any --*-text not paired with a --*-bg is assumed to have a transparent bg */ :root { color-scheme: light dark; --text: black; --bg: white; --unofficial-watermark: url(https://www.w3.org/StyleSheets/TR/2016/logos/UD-watermark); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #707070; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #f8f8f8; --tocnav-active-text: #c00; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #f7f8f9; --tocsidebar-shadow: rgba(0,0,0,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #3980b5; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #005a9c; --hr-text: var(--text); --algo-border: #def; --del-text: red; --del-bg: transparent; --ins-text: #080; --ins-bg: transparent; --a-normal-text: #034575; --a-normal-underline: #bbb; --a-visited-text: var(--a-normal-text); --a-visited-underline: #707070; --a-hover-bg: rgba(75%, 75%, 75%, .25); --a-active-text: #c00; --a-active-underline: #c00; --blockquote-border: silver; --blockquote-bg: transparent; --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: #fbe9e9; --issue-text: var(--text); --issueheading-text: #831616; --example-border: #e0cb52; --example-bg: #fcfaee; --example-text: var(--text); --exampleheading-text: #574b0f; --note-border: #52e052; --note-bg: #e9fbe9; --note-text: var(--text); --noteheading-text: hsl(120, 70%, 30%); --notesummary-underline: silver; --assertion-border: #aaa; --assertion-bg: #eee; --assertion-text: black; --advisement-border: orange; --advisement-bg: #fec; --advisement-text: var(--text); --advisementheading-text: #b35f00; --warning-border: red; --warning-bg: hsla(40,100%,50%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #F5F0FF; --amendment-text: var(--text); --amendmentheading-text: #220066; --def-border: #8ccbf2; --def-bg: #def; --def-text: var(--text); --defrow-border: #bbd7e9; --datacell-border: silver; --indexinfo-text: #707070; --indextable-hover-text: black; --indextable-hover-bg: #f7f8f9; --outdatedspec-bg: rgba(0, 0, 0, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } @media (prefers-color-scheme: dark) { :root { --text: #ddd; --bg: black; --unofficial-watermark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cg fill='%23100808' transform='translate(200 200) rotate(-45) translate(-200 -200)' stroke='%23100808' stroke-width='3'%3E%3Ctext x='50%25' y='220' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EUNOFFICIAL%3C/text%3E%3Ctext x='50%25' y='305' style='font: bold 70px sans-serif; text-anchor: middle; letter-spacing: 6px;'%3EDRAFT%3C/text%3E%3C/g%3E%3C/svg%3E"); --logo-bg: #1a5e9a; --logo-active-bg: #c00; --logo-text: white; --tocnav-normal-text: #999; --tocnav-normal-bg: var(--bg); --tocnav-hover-text: var(--tocnav-normal-text); --tocnav-hover-bg: #080808; --tocnav-active-text: #f44; --tocnav-active-bg: var(--tocnav-normal-bg); --tocsidebar-text: var(--text); --tocsidebar-bg: #080808; --tocsidebar-shadow: rgba(255,255,255,.1); --tocsidebar-heading-text: hsla(203,20%,40%,.7); --toclink-text: var(--text); --toclink-underline: #6af; --toclink-visited-text: var(--toclink-text); --toclink-visited-underline: #054572; --heading-text: #8af; --hr-text: var(--text); --algo-border: #456; --del-text: #f44; --del-bg: transparent; --ins-text: #4a4; --ins-bg: transparent; --a-normal-text: #6af; --a-normal-underline: #555; --a-visited-text: var(--a-normal-text); --a-visited-underline: var(--a-normal-underline); --a-hover-bg: rgba(25%, 25%, 25%, .2); --a-active-text: #f44; --a-active-underline: var(--a-active-text); --borderedblock-bg: rgba(255, 255, 255, .05); --blockquote-border: silver; --blockquote-bg: var(--borderedblock-bg); --blockquote-text: currentcolor; --issue-border: #e05252; --issue-bg: var(--borderedblock-bg); --issue-text: var(--text); --issueheading-text: hsl(0deg, 70%, 70%); --example-border: hsl(50deg, 90%, 60%); --example-bg: var(--borderedblock-bg); --example-text: var(--text); --exampleheading-text: hsl(50deg, 70%, 70%); --note-border: hsl(120deg, 100%, 35%); --note-bg: var(--borderedblock-bg); --note-text: var(--text); --noteheading-text: hsl(120, 70%, 70%); --notesummary-underline: silver; --assertion-border: #444; --assertion-bg: var(--borderedblock-bg); --assertion-text: var(--text); --advisement-border: orange; --advisement-bg: #222218; --advisement-text: var(--text); --advisementheading-text: #f84; --warning-border: red; --warning-bg: hsla(40,100%,20%,0.95); --warning-text: var(--text); --amendment-border: #330099; --amendment-bg: #080010; --amendment-text: var(--text); --amendmentheading-text: #cc00ff; --def-border: #8ccbf2; --def-bg: #080818; --def-text: var(--text); --defrow-border: #136; --datacell-border: silver; --indexinfo-text: #aaa; --indextable-hover-text: var(--text); --indextable-hover-bg: #181818; --outdatedspec-bg: rgba(255, 255, 255, .5); --outdatedspec-text: black; --outdated-bg: maroon; --outdated-text: white; --outdated-shadow: red; --editedrec-bg: darkorange; } /* In case a transparent-bg image doesn't expect to be on a dark bg, which is quite common in practice... */ img { background: white; } } </style> <style>/* Boilerplate: style-counters */ body { counter-reset: example figure issue; } .issue { counter-increment: issue; } .issue:not(.no-marker)::before { content: "Issue " counter(issue); } .example { counter-increment: example; } .example:not(.no-marker)::before { content: "Example " counter(example); } .invalid.example:not(.no-marker)::before, .illegal.example:not(.no-marker)::before { content: "Invalid Example" counter(example); } figcaption { counter-increment: figure; } figcaption:not(.no-marker)::before { content: "Figure " counter(figure) " "; } </style> <style>/* Boilerplate: style-dfn-panel */ :root { --dfnpanel-bg: #ddd; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #ffc; --dfnpanel-target-outline: orange; } @media (prefers-color-scheme: dark) { :root { --dfnpanel-bg: #222; --dfnpanel-text: var(--text); --dfnpanel-target-bg: #333; --dfnpanel-target-outline: silver; } } .dfn-panel { position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.75em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--dfnpanel-bg); color: var(--dfnpanel-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .dfn-panel:not(.on) { display: none; } .dfn-panel * { margin: 0; padding: 0; text-indent: 0; } .dfn-panel > b { display: block; } .dfn-panel a { color: var(--dfnpanel-text); } .dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; } .dfn-panel a:focus { outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color; } .dfn-panel > b + b { margin-top: 0.25em; } .dfn-panel ul { padding: 0 0 0 1em; list-style: none; } .dfn-panel li a { max-width: calc(300px - 1.5em - 1em); overflow: hidden; text-overflow: ellipsis; } .dfn-panel.activated { display: inline-block; position: fixed; left: 8px; bottom: 2em; margin: 0 auto; max-width: calc(100vw - 1.5em - .4em - .5em); max-height: 30vh; transition: left 1s ease-out, bottom 1s ease-out; } .dfn-panel .link-item:hover { text-decoration: underline; } .dfn-panel .link-item .copy-icon { opacity: 0; } .dfn-panel .link-item:hover .copy-icon, .dfn-panel .link-item .copy-icon:focus { opacity: 1; } .dfn-panel .copy-icon { display: inline-block; margin-right: 0.5em; width: 0.85em; height: 1em; border-radius: 3px; background-color: #ccc; cursor: pointer; } .dfn-panel .copy-icon .icon { width: 100%; height: 100%; background-color: #fff; display: flex; justify-content: center; align-items: center; position: relative; } .dfn-panel .copy-icon .icon::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid black; background-color: #ccc; opacity: 0.25; transform: translate(3px, -3px); } .dfn-panel .copy-icon:active .icon::before { opacity: 1; } .dfn-paneled[role="button"] { cursor: help; } .highlighted { animation: target-fade 3s; } @keyframes target-fade { from { background-color: var(--dfnpanel-target-bg); outline: 5px solid var(--dfnpanel-target-outline); } to { color: var(--a-normal-text); background-color: transparent; outline: transparent; } } </style> <style>/* Boilerplate: style-issues */ a[href].issue-return { float: right; float: inline-end; color: var(--issueheading-text); font-weight: bold; text-decoration: none; } </style> <style>/* Boilerplate: style-md-lists */ /* This is a weird hack for me not yet following the commonmark spec regarding paragraph and lists. */ [data-md] > :first-child { margin-top: 0; } [data-md] > :last-child { margin-bottom: 0; } </style> <style>/* Boilerplate: style-ref-hints */ :root { --ref-hint-bg: #ddd; --ref-hint-text: var(--text); } @media (prefers-color-scheme: dark) { :root { --ref-hint-bg: #222; --ref-hint-text: var(--text); } } .ref-hint { display: inline-block; position: absolute; z-index: 35; width: 20em; width: 300px; height: auto; max-height: 500px; overflow: auto; padding: 0.5em 0.5em; font: small Helvetica Neue, sans-serif, Droid Sans Fallback; background: var(--ref-hint-bg); color: var(--ref-hint-text); border: outset 0.2em; white-space: normal; /* in case it's moved into a pre */ } .ref-hint * { margin: 0; padding: 0; text-indent: 0; } .ref-hint ul { padding: 0 0 0 1em; list-style: none; } </style> <style>/* Boilerplate: style-selflinks */ :root { --selflink-text: white; --selflink-bg: gray; --selflink-hover-text: black; } .heading, .issue, .note, .example, li, dt { position: relative; } a.self-link { position: absolute; top: 0; left: calc(-1 * (3.5rem - 26px)); width: calc(3.5rem - 26px); height: 2em; text-align: center; border: none; transition: opacity .2s; opacity: .5; } a.self-link:hover { opacity: 1; } .heading > a.self-link { font-size: 83%; } .example > a.self-link, .note > a.self-link, .issue > a.self-link { /* These blocks are overflow:auto, so positioning outside doesn't work. */ left: auto; right: 0; } li > a.self-link { left: calc(-1 * (3.5rem - 26px) - 2em); } dfn > a.self-link { top: auto; left: auto; opacity: 0; width: 1.5em; height: 1.5em; background: var(--selflink-bg); color: var(--selflink-text); font-style: normal; transition: opacity .2s, background-color .2s, color .2s; } dfn:hover > a.self-link { opacity: 1; } dfn > a.self-link:hover { color: var(--selflink-hover-text); } a.self-link::before { content: "¶"; } .heading > a.self-link::before { content: "§"; } dfn > a.self-link::before { content: "#"; } </style> <style>/* Boilerplate: style-syntax-highlighting */ code.highlight { padding: .1em; border-radius: .3em; } pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; } .highlight:not(.idl) { background: rgba(0, 0, 0, .03); } c-[a] { color: #990055 } /* Keyword.Declaration */ c-[b] { color: #990055 } /* Keyword.Type */ c-[c] { color: #708090 } /* Comment */ c-[d] { color: #708090 } /* Comment.Multiline */ c-[e] { color: #0077aa } /* Name.Attribute */ c-[f] { color: #669900 } /* Name.Tag */ c-[g] { color: #222222 } /* Name.Variable */ c-[k] { color: #990055 } /* Keyword */ c-[l] { color: #000000 } /* Literal */ c-[m] { color: #000000 } /* Literal.Number */ c-[n] { color: #0077aa } /* Name */ c-[o] { color: #999999 } /* Operator */ c-[p] { color: #999999 } /* Punctuation */ c-[s] { color: #a67f59 } /* Literal.String */ c-[t] { color: #a67f59 } /* Literal.String.Single */ c-[u] { color: #a67f59 } /* Literal.String.Double */ c-[cp] { color: #708090 } /* Comment.Preproc */ c-[c1] { color: #708090 } /* Comment.Single */ c-[cs] { color: #708090 } /* Comment.Special */ c-[kc] { color: #990055 } /* Keyword.Constant */ c-[kn] { color: #990055 } /* Keyword.Namespace */ c-[kp] { color: #990055 } /* Keyword.Pseudo */ c-[kr] { color: #990055 } /* Keyword.Reserved */ c-[ld] { color: #000000 } /* Literal.Date */ c-[nc] { color: #0077aa } /* Name.Class */ c-[no] { color: #0077aa } /* Name.Constant */ c-[nd] { color: #0077aa } /* Name.Decorator */ c-[ni] { color: #0077aa } /* Name.Entity */ c-[ne] { color: #0077aa } /* Name.Exception */ c-[nf] { color: #0077aa } /* Name.Function */ c-[nl] { color: #0077aa } /* Name.Label */ c-[nn] { color: #0077aa } /* Name.Namespace */ c-[py] { color: #0077aa } /* Name.Property */ c-[ow] { color: #999999 } /* Operator.Word */ c-[mb] { color: #000000 } /* Literal.Number.Bin */ c-[mf] { color: #000000 } /* Literal.Number.Float */ c-[mh] { color: #000000 } /* Literal.Number.Hex */ c-[mi] { color: #000000 } /* Literal.Number.Integer */ c-[mo] { color: #000000 } /* Literal.Number.Oct */ c-[sb] { color: #a67f59 } /* Literal.String.Backtick */ c-[sc] { color: #a67f59 } /* Literal.String.Char */ c-[sd] { color: #a67f59 } /* Literal.String.Doc */ c-[se] { color: #a67f59 } /* Literal.String.Escape */ c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */ c-[si] { color: #a67f59 } /* Literal.String.Interpol */ c-[sx] { color: #a67f59 } /* Literal.String.Other */ c-[sr] { color: #a67f59 } /* Literal.String.Regex */ c-[ss] { color: #a67f59 } /* Literal.String.Symbol */ c-[vc] { color: #0077aa } /* Name.Variable.Class */ c-[vg] { color: #0077aa } /* Name.Variable.Global */ c-[vi] { color: #0077aa } /* Name.Variable.Instance */ c-[il] { color: #000000 } /* Literal.Number.Integer.Long */ @media (prefers-color-scheme: dark) { .highlight:not(.idl) { background: rgba(255, 255, 255, .05); } c-[a] { color: #d33682 } /* Keyword.Declaration */ c-[b] { color: #d33682 } /* Keyword.Type */ c-[c] { color: #2aa198 } /* Comment */ c-[d] { color: #2aa198 } /* Comment.Multiline */ c-[e] { color: #268bd2 } /* Name.Attribute */ c-[f] { color: #b58900 } /* Name.Tag */ c-[g] { color: #cb4b16 } /* Name.Variable */ c-[k] { color: #d33682 } /* Keyword */ c-[l] { color: #657b83 } /* Literal */ c-[m] { color: #657b83 } /* Literal.Number */ c-[n] { color: #268bd2 } /* Name */ c-[o] { color: #657b83 } /* Operator */ c-[p] { color: #657b83 } /* Punctuation */ c-[s] { color: #6c71c4 } /* Literal.String */ c-[t] { color: #6c71c4 } /* Literal.String.Single */ c-[u] { color: #6c71c4 } /* Literal.String.Double */ c-[ch] { color: #2aa198 } /* Comment.Hashbang */ c-[cp] { color: #2aa198 } /* Comment.Preproc */ c-[cpf] { color: #2aa198 } /* Comment.PreprocFile */ c-[c1] { color: #2aa198 } /* Comment.Single */ c-[cs] { color: #2aa198 } /* Comment.Special */ c-[kc] { color: #d33682 } /* Keyword.Constant */ c-[kn] { color: #d33682 } /* Keyword.Namespace */ c-[kp] { color: #d33682 } /* Keyword.Pseudo */ c-[kr] { color: #d33682 } /* Keyword.Reserved */ c-[ld] { color: #657b83 } /* Literal.Date */ c-[nc] { color: #268bd2 } /* Name.Class */ c-[no] { color: #268bd2 } /* Name.Constant */ c-[nd] { color: #268bd2 } /* Name.Decorator */ c-[ni] { color: #268bd2 } /* Name.Entity */ c-[ne] { color: #268bd2 } /* Name.Exception */ c-[nf] { color: #268bd2 } /* Name.Function */ c-[nl] { color: #268bd2 } /* Name.Label */ c-[nn] { color: #268bd2 } /* Name.Namespace */ c-[py] { color: #268bd2 } /* Name.Property */ c-[ow] { color: #657b83 } /* Operator.Word */ c-[mb] { color: #657b83 } /* Literal.Number.Bin */ c-[mf] { color: #657b83 } /* Literal.Number.Float */ c-[mh] { color: #657b83 } /* Literal.Number.Hex */ c-[mi] { color: #657b83 } /* Literal.Number.Integer */ c-[mo] { color: #657b83 } /* Literal.Number.Oct */ c-[sa] { color: #6c71c4 } /* Literal.String.Affix */ c-[sb] { color: #6c71c4 } /* Literal.String.Backtick */ c-[sc] { color: #6c71c4 } /* Literal.String.Char */ c-[dl] { color: #6c71c4 } /* Literal.String.Delimiter */ c-[sd] { color: #6c71c4 } /* Literal.String.Doc */ c-[se] { color: #6c71c4 } /* Literal.String.Escape */ c-[sh] { color: #6c71c4 } /* Literal.String.Heredoc */ c-[si] { color: #6c71c4 } /* Literal.String.Interpol */ c-[sx] { color: #6c71c4 } /* Literal.String.Other */ c-[sr] { color: #6c71c4 } /* Literal.String.Regex */ c-[ss] { color: #6c71c4 } /* Literal.String.Symbol */ c-[fm] { color: #268bd2 } /* Name.Function.Magic */ c-[vc] { color: #cb4b16 } /* Name.Variable.Class */ c-[vg] { color: #cb4b16 } /* Name.Variable.Global */ c-[vi] { color: #cb4b16 } /* Name.Variable.Instance */ c-[vm] { color: #cb4b16 } /* Name.Variable.Magic */ c-[il] { color: #657b83 } /* Literal.Number.Integer.Long */ } </style> <link href="https://www.w3.org/StyleSheets/TR/2021/W3C-CRD" rel="stylesheet"> <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 Text Module Level 3</h1> <p id="w3c-state"><a href="https://www.w3.org/standards/types#CRD">W3C Candidate Recommendation Draft</a>, <time class="dt-updated" datetime="2024-09-30">30 September 2024</time></p> <details open> <summary>More details about this document</summary> <div data-fill-with="spec-metadata"> <dl> <dt>This version: <dd><a class="u-url" href="https://www.w3.org/TR/2024/CRD-css-text-3-20240930/">https://www.w3.org/TR/2024/CRD-css-text-3-20240930/</a> <dt>Latest published version: <dd><a href="https://www.w3.org/TR/css-text-3/">https://www.w3.org/TR/css-text-3/</a> <dt>Editor's Draft: <dd><a href="https://drafts.csswg.org/css-text-3/">https://drafts.csswg.org/css-text-3/</a> <dt>Previous Versions: <dd><a href="https://www.w3.org/TR/2023/CRD-css-text-3-20230903/" rel="prev">https://www.w3.org/TR/2023/CRD-css-text-3-20230903/</a> <dt>History: <dd><a class="u-url" href="https://www.w3.org/standards/history/css-text-3/">https://www.w3.org/standards/history/css-text-3/</a> <dt>Implementation Report: <dd><a href="https://test.csswg.org/harness/results/css-text-3_dev/grouped/">https://test.csswg.org/harness/results/css-text-3_dev/grouped/</a> <dt>Test Suites: <dd><a href="http://test.csswg.org/suites/css3-text/nightly-unstable/">http://test.csswg.org/suites/css3-text/nightly-unstable/</a> <dd class="wpt-overview"><a href="https://wpt.fyi/results/css/css-text/">https://wpt.fyi/results/css/css-text/</a> <dt>Feedback: <dd><a href="https://github.com/w3c/csswg-drafts/labels/css-text-3">CSSWG Issues Repository</a> <dt class="editor">Editors: <dd class="editor p-author h-card vcard" data-editor-id="35400"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Apple</span>) <dd class="editor p-author h-card vcard" data-editor-id="45369"><a class="p-name fn u-email email" href="mailto:kojiishi@gluesoft.co.jp">Koji Ishii</a> (<span class="p-org org">Invited Expert</span>) <dd class="editor p-author h-card vcard" data-editor-id="43241"><a class="p-name fn u-url url" href="https://florian.rivoal.net">Florian Rivoal</a> (<span class="p-org org">Invited Expert</span>) <dt>Suggest an Edit for this Spec: <dd><a href="https://github.com/w3c/csswg-drafts/blob/main/css-text-3/Overview.bs">GitHub Editor</a> <dt>Test Coverage Analysis: <dd><a href="https://drafts.csswg.org/css-text-3/test-coverage">https://drafts.csswg.org/css-text-3/test-coverage</a> </dl> </div> </details> <div data-fill-with="warning"></div> <p class="copyright" data-fill-with="copyright"><a href="https://www.w3.org/policies/#copyright">Copyright</a> © 2024 <a href="https://www.w3.org/">World Wide Web Consortium</a>. <abbr title="World Wide Web Consortium">W3C</abbr><sup>®</sup> <a href="https://www.w3.org/policies/#Legal_Disclaimer">liability</a>, <a href="https://www.w3.org/policies/#W3C_Trademarks">trademark</a> and <a href="https://www.w3.org/copyright/software-license/" rel="license" title="W3C Software and Document License">permissive document license</a> rules apply. </p> <hr title="Separator for header"> </div> <div class="p-summary" data-fill-with="abstract"> <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2> <p>This CSS module defines properties for text manipulation and specifies their processing model. It covers line breaking, justification and alignment, white space handling, and text transformation.</p> <a href="https://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, etc. </div> <h2 class="no-num no-toc no-ref heading settled" id="sotd"><span class="content">Status of this document</span></h2> <div data-fill-with="status"> <p><em>This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the <a href="https://www.w3.org/TR/">W3C technical reports index at https://www.w3.org/TR/.</a></em> </p> <p> This document was published by the <a href="https://www.w3.org/groups/wg/css">CSS Working Group</a> as a <strong>Candidate Recommendation Draft</strong> using the <a href="https://www.w3.org/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 Draft integrates changes from the previous Candidate Recommendation that the Working Group intends to include in a subsequent Candidate Recommendation Snapshot. </p> <p> This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress. </p> <p>Please send feedback by <a href="https://github.com/w3c/csswg-drafts/issues">filing issues in GitHub</a> (preferred), including the spec code “css-text” in the title, like this: “[css-text] <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-text%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> </div> <div data-fill-with="at-risk"> <p>The following features are at-risk, and may be dropped during the CR period: </p> <ul> <li>the <a class="css" data-link-type="maybe" href="#valdef-text-transform-full-width" id="ref-for-valdef-text-transform-full-width">full-width</a> value of <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform">text-transform</a> <li>the <a class="css" data-link-type="maybe" href="#valdef-text-transform-full-size-kana" id="ref-for-valdef-text-transform-full-size-kana">full-size-kana</a> value of <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform①">text-transform</a> <li>the <length> values of the <a class="property css" data-link-type="property" href="#propdef-tab-size" id="ref-for-propdef-tab-size">tab-size</a> property <li>the <a class="property css" data-link-type="property" href="#propdef-text-justify" id="ref-for-propdef-text-justify">text-justify</a> property <li>the <a class="property css" data-link-type="property" href="#propdef-hanging-punctuation" id="ref-for-propdef-hanging-punctuation">hanging-punctuation</a> property <li>Writing-system specific adjustments to line-breaking <li>Trimming trailing Ogham space marks </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> <li><a href="#languages"><span class="secno">1.3</span> <span class="content"> Languages and Typesetting</span></a> <li><a href="#characters"><span class="secno">1.4</span> <span class="content"> Characters and Letters</span></a> <li><a href="#text-encoding"><span class="secno">1.5</span> <span class="content"> Text Processing</span></a> </ol> <li> <a href="#transforming"><span class="secno">2</span> <span class="content"> Transforming Text</span></a> <ol class="toc"> <li> <a href="#text-transform-property"><span class="secno">2.1</span> <span class="content"> Case Transforms: the <span class="property">text-transform</span> property</span></a> <ol class="toc"> <li><a href="#text-transform-mapping"><span class="secno">2.1.1</span> <span class="content"> Mapping Rules</span></a> <li><a href="#text-transform-order"><span class="secno">2.1.2</span> <span class="content"> Order of Operations</span></a> </ol> </ol> <li><a href="#white-space-property"><span class="secno">3</span> <span class="content"> White Space and Wrapping: the <span class="property">white-space</span> property</span></a> <li> <a href="#white-space-processing"><span class="secno">4</span> <span class="content"> White Space Processing & Control Characters</span></a> <ol class="toc"> <li> <a href="#white-space-rules"><span class="secno">4.1</span> <span class="content"> The White Space Processing Rules</span></a> <ol class="toc"> <li><a href="#white-space-phase-1"><span class="secno">4.1.1</span> <span class="content"> Phase I: Collapsing and Transformation</span></a> <li><a href="#white-space-phase-2"><span class="secno">4.1.2</span> <span class="content"> Phase II: Trimming and Positioning</span></a> <li><a href="#line-break-transform"><span class="secno">4.1.3</span> <span class="content"> Segment Break Transformation Rules</span></a> </ol> <li><a href="#tab-size-property"><span class="secno">4.2</span> <span class="content"> Tab Character Size: the <span class="property">tab-size</span> property</span></a> </ol> <li> <a href="#line-breaking"><span class="secno">5</span> <span class="content"> Line Breaking and Word Boundaries</span></a> <ol class="toc"> <li><a href="#line-break-details"><span class="secno">5.1</span> <span class="content"> Line Breaking Details</span></a> <li><a href="#word-break-property"><span class="secno">5.2</span> <span class="content"> Breaking Rules for Letters: the <span class="property">word-break</span> property</span></a> <li><a href="#line-break-property"><span class="secno">5.3</span> <span class="content"> Line Breaking Strictness: the <span class="property">line-break</span> property</span></a> <li><a href="#hyphenation"><span class="secno">5.4</span> <span class="content"> Hyphenation: the <span class="property">hyphens</span> property</span></a> <li><a href="#overflow-wrap-property"><span class="secno">5.5</span> <span class="content"> Overflow Wrapping: the <span class="property">overflow-wrap</span>/<span class="property">word-wrap</span> property</span></a> <li><a href="#word-break-shaping"><span class="secno">5.6</span> <span class="content"> Shaping Across Intra-word Breaks</span></a> </ol> <li> <a href="#justification"><span class="secno">6</span> <span class="content"> Alignment and Justification</span></a> <ol class="toc"> <li><a href="#text-align-property"><span class="secno">6.1</span> <span class="content"> Text Alignment: the <span class="property">text-align</span> shorthand</span></a> <li><a href="#text-align-all-property"><span class="secno">6.2</span> <span class="content"> Default Text Alignment: the <span class="property">text-align-all</span> property</span></a> <li><a href="#text-align-last-property"><span class="secno">6.3</span> <span class="content"> Last Line Alignment: the <span class="property">text-align-last</span> property</span></a> <li> <a href="#text-justify-property"><span class="secno">6.4</span> <span class="content"> Justification Method: the <span class="property">text-justify</span> property</span></a> <ol class="toc"> <li><a href="#expanding-text"><span class="secno">6.4.1</span> <span class="content"> Expanding and Compressing Text</span></a> <li><a href="#justify-symbols"><span class="secno">6.4.2</span> <span class="content"> Handling Symbols and Punctuation</span></a> <li><a href="#justify-limits"><span class="secno">6.4.3</span> <span class="content"> Unexpandable Text</span></a> <li><a href="#justify-cursive"><span class="secno">6.4.4</span> <span class="content"> Cursive Scripts</span></a> <li><a href="#justify-algos"><span class="secno">6.4.5</span> <span class="content"> Minimum Requirements for <span class="css">auto</span> Justification</span></a> </ol> </ol> <li> <a href="#spacing"><span class="secno">7</span> <span class="content"> Spacing</span></a> <ol class="toc"> <li><a href="#word-spacing-property"><span class="secno">7.1</span> <span class="content"> Word Spacing: the <span class="property">word-spacing</span> property</span></a> <li> <a href="#letter-spacing-property"><span class="secno">7.2</span> <span class="content"> Tracking: the <span class="property">letter-spacing</span> property</span></a> <ol class="toc"> <li><a href="#cursive-tracking"><span class="secno">7.2.1</span> <span class="content"> Cursive Scripts</span></a> </ol> <li><a href="#boundary-shaping"><span class="secno">7.3</span> <span class="content"> Shaping Across Element Boundaries</span></a> </ol> <li> <a href="#edge-effects"><span class="secno">8</span> <span class="content"> Edge Effects</span></a> <ol class="toc"> <li><a href="#text-indent-property"><span class="secno">8.1</span> <span class="content"> First Line Indentation: the <span class="property">text-indent</span> property</span></a> <li> <a href="#hanging"><span class="secno">8.2</span> <span class="content"> Hanging Glyphs</span></a> <ol class="toc"> <li><a href="#hanging-punctuation-property"><span class="secno">8.2.1</span> <span class="content"> Hanging Punctuation: the <span class="property">hanging-punctuation</span> property</span></a> </ol> <li><a href="#bidi-linebox"><span class="secno">8.3</span> <span class="content"> Bidirectionality and Line Boxes</span></a> </ol> <li><a href="#order"><span class="secno"></span> <span class="content"> Appendix A: Text Processing Order of Operations</span></a> <li><a href="#plaintext"><span class="secno"></span> <span class="content"> Appendix B: Conversion to Plaintext</span></a> <li><a href="#default-stylesheet"><span class="secno"></span> <span class="content"> Appendix C: Default UA Stylesheet</span></a> <li><a href="#script-groups"><span class="secno"></span> <span class="content"> Appendix D: Scripts and Spacing</span></a> <li><a href="#character-properties"><span class="secno"></span> <span class="content"> Appendix E: Characters and Properties</span></a> <li><a href="#script-tagging"><span class="secno"></span> <span class="content"> Appendix F: Identifying the Content Writing System</span></a> <li><a href="#small-kana"><span class="secno"></span> <span class="content"> Appendix G: Small Kana Mappings</span></a> <li><a href="#priv"><span class="secno"></span> <span class="content"> Privacy Considerations</span></a> <li><a href="#sec"><span class="secno"></span> <span class="content"> Security Considerations</span></a> <li><a href="#acknowledgements"><span class="secno"></span> <span class="content"> Acknowledgements</span></a> <li> <a href="#changes"><span class="secno"></span> <span class="content"> Changes</span></a> <ol class="toc"> <li><a href="#recent-changes"><span class="secno"></span> <span class="content"> Recent Changes</span></a> <li><a href="#old-changes"><span class="secno"></span> <span class="content"> Older Changes</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>This module describes the typesetting controls of CSS; that is, the features of CSS that control the translation of source text to formatted, line-wrapped text. Various CSS properties provide control over <a href="#transforming">case transformation</a>, <a href="#white-space-processing">white space collapsing</a>, <a href="#white-space-property">text wrapping</a>, <a href="#line-breaking">line breaking rules</a> and <a href="#hyphenation">hyphenation</a>, <a href="#justification">alignment and justification</a>, <a href="#spacing">spacing</a>, and <a href="#edge-effects">indentation</a>.</p> <div class="note" role="note"> Note: Font selection is covered in the <a href="https://www.w3.org/TR/css-fonts-3/"><cite>CSS Fonts Module</cite></a>. <a data-link-type="biblio" href="#biblio-css-fonts-3" title="CSS Fonts Module Level 3">[CSS-FONTS-3]</a> <p><span id="decoration"></span> <span id="text-decoration"></span> <span id="line-decoration"></span> <span id="text-decoration-line"></span> <span id="text-decoration-color"></span> <span id="text-decoration-style"></span> <span id="text-decoration-skip"></span> <span id="text-underline-position"></span> <span id="emphasis-marks"></span> <span id="text-emphasis-style"></span> <span id="text-emphasis-color"></span> <span id="text-emphasis"></span> <span id="text-emphasis-position"></span> <span id="text-shadow"></span> Features for decorating text, such as <a href="https://www.w3.org/TR/css-text-decor-3/#line-decoration">underlines</a>, <a href="https://www.w3.org/TR/css-text-decor-3/#emphasis-marks">emphasis marks</a>, and <a href="https://www.w3.org/TR/css-text-decor-3/#text-shadow-property">shadows</a>, (previously part of this module) are covered in the <a href="https://www.w3.org/TR/css-text-decor-3/"><cite>CSS Text Decoration Module</cite></a>. <a data-link-type="biblio" href="#biblio-css-text-decor-3" title="CSS Text Decoration Module Level 3">[CSS-TEXT-DECOR-3]</a></p> <p><a href="https://www.w3.org/TR/css-writing-modes-4/#text-direction">Bidirectional</a> and <a href="https://www.w3.org/TR/css-writing-modes-4/#vertical-intro">vertical</a> text are addressed in the <a href="https://www.w3.org/TR/css-writing-modes-4/"><cite>CSS Writing Modes Module</cite></a>. <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a>.</p> </div> <p>Further information about the typesetting requirements of various languages and writing systems around the world can be found in the <a href="https://www.w3.org/International/core/">Internationalization Working Group</a>’s <a href="https://www.w3.org/TR/typography/"><cite>Language Enablement Index</cite></a>. <a data-link-type="biblio" href="#biblio-typography" title="Language enablement index">[TYPOGRAPHY]</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, together with the <cite><a href="https://www.w3.org/TR/css-text-decor-3/">CSS Text Decoration Module</a></cite>, replaces and extends the text-level features defined in <a href="https://www.w3.org/TR/CSS2/text.html"><cite>Cascading Style Sheets Level 2</cite> chapter 16</a>. <a data-link-type="biblio" href="#biblio-css-text-decor-3" title="CSS Text Decoration Module Level 3">[CSS-TEXT-DECOR-3]</a> <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a></p> <p>In addition to the terms defined below, other terminology and concepts used in this specification are defined in <a href="https://www.w3.org/TR/CSS2/"><cite>Cascading Style Sheets Level 2</cite></a> and the <a href="https://www.w3.org/TR/css-writing-modes-4/"><cite>CSS Writing Modes Module</cite></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 data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a>.</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/CSS21/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> <h3 class="heading settled" data-level="1.3" id="languages"><span class="secno">1.3. </span><span class="content"> Languages and Typesetting</span><a class="self-link" href="#languages"></a></h3> <p class="advisement"> <strong>Authors should accurately language-tag their content for the best typographic behavior.</strong> </p> <p>Many typographic effects vary by linguistic context. Language and writing system conventions can affect line breaking, hyphenation, justification, glyph selection, and many other typographic effects. <strong>In CSS, language-specific typographic tailorings are only applied when the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language">content language</a> is known (declared).</strong> Therefore, higher quality typography requires authors to communicate to the UA the correct linguistic context of the text in the document.</p> <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="content-language">content language</dfn> of an element is the (human) language the element is declared to be in, according to the rules of the <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/conform.html#doclanguage" id="ref-for-doclanguage">document language</a>. Note that it is possible for the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①">content language</a> of an element to be unknown—e.g. untagged content, or content in a <span id="ref-for-doclanguage①">document language</span> that does not have a language-tagging facility, is considered to have an unknown <span id="ref-for-content-language②">content language</span>.</p> <p class="note" role="note"><span class="marker">Note:</span> Authors can declare the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language③">content language</a> using the global <code>lang</code> attribute in HTML or the universal <code>xml:lang</code> attribute in XML. See the <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/dom.html#language" id="ref-for-language">rules for determining the content language of an HTML element</a> in <cite>HTML</cite>, and the <a href="https://www.w3.org/TR/xml/#sec-lang-tag">rules for determining the content language of an XML element</a> in <cite>XML 1.0</cite>. <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a> <a data-link-type="biblio" href="#biblio-xml10" title="Extensible Markup Language (XML) 1.0 (Fifth Edition)">[XML10]</a></p> <p>The <a data-link-type="dfn" href="#content-language" id="ref-for-content-language④">content language</a> an element is declared to be in also identifies the specific written form of that language used in that element, known as the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="writing system" id="content-writing-system">content writing system</dfn>. Depending on the <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/conform.html#doclanguage" id="ref-for-doclanguage②">document language</a>’s facilities for identifying the <span id="ref-for-content-language⑤">content language</span>, this information can be explicit or implied. See the normative <a href="#script-tagging">Appendix F: Identifying the Content Writing System</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> Some languages have more than one writing system tradition; in other cases a language can be transliterated into a foreign writing system. Authors should <a href="#script-tagging">subtag</a> such cases so that the UA can adapt appropriately.</p> <div class="example" id="example-bcb0a1b4"> <a class="self-link" href="#example-bcb0a1b4"></a> For example, Korean (<code>ko</code>) can be written in Hangul (<code>-Hang</code>), Hanja (<code>-Hani</code>), or a combination (<code>-Kore</code>). Historical documents written solely in Hanja do not use word spaces and are formatted more like modern Chinese than modern Korean. In other words, for typographic purposes <code>ko-Hani</code> behaves more like <code>zh-Hant</code> than <code>ko</code> (<code>ko-Kore</code>). <p>As another example Japanese (<code>ja</code>) is typically written in a combination (<code>-Japn</code>) of Hiragana (<code>-Hira</code>), Katakana (<code>-Kana</code>), and Kanji (<code>-Hani</code>). However, it can also be “romanized” into Latin (<code>-Latn</code>) for special purposes like language-learning textbooks, in which case it should be formatted more like English than Japanese.</p> <p>As a third example contemporary Mongolian is written in two scripts: Cyrillic (<code>-Cyrl</code>, officially used in Mongolia) and Mongolian (<code>-Mong</code>, more common in Inner Mongolia, part of China). These have very different formatting requirements, with Cyrillic behaving similar to Latin and Greek, and Mongolian deriving from both Arabic and Chinese writing conventions.</p> </div> <h3 class="heading settled" data-level="1.4" id="characters"><span class="secno">1.4. </span><span class="content"> Characters and Letters</span><a class="self-link" href="#characters"></a></h3> <p></p> <p>The basic unit of typesetting is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="character">character</dfn>. However, because writing systems are not always as simple as the basic English alphabet, what a <a data-link-type="dfn" href="#character" id="ref-for-character">character</a> actually is depends on the context in which the term is used. For example, in Hangul (the Korean writing system), each square representation of a syllable (e.g. <span lang="ko-hang" title="Hangul syllable HAN">한</span>=<span lang="ko-Latn">Han</span>) can be considered a <span id="ref-for-character①">character</span>. However, the square symbol is really composed of multiple letters each representing a phoneme (e.g. <span lang="ko-hang" title="Hangul letter HIEUH">ㅎ</span>=<span lang="ko-Latn">h</span>, <span lang="ko-hang" title="Hangul letter HIEUH">ㅏ</span>=<span lang="ko-Latn">a</span>, <span lang="ko-hang" title="Hangul letter HIEUH">ㄴ</span>=<span lang="ko-Latn">n</span>) and these also could each be considered a <span id="ref-for-character②">character</span>.</p> <p>A basic unit of computer text encoding, for any given encoding, is also called a <a data-link-type="dfn" href="#character" id="ref-for-character③">character</a>, and depending on the encoding, a single encoding <span id="ref-for-character④">character</span> might correspond to the entire pre-composed syllabic <span id="ref-for-character⑤">character</span> (e.g. <span lang="ko-hang" title="Hangul syllable HAN">한</span>), to the individual phonemic <span id="ref-for-character⑥">character</span> (e.g. <span lang="ko-hang" title="Hangul letter HIEUH">ㅎ</span>), or to smaller units such as a base letterform (e.g. <span lang="ko-hang" title="Hangul letter IEUNG">ㅇ</span>) and any combining marks that vary it (e.g. extra strokes that represent aspiration).</p> <p>In turn, a single encoding <a data-link-type="dfn" href="#character" id="ref-for-character⑦">character</a> can be represented in the data stream as one or more bytes; and in programming environments one byte is sometimes also called a <span id="ref-for-character⑧">character</span>.</p> <p>Therefore the term <a data-link-type="dfn" href="#character" id="ref-for-character⑨">character</a> is fairly ambiguous where technical precision is required.</p> <p>For text layout, we will refer to the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="typographic character unit|typographic character" id="typographic-character-unit">typographic character unit</dfn> as the basic unit of text. Even within the realm of text layout, the relevant <a data-link-type="dfn" href="#character" id="ref-for-character①⓪">character</a> unit depends on the operation. For example, line-breaking and letter-spacing will segment a sequence of Thai characters that include U+0E33 ำ THAI CHARACTER SARA AM differently; or the behavior of a conjunct consonant in a script such as Devanagari may depend on the font in use. So the <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit">typographic character</a> represents a unit of the writing system—such as a Latin alphabetic letter (including its diacritics), Hangul syllable, Chinese ideographic character, Myanmar syllable cluster—that is indivisible with respect to a particular typographic operation (line-breaking, first-letter effects, tracking, justification, vertical arrangement, etc.).</p> <p><a href="http://www.unicode.org/reports/tr29/"><cite>Unicode Standard Annex #29: Text Segmentation</cite></a> defines a unit called the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="grapheme-cluster">grapheme cluster</dfn> which approximates the <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①">typographic character</a>. <a data-link-type="biblio" href="#biblio-uax29" title="Unicode Text Segmentation">[UAX29]</a> A UA must use the <em>extended grapheme cluster</em> (not <em>legacy grapheme cluster</em>), as defined in <cite>UAX29</cite>, as the basis for its <span id="ref-for-typographic-character-unit②">typographic character unit</span>. However, the UA should tailor the definitions as required by typographic tradition since the default rules are not always appropriate or ideal—and is expected to tailor them differently depending on the operation as needed.</p> <p class="note" role="note"><span class="marker">Note:</span> The rules for such tailorings are out of scope for CSS.</p> <div class="example" id="example-8c80c59b"> <a class="self-link" href="#example-8c80c59b"></a> The following are some examples of <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit③">typographic character unit</a> tailorings required by standard typesetting practice: <ul> <li> In some scripts such as Myanmar or Devanagari, the <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit④">typographic character unit</a> for both justification and line-breaking is an entire syllable, which can include more than one Unicode <a data-link-type="dfn" href="#grapheme-cluster" id="ref-for-grapheme-cluster">grapheme cluster</a>. <a data-link-type="biblio" href="#biblio-uax29" title="Unicode Text Segmentation">[UAX29]</a> <li> In other scripts such as Thai or Lao, even though for line-breaking the <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit⑤">typographic character</a> matches Unicode’s default <a data-link-type="dfn" href="#grapheme-cluster" id="ref-for-grapheme-cluster①">grapheme clusters</a>, for letter-spacing the relevant unit is <em>less</em> than a Unicode <span id="ref-for-grapheme-cluster②">grapheme cluster</span>, and may require decomposition or other substitutions before spacing can be inserted. <a data-link-type="biblio" href="#biblio-uax29" title="Unicode Text Segmentation">[UAX29]</a> <p>For instance, to properly letter-space the Thai word คำ (U+0E04 + U+0E33), the U+0E33 needs to be decomposed into U+0E4D + U+0E32, and then the extra letter-space inserted before the U+0E32: คํ า.</p> <p>A slightly more complex example is น้ำ (U+0E19 + U+0E49 + U+0E33). In this case, normal Thai shaping will first decompose the U+0E33 into U+0E4D + U+0E32 and then swap the U+0E4D with the U+0E49, giving U+0E19 + U+0E4D + U+0E49 + U+0E32. As before the extra letter-space is then inserted before the U+0E32: นํ้ า.</p> <li> Vertical typesetting can also require tailoring. For example, when typesetting <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright" id="ref-for-valdef-text-orientation-upright">upright</a> text, Tibetan tsek and shad marks are kept with the preceding grapheme cluster, rather than treated as an independent <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit⑥">typographic character unit</a>. <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a> </ul> </div> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="typographic-letter-unit">typographic letter unit</dfn> (or <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="letter">letter</dfn> for the purpose of this specification) is a <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit⑦">typographic character unit</a> belonging to one of the Letter or Number <a data-link-type="dfn" href="#unicode-general-category" id="ref-for-unicode-general-category">general categories</a>. See <a href="#character-properties">Appendix E: Characters and Properties</a> for how to determine the Unicode properties of a <span id="ref-for-typographic-character-unit⑧">typographic character unit</span>.</p> <p>The rendering characteristics of a <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit⑨">typographic character unit</a> divided by an element boundary is undefined. Ideally each component should be rendered according to the formatting requirements of its respective element’s properties while maintaining correct shaping and positioning of the <span id="ref-for-typographic-character-unit①⓪">typographic character unit</span> as a whole. However, depending on the nature of the formatting differences between its parts and the capabilities of the font technology in use, this is not always possible. Therefore such a <span id="ref-for-typographic-character-unit①①">typographic character unit</span> may be rendered as belonging to either side of the boundary, or as some approximation of belonging to both. Authors are forewarned that dividing <a data-link-type="dfn" href="#grapheme-cluster" id="ref-for-grapheme-cluster③">grapheme clusters</a> or ligatures by element boundaries may give inconsistent or undesired results.</p> <h3 class="heading settled" data-level="1.5" id="text-encoding"><span class="secno">1.5. </span><span class="content"> Text Processing</span><a class="self-link" href="#text-encoding"></a></h3> <p>CSS is built on <a href="https://www.unicode.org/versions/latest/">Unicode</a>. <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a> UAs that support Unicode must adhere to all normative requirements of the Unicode Core Standard, except where explicitly overridden by CSS. UAs implemented on the basis of a non-Unicode text encoding model are still expected to fulfill the same text handling requirements by assuming an appropriate mapping and analogous behavior.</p> <p>For the purpose of determining adjacency for text processing (such as white space processing, text transformation, line-breaking, etc.), and thus in general within this specification, intervening <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#inline-box" id="ref-for-inline-box">inline box</a> boundaries and <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#out-of-flow" id="ref-for-out-of-flow">out-of-flow</a> elements must be ignored. With respect to text shaping, however, see <a href="#boundary-shaping">§ 7.3 Shaping Across Element Boundaries</a>.</p> <h2 class="heading settled" data-level="2" id="transforming"><span class="secno">2. </span><span class="content"> Transforming Text</span><a class="self-link" href="#transforming"></a></h2> <p></p> <h3 class="heading settled" data-level="2.1" id="text-transform-property"><span class="secno">2.1. </span><span class="content"> Case Transforms: the <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform②">text-transform</a> property</span><span id="text-transform"></span><span id="caps-prop"></span><a class="self-link" href="#text-transform-property"></a></h3> <table class="def propdef" data-link-for-hint="text-transform"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-transform">text-transform</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">none <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one">|</a> [capitalize <span id="ref-for-comb-one①">|</span> uppercase <span id="ref-for-comb-one②">|</span> lowercase ] <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-any" id="ref-for-comb-any">||</a> full-width <span id="ref-for-comb-any①">||</span> full-size-kana <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property transforms text for styling purposes. It has no effect on the underlying content, and must not affect the content of a plain text copy & paste operation.</p> <p><strong class="advisement"> Authors must not rely on <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform③">text-transform</a> for semantic purposes; rather the correct casing and semantics should be encoded in the source document text and markup.</strong></p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="text-transform" data-dfn-type="value" data-export id="valdef-text-transform-none">none</dfn> <dd> No effects. <dt><dfn class="dfn-paneled css" data-dfn-for="text-transform" data-dfn-type="value" data-export id="valdef-text-transform-capitalize">capitalize</dfn> <dd> Puts the first <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit">typographic letter unit</a> of each word, if lowercase, in titlecase; other characters are unaffected. <dt><dfn class="dfn-paneled css" data-dfn-for="text-transform" data-dfn-type="value" data-export id="valdef-text-transform-uppercase">uppercase</dfn> <dd> Puts all <a data-link-type="dfn" href="#letter" id="ref-for-letter">letters</a> in uppercase. <dt><dfn class="dfn-paneled css" data-dfn-for="text-transform" data-dfn-type="value" data-export id="valdef-text-transform-lowercase">lowercase</dfn> <dd> Puts all <a data-link-type="dfn" href="#letter" id="ref-for-letter①">letters</a> in lowercase. <dt><dfn class="dfn-paneled css" data-dfn-for="text-transform" data-dfn-type="value" data-export id="valdef-text-transform-full-width">full-width</dfn> <dd> Puts all <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①②">typographic character units</a> in <a data-link-type="dfn" href="#full-width" id="ref-for-full-width">full-width</a> form. If a character does not have a corresponding <span id="ref-for-full-width①">full-width</span> form, it is left as is. This value is typically used to typeset Latin letters and digits as if they were ideographic characters. <dt><dfn class="dfn-paneled css" data-dfn-for="text-transform" data-dfn-type="value" data-export id="valdef-text-transform-full-size-kana">full-size-kana</dfn> <dd> Converts all <a data-link-type="dfn" href="#kana-small" id="ref-for-kana-small">small Kana</a> characters to the equivalent <a data-link-type="dfn" href="#kana-full-size" id="ref-for-kana-full-size">full-size Kana</a>. This value is typically used for ruby annotation text, where authors may want all small Kana to be drawn as large Kana to compensate for legibility issues at the small font sizes typically used in ruby. </dl> <div class="example" id="example-5b7dad2f"> <a class="self-link" href="#example-5b7dad2f"></a> The following example converts the ASCII characters used in abbreviations in Japanese text to their full-width variants so that they lay out and line break like ideographs: <pre class="highlight"><c- k>abbr</c-><c- p>:</c-><c- nf>lang</c-><c- p>(</c->ja<c- p>)</c-> <c- p>{</c-> <c- k>text-transform</c-><c- p>:</c-> full-width<c- p>;</c-> <c- p>}</c-></pre> </div> <p class="note" role="note"><span class="marker">Note:</span> The purpose of <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform④">text-transform</a> is to allow for presentational casing transformations without affecting the semantics of the document. Note in particular that <span class="property" id="ref-for-propdef-text-transform⑤">text-transform</span> casing operations are lossy, and can distort the meaning of a text. While accessibility interfaces may wish to convey the apparent casing of the rendered text to the user, the transformed text cannot be relied on to accurately represent the underlying meaning of the document.</p> <div class="example" id="example-c3f5b224"> <a class="self-link" href="#example-c3f5b224"></a> In this example, the first line of text is capitalized as a visual effect. <pre class="highlight">section > p:first-of-type::first-line <c- p>{</c-> <c- k>text-transform</c-><c- p>:</c-> uppercase<c- p>;</c-> <c- p>}</c-> </pre> <p>This effect cannot be written into the source document because the position of the line break depends on layout. But also, the capitalization is not reflecting a semantic distinction and is not intended to affect the paragraph’s reading; therefore it belongs in the presentation layer.</p> </div> <div class="example" id="example-65db0dde"> <a class="self-link" href="#example-65db0dde"></a> In this example, the <a data-link-type="dfn" href="https://www.w3.org/TR/css-ruby-1/#ruby" id="ref-for-ruby">ruby</a> annotations, which are half the size of the main paragraph text, are transformed to use regular-size kana in place of <a data-link-type="dfn" href="#kana-small" id="ref-for-kana-small①">small kana</a>. <pre class="highlight">rt <c- p>{</c-> <c- k>font-size</c-><c- p>:</c-> <c- m>50</c-><c- k>%</c-><c- p>;</c-> <c- k>text-transform</c-><c- p>:</c-> full-size-kana<c- p>;</c-> <c- p>}</c-> <c- nf>:is</c-><c- p>(</c->h1<c- p>,</c-> h2<c- p>,</c-> h3<c- p>,</c-> h4<c- p>)</c-> rt <c- p>{</c-> <c- k>text-transform</c-><c- p>:</c-> none<c- p>;</c-> <c- c>/* unset for large text*/</c-> <c- p>}</c-> </pre> <p>Note that while this makes such letters easier to see at small type sizes, the transformation distorts the text: the reader needs to mentally substitute <a data-link-type="dfn" href="#kana-small" id="ref-for-kana-small②">small kana</a> in the appropriate places—not unlike reading a Latin inscription where all “U”s look like “V”s.</p> <p>For example, if <a class="css" data-link-type="propdesc" href="#propdef-text-transform" id="ref-for-propdef-text-transform⑥">text-transform: full-size-kana</a> were applied to the following source, the annotation would read “じゆう” (jiyū), which means “liberty”, instead of “じゅう” (jū), which means “ten”, the correct reading and meaning for the annotated “十”.</p> <pre class="highlight"><c- p><</c-><c- f>ruby</c-><c- p>></c->十<c- p><</c-><c- f>rt</c-><c- p>></c->じゅう<c- p></</c-><c- f>ruby</c-><c- p>></c-> </pre> </div> <h4 class="heading settled" data-level="2.1.1" id="text-transform-mapping"><span class="secno">2.1.1. </span><span class="content"> Mapping Rules</span><a class="self-link" href="#text-transform-mapping"></a></h4> <p>For <a class="css" data-link-type="maybe" href="#valdef-text-transform-capitalize" id="ref-for-valdef-text-transform-capitalize">capitalize</a>, what constitutes a “word“ is UA-dependent; <a data-link-type="biblio" href="#biblio-uax29" title="Unicode Text Segmentation">[UAX29]</a> is suggested (but not required) for determining such word boundaries. Out-of-flow elements and inline element boundaries must not introduce a <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform⑦">text-transform</a> word boundary and must be ignored when determining such word boundaries.</p> <p class="note" role="note"><span class="marker">Note:</span> Authors cannot depend on <a class="css" data-link-type="maybe" href="#valdef-text-transform-capitalize" id="ref-for-valdef-text-transform-capitalize①">capitalize</a> to follow language-specific titlecasing conventions (such as skipping articles in English).</p> <p>The UA must use the full case mappings for Unicode characters, including any conditional casing rules, as defined in the <cite>Default Case Algorithms</cite> section of <cite>The Unicode Standard</cite>. <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a> If (and only if) the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language⑥">content language</a> of the element is, according to the rules of the <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/conform.html#doclanguage" id="ref-for-doclanguage③">document language</a>, known, then any appropriate language-specific rules must be applied as well. These minimally include, but are not limited to, the language-specific rules in Unicode’s <a href="http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt">SpecialCasing.txt</a>.</p> <div class="example" id="example-f454e7b9"><a class="self-link" href="#example-f454e7b9"></a> For example, in Turkish there are two “i”s, one with a dot—“İ” and “i”—and one without—“I” and “ı”. Thus the usual case mappings between “I” and “i” are replaced with a different set of mappings to their respective dotless/dotted counterparts, which do not exist in English. This mapping must only take effect if the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language⑦">content language</a> is Turkish written in its modern Latin-based <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system">writing system</a> (or another Turkic language that uses Turkish casing rules); in other languages, the usual mapping of “I” and “i” is required. This rule is thus conditionally defined in Unicode’s SpecialCasing.txt file. </div> <p>The definition of <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="full-width">full-width</dfn> and <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="half-width">half-width</dfn> forms can be found in <a href="https://www.unicode.org/reports/tr11/"><cite></cite>Unicode Standard Annex #11: East Asian Width</a>. <a data-link-type="biblio" href="#biblio-uax11" title="East Asian Width">[UAX11]</a> The mapping to <a data-link-type="dfn" href="#full-width" id="ref-for-full-width②">full-width</a> form is defined by taking code points with the <code><wide></code> or the <code><narrow></code> tag in their <code>Decomposition_Mapping</code> in <a href="https://www.unicode.org/reports/tr44/"><cite></cite>Unicode Standard Annex #44: Unicode Character Database</a>. <a data-link-type="biblio" href="#biblio-uax44" title="Unicode Character Database">[UAX44]</a> For the <code><narrow></code> tag, the mapping is from the code point to the decomposition (minus <code><narrow></code> tag), and for the <code><wide></code> tag, the mapping is from the decomposition (minus the <code><wide></code> tag) back to the original code point.</p> <p>The mappings for <a data-link-type="dfn" href="#kana-small" id="ref-for-kana-small③">small Kana</a> to <a data-link-type="dfn" href="#kana-full-size" id="ref-for-kana-full-size①">full-size Kana</a> are defined in <a href="#small-kana">Appendix G: Small Kana Mappings</a>.</p> <h4 class="heading settled" data-level="2.1.2" id="text-transform-order"><span class="secno">2.1.2. </span><span class="content"> Order of Operations</span><a class="self-link" href="#text-transform-order"></a></h4> <p>When multiple values are specified and therefore multiple transformations need to be applied, they are applied in the following order:</p> <ol> <li><a class="css" data-link-type="maybe" href="#valdef-text-transform-capitalize" id="ref-for-valdef-text-transform-capitalize②">capitalize</a>, <a class="css" data-link-type="maybe" href="#valdef-text-transform-uppercase" id="ref-for-valdef-text-transform-uppercase">uppercase</a>, and <a class="css" data-link-type="maybe" href="#valdef-text-transform-lowercase" id="ref-for-valdef-text-transform-lowercase">lowercase</a> <li><a class="css" data-link-type="maybe" href="#valdef-text-transform-full-width" id="ref-for-valdef-text-transform-full-width①">full-width</a> <li><a class="css" data-link-type="maybe" href="#valdef-text-transform-full-size-kana" id="ref-for-valdef-text-transform-full-size-kana①">full-size-kana</a> </ol> <p>Text transformation happens after <a href="#white-space-phase-1">§ 4.1.1 Phase I: Collapsing and Transformation</a> but before <a href="#white-space-phase-2">§ 4.1.2 Phase II: Trimming and Positioning</a>. This means that <a class="css" data-link-type="maybe" href="#valdef-text-transform-full-width" id="ref-for-valdef-text-transform-full-width②">full-width</a> only transforms spaces (U+0020) to U+3000 IDEOGRAPHIC SPACE within <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space">preserved</a> <a data-link-type="dfn" href="#white-space" id="ref-for-white-space">white space</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> As defined in <a href="#order">Appendix A: Text Processing Order of Operations</a>, transforming text affects line-breaking and other formatting operations.</p> <h2 class="heading settled" data-level="3" id="white-space-property"><span class="secno">3. </span><span class="content"> White Space and Wrapping: the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space">white-space</a> property</span><span id="white-space-collapsing"></span><span id="text-wrap"></span><a class="self-link" href="#white-space-property"></a></h2> <p></p> <table class="def propdef" data-link-for-hint="white-space"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-white-space">white-space</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one③">|</a> pre <span id="ref-for-comb-one④">|</span> nowrap <span id="ref-for-comb-one⑤">|</span> pre-wrap <span id="ref-for-comb-one⑥">|</span> break-spaces <span id="ref-for-comb-one⑦">|</span> pre-line <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property specifies two things:</p> <ul> <li>whether and how <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①">white space</a> is collapsed <li>whether lines may <a data-link-type="dfn" href="#wrapping" id="ref-for-wrapping">wrap</a> at unforced <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity">soft wrap opportunities</a> </ul> <p>Values have the following meanings, which must be interpreted according to the <a href="#white-space-rules">White Space Processing</a> and <a href="#line-breaking">Line Breaking</a> rules:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="white-space" data-dfn-type="value" data-export id="valdef-white-space-normal">normal</dfn> <dd> This value directs user agents to collapse sequences of <a data-link-type="dfn" href="#white-space" id="ref-for-white-space②">white space</a> into a single character (or <a href="#line-break-transform">in some cases</a>, no character). Lines may wrap at allowed <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①">soft wrap opportunities</a>, as determined by the line-breaking rules in effect, in order to minimize inline-axis overflow. <dt><dfn class="dfn-paneled css" data-dfn-for="white-space" data-dfn-type="value" data-export id="valdef-white-space-pre">pre</dfn> <dd> This value prevents user agents from collapsing sequences of <a data-link-type="dfn" href="#white-space" id="ref-for-white-space③">white space</a>. <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break">Segment breaks</a> such as line feeds are preserved as <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break">forced line breaks</a>. Lines only break at <span id="ref-for-forced-line-break①">forced line breaks</span>; content that does not fit within the block container overflows it. <dt><dfn class="dfn-paneled css" data-dfn-for="white-space" data-dfn-type="value" data-export id="valdef-white-space-nowrap">nowrap</dfn> <dd> Like <a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal">normal</a>, this value collapses <a data-link-type="dfn" href="#white-space" id="ref-for-white-space④">white space</a>; but like <a class="css" data-link-type="maybe" href="#valdef-white-space-pre" id="ref-for-valdef-white-space-pre">pre</a>, it does not allow wrapping. <dt><dfn class="dfn-paneled css" data-dfn-for="white-space" data-dfn-type="value" data-export id="valdef-white-space-pre-wrap">pre-wrap</dfn> <dd> Like <a class="css" data-link-type="maybe" href="#valdef-white-space-pre" id="ref-for-valdef-white-space-pre①">pre</a>, this value preserves <a data-link-type="dfn" href="#white-space" id="ref-for-white-space⑤">white space</a>; but like <a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal①">normal</a>, it allows wrapping. <dt><dfn class="dfn-paneled css" data-dfn-for="white-space" data-dfn-type="value" data-export id="valdef-white-space-break-spaces">break-spaces</dfn> <dd> The behavior is identical to that of <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap" id="ref-for-valdef-white-space-pre-wrap">pre-wrap</a>, except that: <ul> <li> Any sequence of <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space①">preserved</a> <a data-link-type="dfn" href="#white-space" id="ref-for-white-space⑥">white space</a> or <a data-link-type="dfn" href="#other-space-separators" id="ref-for-other-space-separators">other space separators</a> always takes up space, including at the end of the line. <li> A <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②">soft wrap opportunity</a> exists after every <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space②">preserved</a> <a data-link-type="dfn" href="#white-space" id="ref-for-white-space⑦">white space</a> character and after every <a data-link-type="dfn" href="#other-space-separators" id="ref-for-other-space-separators①">other space separator</a> (including between adjacent spaces). </ul> <p class="note" role="note"><span class="marker">Note:</span> This value does not guarantee that there will never be any overflow due to white space: for example, if the line length is so short that even a single white space character does not fit, overflow is unavoidable.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="white-space" data-dfn-type="value" data-export id="valdef-white-space-pre-line">pre-line</dfn> <dd> Like <a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal②">normal</a>, this value collapses consecutive <a data-link-type="dfn" href="#white-space" id="ref-for-white-space⑧">white space characters</a> and allows wrapping, but it preserves <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break①">segment breaks</a> in the source as <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break②">forced line breaks</a>. </dl> <p><a data-link-type="dfn" href="#white-space" id="ref-for-white-space⑨">White space</a> that was not removed or collapsed due to white space processing is called <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="preserved" id="preserved-white-space">preserved white space</dfn>.</p> <p class="note" role="note"><span class="marker">Note:</span> In some cases, <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space③">preserved white space</a> and <a data-link-type="dfn" href="#other-space-separators" id="ref-for-other-space-separators②">other space separators</a> can <a data-link-type="dfn" href="#hang" id="ref-for-hang">hang</a> when at the end of the line; this can affect whether they are measured for <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-sizing" id="ref-for-intrinsic-sizing">intrinsic sizing</a>.</p> <p>The following informative table summarizes the behavior of various <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①">white-space</a> values:</p> <table class="data"> <colgroup class="header"> <colgroup span="5"> <thead> <tr> <th> <th>New Lines <th>Spaces and Tabs <th>Text Wrapping <th>End-of-line <a data-link-type="dfn" href="#spaces" id="ref-for-spaces">spaces</a> <th>End-of-line <a data-link-type="dfn" href="#other-space-separators" id="ref-for-other-space-separators③">other space separators</a> <tbody> <tr> <th><a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal③">normal</a> <td>Collapse <td>Collapse <td>Wrap <td>Remove <td>Hang <tr> <th><a class="css" data-link-type="maybe" href="#valdef-white-space-pre" id="ref-for-valdef-white-space-pre②">pre</a> <td>Preserve <td>Preserve <td>No wrap <td>Preserve <td>No wrap <tr> <th><a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap" id="ref-for-valdef-white-space-nowrap">nowrap</a> <td>Collapse <td>Collapse <td>No wrap <td>Remove <td>Hang <tr> <th><a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap" id="ref-for-valdef-white-space-pre-wrap①">pre-wrap</a> <td>Preserve <td>Preserve <td>Wrap <td>Hang <td>Hang <tr> <th><a class="css" data-link-type="maybe" href="#valdef-white-space-break-spaces" id="ref-for-valdef-white-space-break-spaces">break-spaces</a> <td>Preserve <td>Preserve <td>Wrap <td>Wrap <td>Wrap <tr> <th><a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line" id="ref-for-valdef-white-space-pre-line">pre-line</a> <td>Preserve <td>Collapse <td>Wrap <td>Remove <td>Hang </table> <p>See <a href="#white-space-processing">White Space Processing Rules</a> for details on how <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①⓪">white space</a> collapses.</p> <p>See <a href="#line-breaking">Line Breaking</a> for details on wrapping behavior.</p> <h2 class="heading settled" data-level="4" id="white-space-processing"><span class="secno">4. </span><span class="content"> White Space Processing & Control Characters</span><a class="self-link" href="#white-space-processing"></a></h2> <p></p> <p>The source text of a document often contains formatting that is not relevant to the final rendering: for example, <a href="https://rhodesmill.org/brandon/2012/one-sentence-per-line/">breaking the source into segments</a> (lines) for ease of editing or adding <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①①">white space characters</a> such as <a data-link-type="dfn" href="#tabs" id="ref-for-tabs">tabs</a> and <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①">spaces</a> to indent the source code. CSS white space processing allows the author to control interpretation of such formatting: to preserve or collapse it away when rendering the document. White space processing in CSS (which is controlled with the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space②">white-space</a> property) interprets <span id="ref-for-white-space①②">white space characters</span> only for rendering: it has no effect on the underlying document data.</p> <p class="note" role="note"><span class="marker">Note:</span> Depending on the document language, segments can be separated by a particular newline sequence (such as a line feed or CRLF pair), or delimited by some other mechanism, such as the SGML <code>RECORD-START</code> and <code>RECORD-END</code> tokens.</p> <p id="segment-normalization"> For CSS processing, each document language–defined “segment break” or “newline sequence”—or if none are defined, each line feed (U+000A)—in the text is treated as a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="segment-break">segment break</dfn>, which is then interpreted for rendering as specified by the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space③">white-space</a> property. </p> <p>In the case of HTML, <a href="https://html.spec.whatwg.org/multipage/syntax.html#newlines">newlines</a> are <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#normalize-newlines" id="ref-for-normalize-newlines">normalized</a> to line feed characters (U+000A) for representation in the DOM, so when an HTML document is represented as a DOM tree each line feed (U+000A) is treated as a <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break②">segment break</a>. <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a> <a data-link-type="biblio" href="#biblio-dom" title="DOM Standard">[DOM]</a></p> <p class="note" role="note"><span class="marker">Note:</span> In most common CSS implementations, HTML does not get styled directly. Instead, it is processed into a DOM tree, which is then styled. Unlike HTML, the DOM does not give any particular meaning to carriage returns (U+000D), so they are not treated as <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break③">segment breaks</a>. If carriage returns (U+000D) are inserted into the DOM by means other than HTML parsing, they then get treated as defined below.</p> <p class="note" role="note"><span class="marker">Note:</span> A document parser might not only normalize any <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break④">segment breaks</a>, but also collapse other space characters or otherwise process white space according to markup rules. Because CSS processing occurs <em>after</em> the parsing stage, it is not possible to restore these characters for styling. Therefore, some of the behavior specified below can be affected by these limitations and may be user agent dependent.</p> <p class="note" role="note"><span class="marker">Note:</span> Anonymous blocks consisting entirely of <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space">collapsible</a> <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①③">white space</a> are removed from the rendering tree. Thus any such <span id="ref-for-white-space①④">white space</span> surrounding a block-level element is collapsed away. See <a href="https://www.w3.org/TR/CSS21/visuren.html#anonymous"><cite>CSS 2.1</cite> § 9.2.2.1 Anonymous inline boxes</a>. <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a></p> <p>Control characters (<a data-link-type="dfn" href="#unicode-general-category" id="ref-for-unicode-general-category①">Unicode category</a> <code>Cc</code>)—other than tabs (U+0009), line feeds (U+000A), carriage returns (U+000D) and sequences that form a <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break⑤">segment break</a>—must be rendered as a visible glyph which the UA must synthesize if the glyphs found in the font are not visible, and must be otherwise treated as any other character of the Other Symbols (<code>So</code>) <span id="ref-for-unicode-general-category②">general category</span> and Common <a data-link-type="dfn" href="#unicode-script" id="ref-for-unicode-script">script</a>. The UA may use a glyph provided by a font specifically for the control character, substitute the glyphs provided for the corresponding symbol in the Control Pictures block, generate a visual representation of its code point value, or use some other method to provide an appropriate visible glyph. As required by Unicode, unsupported <code>Default_ignorable</code> characters must be ignored for text rendering. <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a></p> <p>Carriage returns (U+000D) are treated identically to spaces (U+0020) in all respects.</p> <p class="note" role="note"><span class="marker">Note:</span> For HTML documents, carriage returns present in the source code are converted to line feeds at the parsing stage (see <a href="https://html.spec.whatwg.org/multipage/parsing.html#preprocessing-the-input-stream"><cite>HTML</cite> § 13.2.3.5 Preprocessing the input stream</a> and the definition of <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#normalize-newlines" id="ref-for-normalize-newlines①">normalize newlines</a> in <a href="https://infra.spec.whatwg.org/"><cite>Infra</cite></a> and therefore do no appear as U+000D CARRIAGE RETURN to CSS. <a data-link-type="biblio" href="#biblio-html" title="HTML Standard">[HTML]</a> <a data-link-type="biblio" href="#biblio-infra" title="Infra Standard">[INFRA]</a>) However, the character <em>is</em> preserved—and the above rule observable—when encoded using an escape sequence (<code class="highlight"><c- ni>&#x0d;</c-></code>).</p> <h3 class="heading settled" data-level="4.1" id="white-space-rules"><span class="secno">4.1. </span><span class="content"> The White Space Processing Rules</span><a class="self-link" href="#white-space-rules"></a></h3> <p>Except where specified otherwise, white space processing in CSS affects only the <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="white space|white space characters| document white space|document white space characters" id="white-space">document white space characters</dfn>: <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="spaces">spaces</dfn> (U+0020), <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tabs">tabs</dfn> (U+0009), and <a href="#white-space-processing">segment breaks</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> The set of characters considered <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①⑤">document white space</a> (part of the document content) and those considered syntactic white space (part of the CSS syntax) are not necessarily identical. However, since both include spaces (U+0020), tabs (U+0009), and line feeds (U+000A) most authors won’t notice any differences.</p> <p>Besides space (U+0020) and no-break space (U+00A0), Unicode defines a number of additional space separator characters. <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a> In this specification all characters in the Unicode <a data-link-type="dfn" href="#unicode-general-category" id="ref-for-unicode-general-category③">general category</a> Zs except space (U+0020) and no-break space (U+00A0) are collectively referred to as <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="other-space-separators">other space separators</dfn>.</p> <h4 class="heading settled" data-level="4.1.1" id="white-space-phase-1"><span class="secno">4.1.1. </span><span class="content"> Phase I: Collapsing and Transformation</span><a class="self-link" href="#white-space-phase-1"></a></h4> <p>For each inline (including anonymous inlines; see <a href="https://www.w3.org/TR/CSS21/visuren.html#anonymous"><cite>CSS 2.1</cite> § 9.2.2.1 Anonymous inline boxes</a> <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a>) within an <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#inline-formatting-context" id="ref-for-inline-formatting-context">inline formatting context</a>, <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①⑥">white space characters</a> are processed as follows prior to <a data-link-type="dfn" href="#line-breaking-process" id="ref-for-line-breaking-process">line breaking</a> and <a href="https://www.w3.org/TR/css-writing-modes-4/#text-direction">bidi reordering</a>, ignoring <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="bidi-formatting-characters">bidi formatting characters</dfn> (characters with the <code>Bidi_Control</code> property <a data-link-type="biblio" href="#biblio-uax9" title="Unicode Bidirectional Algorithm">[UAX9]</a>) as if they were not there:</p> <ul> <li id="collapse"> <a class="self-link" href="#collapse"></a> If <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space④">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal④">normal</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap" id="ref-for-valdef-white-space-nowrap①">nowrap</a>, or <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line" id="ref-for-valdef-white-space-pre-line①">pre-line</a>, <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①⑦">white space characters</a> are considered <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-local-lt="collapsible" data-lt="collapsible white space" id="collapsible-white-space">collapsible</dfn> and are processed by performing the following steps: <ol> <li> Any sequence of collapsible <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②">spaces</a> and <a data-link-type="dfn" href="#tabs" id="ref-for-tabs①">tabs</a> immediately preceding or following a <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break⑥">segment break</a> is removed. <li> Collapsible <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break⑦">segment breaks</a> are transformed for rendering according to the <a href="#line-break-transform">segment break transformation rules</a>. <li> Every <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space①">collapsible</a> <a data-link-type="dfn" href="#tabs" id="ref-for-tabs②">tab</a> is converted to a collapsible space (U+0020). <li> Any <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space②">collapsible</a> <a data-link-type="dfn" href="#spaces" id="ref-for-spaces③">space</a> immediately following another <span id="ref-for-collapsible-white-space③">collapsible</span> <span id="ref-for-spaces④">space</span>—even one outside the boundary of the inline containing that <span id="ref-for-spaces⑤">space</span>, provided both <span id="ref-for-spaces⑥">spaces</span> are within the same inline formatting context—is collapsed to have zero advance width. (It is invisible, but retains its <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③">soft wrap opportunity</a>, if any.) </ol> <li> If <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space⑤">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-pre" id="ref-for-valdef-white-space-pre③">pre</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap" id="ref-for-valdef-white-space-pre-wrap②">pre-wrap</a>, or <a class="css" data-link-type="maybe" href="#valdef-white-space-break-spaces" id="ref-for-valdef-white-space-break-spaces①">break-spaces</a>, any sequence of spaces is treated as a sequence of non-breaking spaces. However, for <span class="css" id="ref-for-valdef-white-space-pre-wrap③">pre-wrap</span>, a <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity④">soft wrap opportunity</a> exists at the end of a sequence of <a data-link-type="dfn" href="#spaces" id="ref-for-spaces⑦">spaces</a> and/or <a data-link-type="dfn" href="#tabs" id="ref-for-tabs③">tabs</a>, while for <span class="css" id="ref-for-valdef-white-space-break-spaces②">break-spaces</span>, a <span id="ref-for-soft-wrap-opportunity⑤">soft wrap opportunity</span> exists after every <span id="ref-for-spaces⑧">space</span> and every <span id="ref-for-tabs④">tab</span>. </ul> <div class="example" id="egbidiwscollapse"> <a class="self-link" href="#egbidiwscollapse"></a> The following example illustrates the interaction of white-space collapsing and bidirectionality. Consider the following markup fragment, taking special note of <a data-link-type="dfn" href="#spaces" id="ref-for-spaces⑨">spaces</a> (with varied backgrounds and borders for emphasis and identification): <pre><code><ltr>A<span class="egbidiwsaA"> </span><rtl><span class="egbidiwsbB"> </span>B<span class="egbidiwsaB"> </span></rtl><span class="egbidiwsbC"> </span>C</ltr></code></pre> <p>where the <code><ltr></code> element represents a left-to-right embedding and the <code><rtl></code> element represents a right-to-left embedding. If the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space⑥">white-space</a> property is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal⑤">normal</a>, the white-space processing model will result in the following:</p> <ul style="line-height:1.3"> <li> The <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①⓪">space</a> before the B (<span class="egbidiwsbB"> </span>) will collapse with the <span id="ref-for-spaces①①">space</span> after the A (<span class="egbidiwsaA"> </span>). <li> The <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①②">space</a> before the C (<span class="egbidiwsbC"> </span>) will collapse with the <span id="ref-for-spaces①③">space</span> after the B (<span class="egbidiwsaB"> </span>). </ul> <p>This will leave two <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①④">spaces</a>, one after the A in the left-to-right embedding level, and one after the B in the right-to-left embedding level. The text will then be ordered according to the Unicode bidirectional algorithm, with the end result being:</p> <pre>A<span class="egbidiwsaA"> </span><span class="egbidiwsaB"> </span>BC</pre> <p>Note that there will be two <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①⑤">spaces</a> between A and B, and none between B and C. This is best avoided by putting <span id="ref-for-spaces①⑥">spaces</span> outside the element instead of just inside the opening and closing tags and, where practical, by relying on implicit bidirectionality instead of explicit embedding levels.</p> </div> <h4 class="heading settled" data-level="4.1.2" id="white-space-phase-2"><span class="secno">4.1.2. </span><span class="content"> Phase II: Trimming and Positioning</span><a class="self-link" href="#white-space-phase-2"></a></h4> <p>Then, the entire block is rendered. Inlines are laid out, taking <a href="https://www.w3.org/TR/css-writing-modes-4/#text-direction">bidi reordering</a> into account, and <a data-link-type="dfn" href="#wrapping" id="ref-for-wrapping①">wrapping</a> as specified by the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space⑦">white-space</a> property. As each line is laid out,</p> <ol> <li> A sequence of <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space④">collapsible</a> <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①⑦">spaces</a> at the beginning of a line is removed. <li> If the <a data-link-type="dfn" href="#tab-size-dfn" id="ref-for-tab-size-dfn">tab size</a> is zero, <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space④">preserved</a> <a data-link-type="dfn" href="#tabs" id="ref-for-tabs⑤">tabs</a> are not rendered. Otherwise, each <span id="ref-for-preserved-white-space⑤">preserved</span> <span id="ref-for-tabs⑥">tab</span> is rendered as a horizontal shift that lines up the start edge of the next glyph with the next <a data-link-type="dfn" href="#tab-stop" id="ref-for-tab-stop">tab stop</a>. If this distance is less than <span class="css">0.5ch</span>, then the subsequent <span id="ref-for-tab-stop①">tab stop</span> is used instead. <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="tab stop" data-noexport id="tab-stop">Tab stops</dfn> occur at points that are multiples of the <span id="ref-for-tab-size-dfn①">tab size</span> from the starting content edge of the <span id="ref-for-preserved-white-space⑥">preserved</span> <span id="ref-for-tabs⑦">tab</span>’s nearest <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#block-container" id="ref-for-block-container">block container</a> ancestor. The <span id="ref-for-tab-size-dfn②">tab size</span> is given by the <a class="property css" data-link-type="property" href="#propdef-tab-size" id="ref-for-propdef-tab-size①">tab-size</a> property. <p class="note" role="note"><span class="marker">Note:</span> See the Unicode <a href="http://unicode.org/reports/tr9/#L1">rules on how tabulation (U+0009) interacts with bidi</a>. <a data-link-type="biblio" href="#biblio-uax9" title="Unicode Bidirectional Algorithm">[UAX9]</a></p> <li> A sequence of <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space⑤">collapsible</a> <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①⑧">spaces</a> at the end of a line is removed, as well as any trailing U+1680 OGHAM SPACE MARK whose <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space⑧">white-space</a> property is <a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal⑥">normal</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap" id="ref-for-valdef-white-space-nowrap②">nowrap</a>, or <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line" id="ref-for-valdef-white-space-pre-line②">pre-line</a>. <p class="note" role="note"><span class="marker">Note:</span> Due to <cite>Unicode Bidirectional Algorithm</cite> rule <a href="http://unicode.org/reports/tr9/#L1">L1</a>, a sequence of <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space⑥">collapsible</a> <a data-link-type="dfn" href="#spaces" id="ref-for-spaces①⑨">spaces</a> located at the end of the line prior to <a href="https://www.w3.org/TR/css-writing-modes-4/#text-direction">bidi reordering</a> will also be at the end of the line after reordering. <a data-link-type="biblio" href="#biblio-uax9" title="Unicode Bidirectional Algorithm">[UAX9]</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a></p> <li> If there remains any sequence of <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①⑧">white space</a>, <a data-link-type="dfn" href="#other-space-separators" id="ref-for-other-space-separators④">other space separators</a>, and/or <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space⑦">preserved</a> <a data-link-type="dfn" href="#tabs" id="ref-for-tabs⑧">tabs</a> at the end of a line (after <a href="https://www.w3.org/TR/css-writing-modes-4/#text-direction">bidi reordering</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a>): <ul> <li> If <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space⑨">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal⑦">normal</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap" id="ref-for-valdef-white-space-nowrap③">nowrap</a>, or <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line" id="ref-for-valdef-white-space-pre-line③">pre-line</a>, the UA must <a data-link-type="dfn" href="#hang" id="ref-for-hang①">hang</a> this sequence (unconditionally). <li> If <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①⓪">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap" id="ref-for-valdef-white-space-pre-wrap④">pre-wrap</a>, the UA must (unconditionally) <a data-link-type="dfn" href="#hang" id="ref-for-hang②">hang</a> this sequence, unless the sequence is followed by a <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break③">forced line break</a>, in which case it must <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang">conditionally hang</a> the sequence instead. It may also visually collapse the character advance widths of any that would otherwise overflow. <p class="note" role="note"><span class="marker">Note:</span> <a data-link-type="dfn" href="#hang" id="ref-for-hang③">Hanging</a> the white space rather than collapsing it allows users to see the space when selecting or editing text.</p> <li> If <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①①">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-break-spaces" id="ref-for-valdef-white-space-break-spaces③">break-spaces</a>, <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②⓪">spaces</a>, <a data-link-type="dfn" href="#tabs" id="ref-for-tabs⑨">tabs</a>, and <a data-link-type="dfn" href="#other-space-separators" id="ref-for-other-space-separators⑤">other space separators</a> are treated the same as other visible characters: they cannot <a data-link-type="dfn" href="#hang" id="ref-for-hang④">hang</a> nor have their advance width collapsed. <p class="note" role="note"><span class="marker">Note:</span> Such characters therefore take up space, and depending on the available space and applicable line breaking controls will either overflow or cause the line to wrap.</p> </ul> </ol> <div class="example" id="example-af2745cd"> <a class="self-link" href="#example-af2745cd"></a> This example shows that <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang①">conditionally hanging</a> white space at the end of lines with forced breaks provides symmetry with the start of the line. An underline is added to help visualize the spaces. <pre><code class="highlight">p <c- p>{</c-> <c- k>white-space</c-><c- p>:</c-> pre-wrap<c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- m>5</c-><c- k>ch</c-><c- p>;</c-> <c- k>border</c-><c- p>:</c-> solid <c- m>1</c-><c- k>px</c-><c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> monospace<c- p>;</c-> <c- k>text-align</c-><c- p>:</c-> center<c- p>;</c-> <c- p>}</c-> </code></pre> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c-> 0 <c- p></</c-><c- f>p</c-><c- p>></c-> </pre> <p>The sample above would be rendered as follows:</p> <div style="word-wrap: normal; font-size: 2em; font-family: monospace; width: 5ch; border: solid 1px; white-space: pre;"> <span style="text-decoration: underline; text-decoration: underline orange"> 0 </span> </div> <p>Since the final <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②①">space</a> is before a forced line break and does not overflow, it does not hang, and centering works as expected.</p> </div> <div class="example" id="example-e231f51f"> <a class="self-link" href="#example-e231f51f"></a> This example illustrates the difference between <a data-link-type="dfn" href="#hang" id="ref-for-hang⑤">hanging</a> <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②②">spaces</a> at the end of lines without forced breaks, and <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang②">conditionally hanging</a> them at the end of lines with forced breaks. An underline is added to help visualize the <span id="ref-for-spaces②③">spaces</span>. <pre><code class="highlight">p <c- p>{</c-> <c- k>white-space</c-><c- p>:</c-> pre-wrap<c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- m>3</c-><c- k>ch</c-><c- p>;</c-> <c- k>border</c-><c- p>:</c-> solid <c- m>1</c-><c- k>px</c-><c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> monospace<c- p>;</c-> <c- p>}</c-> </code></pre> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c-> 0 0 0 0 <c- p></</c-><c- f>p</c-><c- p>></c-> </pre> <p>The sample above would be rendered as follows:</p> <div style="word-wrap: normal; font-size: 2em; font-family: monospace; width: 3ch; border: solid 1px; white-space: pre; text-decoration: underline; text-decoration: underline orange"> 0 <br>0 0 <br>0 </div> <p>If <code class="highlight">p <c- p>{</c-> <c- k>text-align</c-><c- p>:</c-> right<c- p>;</c-> <c- p>}</c-></code> was added, the result would be as follows:</p> <div style="word-wrap: normal; font-size: 2em; font-family: monospace; width: 3ch; border: solid 1px; white-space: pre;"> <span style="text-decoration: underline; text-decoration: underline orange"> 0 </span><br><span style="text-decoration: underline; text-decoration: underline orange">0 0 </span><br> <span style="text-decoration: underline; text-decoration: underline orange">0 </span></div> <p>As the <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space⑧">preserved</a> <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②④">spaces</a> at the end of lines without a forced break must <a data-link-type="dfn" href="#hang" id="ref-for-hang⑥">hang</a>, they are not considered when placing the rest of the line during text alignment. When aligning towards the end, this means any such <span id="ref-for-spaces②⑤">spaces</span> will overflow, and will not prevent the rest of the line’s content from being flush with the edge of the line. On the other hand, preserved spaces at the end of a line <em>with</em> a forced break <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang③">conditionally hang</a>. Since the space at the end of the last line would not overflow in this example, it does not <span id="ref-for-hang⑦">hang</span> and therefore is considered during text alignment.</p> </div> <div class="example" id="example-6c2f4658"> <a class="self-link" href="#example-6c2f4658"></a> In the following example, there is not enough room on any line to fit the end-of-line spaces, so they <a data-link-type="dfn" href="#hang" id="ref-for-hang⑧">hang</a> on all lines: the one on the line without a forced break because it must, as well as the one on the line with a forced break, because it <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang④">conditionally hangs</a> and overflows. An underline is added to help visualize the spaces. <pre><code class="highlight">p <c- p>{</c-> <c- k>white-space</c-><c- p>:</c-> pre-wrap<c- p>;</c-> <c- k>width</c-><c- p>:</c-> <c- m>3</c-><c- k>ch</c-><c- p>;</c-> <c- k>border</c-><c- p>:</c-> solid <c- m>1</c-><c- k>px</c-><c- p>;</c-> <c- k>font-family</c-><c- p>:</c-> monospace<c- p>;</c-> <c- p>}</c-> </code></pre> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c->0 0 0 0 <c- p></</c-><c- f>p</c-><c- p>></c-> </pre> <div style="word-wrap: normal; font-size: 2em; font-family: monospace; width: 3ch; border: solid 1px; white-space: pre; text-decoration: underline; text-decoration: underline orange">0 0 <br>0 0 </div> <p>The last line is not wrapped before the last <code>0</code> because characters that <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang⑤">conditionally hang</a> are not considered when measuring the line’s contents for fit.</p> </div> <h4 class="heading settled" data-level="4.1.3" id="line-break-transform"><span class="secno">4.1.3. </span><span class="content"> Segment Break Transformation Rules</span><a class="self-link" href="#line-break-transform"></a></h4> <p>When <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①②">white-space</a> is <a class="css" data-link-type="maybe" href="#valdef-white-space-pre" id="ref-for-valdef-white-space-pre④">pre</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap" id="ref-for-valdef-white-space-pre-wrap⑤">pre-wrap</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-break-spaces" id="ref-for-valdef-white-space-break-spaces④">break-spaces</a>, or <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line" id="ref-for-valdef-white-space-pre-line④">pre-line</a>, <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break⑧">segment breaks</a> are not <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space⑦">collapsible</a> and are instead transformed into a preserved line feed (U+000A).</p> <p>For other values of <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①③">white-space</a>, <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break⑨">segment breaks</a> are <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space⑧">collapsible</a>, and are collapsed as follows:</p> <ol> <li> First, any collapsible <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break①⓪">segment break</a> immediately following another collapsible <span id="ref-for-segment-break①①">segment break</span> is removed. <li> Then any remaining <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break①②">segment break</a> is either transformed into a space (U+0020) or removed depending on the context before and after the break. The rules for this operation are UA-defined in this level. <p class="note" role="note"><span class="marker">Note:</span> The white space processing rules have already removed any <a data-link-type="dfn" href="#tabs" id="ref-for-tabs①⓪">tabs</a> and <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②⑥">spaces</a> around the <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break①③">segment break</a> before this context is evaluated.</p> </ol> <div class="example" id="example-e2e8c9a5"> <a class="self-link" href="#example-e2e8c9a5"></a> The purpose of the segment break transformation rules (and white space collapsing in general) is to “unbreak” text that has been <a href="#white-space-processing">broken into segments</a> to make the document source code easier to work with. In languages that use word separators, such as English and Korean, “unbreaking” a line requires joining the two lines with a <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②⑦">space</a>. <figure> <pre>Here is an English paragraph that is broken into multiple lines in the source code so that it can be more easily read and edited in a text editor. </pre> <p>Here is an English paragraph that is broken into multiple lines in the source code so that it can be more easily read and edited in a text editor.</p> <figcaption> Eliminating a line break in English requires maintaining a <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②⑧">space</a> in its place. </figcaption> </figure> <p>In languages that have no word separators, such as Chinese, “unbreaking” a line requires joining the two lines with no intervening space.</p> <figure> <pre lang="zh-Hant">這個段落是那麼長, 在一行寫不行。最好 用三行寫。 </pre> <p lang="zh-Hant">這個段落是那麼長,在一行寫不行。最好用三行寫。 </p> <figcaption> Eliminating a line break in Chinese requires eliminating any intervening <a data-link-type="dfn" href="#white-space" id="ref-for-white-space①⑨">white space</a>. </figcaption> </figure> <p>The segment break transformation rules can use adjacent context to either transform the segment break into a space or eliminate it entirely.</p> </div> <p class="note" role="note"><span class="marker">Note:</span> Historically, HTML and CSS have unconditionally converted <a data-link-type="dfn" href="#segment-break" id="ref-for-segment-break①④">segment breaks</a> to spaces, which has prevented content authored in languages such as Chinese from being able to break lines within the source. Thus UA heuristics need to be conservative about where they discard <span id="ref-for-segment-break①⑤">segment breaks</span> even as they strive to improve support for such languages.</p> <h3 class="heading settled" data-level="4.2" id="tab-size-property"><span class="secno">4.2. </span><span class="content"> Tab Character Size: the <a class="property css" data-link-type="property" href="#propdef-tab-size" id="ref-for-propdef-tab-size②">tab-size</a> property</span><span id="tab-size"></span><a class="self-link" href="#tab-size-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="tab-size"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-tab-size">tab-size</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/#number-value" id="ref-for-number-value"><number [0,∞]></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="https://www.w3.org/TR/css-values-4/#length-value" id="ref-for-length-value"><length [0,∞]></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>8 <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>the specified number or absolute length <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <p>This property determines the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="tab-size-dfn">tab size</dfn> used to render <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space⑨">preserved</a> tab characters (U+0009). A <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#number-value" id="ref-for-number-value①"><number></a> represents the measure as a multiple of the advance width of the space character (U+0020) of the nearest <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#block-container" id="ref-for-block-container①">block container</a> ancestor of the <span id="ref-for-preserved-white-space①⓪">preserved</span> <a data-link-type="dfn" href="#tabs" id="ref-for-tabs①①">tab</a>, including its associated <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing">letter-spacing</a> and <a class="property css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing">word-spacing</a>. Negative values are not allowed.</p> <h2 class="heading settled" data-level="5" id="line-breaking"><span class="secno">5. </span><span class="content"> Line Breaking and Word Boundaries</span><a class="self-link" href="#line-breaking"></a></h2> <p></p> <p>When inline-level content is laid out into lines, it is broken across line boxes. Such a break is called a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="line-break">line break</dfn>. When a line is broken due to explicit line-breaking controls (such as a <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space①①">preserved</a> newline character), or due to the start or end of a block, it is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="forced-line-break">forced line break</dfn>. When a line is broken due to content <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="wrapping|wrap" data-noexport id="wrapping">wrapping</dfn> (i.e. when the UA creates unforced line breaks in order to fit the content within the measure), it is a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="soft-wrap-break">soft wrap break</dfn>. The process of breaking inline-level content into lines is called <dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="line breaking process | line breaking" id="line-breaking-process">line breaking</dfn>.</p> <p>Wrapping is only performed at an allowed break point, called a <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="soft-wrap-opportunity">soft wrap opportunity</dfn>. When wrapping is enabled (see <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①④">white-space</a>), the UA must minimize the amount of content overflowing a line by wrapping the line at a <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity⑥">soft wrap opportunity</a>, if one exists.</p> <p>In most writing systems, in the absence of hyphenation a <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity⑦">soft wrap opportunity</a> occurs only at word boundaries. Many such systems use <a data-link-type="dfn" href="#spaces" id="ref-for-spaces②⑨">spaces</a> or punctuation to explicitly separate words, and <span id="ref-for-soft-wrap-opportunity⑧">soft wrap opportunities</span> can be identified by these characters. Scripts such as Thai, Lao, and Khmer, however, do not use spaces or punctuation to separate words. Although the zero width space (U+200B) can be used as an explicit word delimiter in these scripts, this practice is not common. As a result, a lexical resource is needed to correctly identify <span id="ref-for-soft-wrap-opportunity⑨">soft wrap opportunities</span> in such texts.</p> <p>In some other writing systems, <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①⓪">soft wrap opportunities</a> are based on orthographic syllable boundaries, not word boundaries. Some of these systems, such as Javanese and Balinese, are similar to Thai and Lao in that they require analysis of the text to find breaking opportunities. In others such as Chinese (as well as Japanese, Yi, and sometimes also Korean), each syllable tends to correspond to a single <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit①">typographic letter unit</a>, and thus line breaking conventions allow the line to break anywhere <em>except</em> between certain character combinations. Additionally the level of strictness in these restrictions varies with the typesetting style.</p> <p>While CSS does not fully define where <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①①">soft wrap opportunities</a> occur, some controls are provided to distinguish common variations:</p> <ul> <li> The <a class="property css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break">line-break</a> property allows choosing various levels of “strictness” for line breaking restrictions. <li> The <a class="property css" data-link-type="property" href="#propdef-word-break" id="ref-for-propdef-word-break">word-break</a> property controls what types of letters are glommed together to form unbreakable “words”, causing CJK characters to behave like non-CJK text or vice versa. <li> The <a class="property css" data-link-type="property" href="#propdef-hyphens" id="ref-for-propdef-hyphens">hyphens</a> property controls whether automatic hyphenation is allowed to break words in scripts that hyphenate. <li> The <a class="property css" data-link-type="property" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap">overflow-wrap</a> property allows the UA to take a break anywhere in otherwise-unbreakable strings that would otherwise overflow. </ul> <p class="note" role="note"><span class="marker">Note:</span> <a href="https://www.unicode.org/reports/tr14/"><cite>Unicode Standard Annex #14: Unicode Line Breaking Algorithm</cite></a> defines a baseline behavior for line breaking for all scripts in Unicode, which is expected to be further tailored. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> More information on line breaking conventions can be found in <a href="https://www.w3.org/TR/jlreq/"><cite>Requirements for Japanese Text Layout</cite></a> <a data-link-type="biblio" href="#biblio-jlreq" title="Requirements for Japanese Text Layout 日本語組版処理の要件(日本語版)">[JLREQ]</a> and <cite>Formatting Rules for Japanese Documents</cite> <a data-link-type="biblio" href="#biblio-jis4051" title="Formatting rules for Japanese documents (『日本語文書の組版方法』).">[JIS4051]</a> for Japanese, <a href="https://www.w3.org/TR/clreq/"><cite>Requirements for Chinese Text Layout</cite></a> <a data-link-type="biblio" href="#biblio-clreq" title="Requirements for Chinese Text Layout - 中文排版需求">[CLREQ]</a> and <cite>General Rules for Punctuation</cite> <a data-link-type="biblio" href="#biblio-zhmark" title="General Rules for Punctuation (《标点符号用法》).">[ZHMARK]</a> for Chinese. See also the <a href="https://www.w3.org/International/">Internationalization Working Group</a>’s <a href="https://www.w3.org/TR/typography/#blocks_paragraphs">Language Enablement Index</a> which includes more information on additional languages. <a data-link-type="biblio" href="#biblio-typography" title="Language enablement index">[TYPOGRAPHY]</a> Any guidance on additional appropriate references would be much appreciated.</p> <h3 class="heading settled" data-level="5.1" id="line-break-details"><span class="secno">5.1. </span><span class="content"> Line Breaking Details</span><a class="self-link" href="#line-break-details"></a></h3> <p></p> <p>When determining <a data-link-type="dfn" href="#line-break" id="ref-for-line-break">line breaks</a>:</p> <ul> <li> The interaction of <a data-link-type="dfn" href="#line-breaking-process" id="ref-for-line-breaking-process①">line breaking</a> and bidirectional text is defined by <a href="https://www.w3.org/TR/css-writing-modes-4/#bidi-algo"><cite>CSS Writing Modes 4</cite> § 2.4 Applying the Bidirectional Reordering Algorithm</a> and the <cite>Unicode Bidirectional Algorithm</cite> (<a href="http://unicode.org/reports/tr9/#Reordering_Resolved_Levels">UAX9§3.4 Reordering Resolved Levels</a> in particular). <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a> <a data-link-type="biblio" href="#biblio-uax9" title="Unicode Bidirectional Algorithm">[UAX9]</a> <li> Preserved segment breaks, and—regardless of the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①⑤">white-space</a> value—any Unicode character with the <code>BK</code> and <code>NL</code> line breaking class, must be treated as forced line breaks. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> <p class="note" role="note"><span class="marker">Note:</span> The bidi implications of such <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break④">forced line breaks</a> are defined by the <a href="https://www.unicode.org/reports/tr9/"><cite>Unicode Bidirectional Algorithm</cite></a>. <a data-link-type="biblio" href="#biblio-uax9" title="Unicode Bidirectional Algorithm">[UAX9]</a></p> <li> Except where explicitly defined otherwise (e.g. for <a class="css" data-link-type="propdesc" href="#propdef-line-break" id="ref-for-propdef-line-break①">line-break: anywhere</a> or <a class="css" data-link-type="propdesc" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap①">overflow-wrap: anywhere</a>) line breaking behavior defined for the <code>WJ</code>, <code>ZW</code>, <code>GL</code>, and <code>ZWJ</code> Unicode line breaking classes must be honored. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> <li> UAs that allow wrapping at punctuation other than <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator">word separators</a> in writing systems that use them <em>should</em> prioritize breakpoints. (For example, if breaks after slashes are given a lower priority than spaces, the sequence “check /etc” will never break between the "/" and the "e".) As long as care is taken to avoid such awkward breaks, allowing breaks at appropriate punctuation other than <span id="ref-for-word-separator①">word separators</span> is recommended, as it results in more even-looking margins, particularly in narrow measures. The UA may use the width of the containing block, the text’s language, the <a class="property css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break②">line-break</a> value, and other factors in assigning priorities: CSS does not define prioritization of <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①②">soft wrap opportunities</a>. Prioritization of <span id="ref-for-word-separator②">word separators</span> is not expected, however, if <a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break①">word-break: break-all</a> is specified (since this value explicitly requests line breaking behavior not based on breaking at <span id="ref-for-word-separator③">word separators</span>)—and is forbidden under <span class="css" id="ref-for-propdef-line-break③">line-break: anywhere</span>. <li> Out-of-flow elements and inline element boundaries do not introduce a <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break⑤">forced line break</a> or <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①③">soft wrap opportunity</a> in the flow. <li> For Web-compatibility there is a <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①④">soft wrap opportunity</a> before and after each replaced element or other <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#atomic-inline" id="ref-for-atomic-inline">atomic inline</a>, even when adjacent to a character that would normally suppress them, including U+00A0 NO-BREAK SPACE. However, with the exception of U+00A0 NO-BREAK SPACE, there must be no <span id="ref-for-soft-wrap-opportunity①⑤">soft wrap opportunity</span> between <span id="ref-for-atomic-inline①">atomic inlines</span> and adjacent characters belonging to the Unicode GL, WJ, or ZWJ line breaking classes. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> <li> For <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①⑥">soft wrap opportunities</a> created by characters that disappear at the line break (e.g. U+0020 SPACE), properties on the box directly containing that character control the line breaking at that opportunity. For <span id="ref-for-soft-wrap-opportunity①⑦">soft wrap opportunities</span> defined by the boundary between two characters or <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#atomic-inline" id="ref-for-atomic-inline②">atomic inlines</a>, the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①⑥">white-space</a> property on the nearest common ancestor of the two characters controls breaking; which elements’ <a class="property css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break④">line-break</a>, <a class="property css" data-link-type="property" href="#propdef-word-break" id="ref-for-propdef-word-break②">word-break</a>, and <a class="property css" data-link-type="property" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap②">overflow-wrap</a> properties control the determination of <span id="ref-for-soft-wrap-opportunity①⑧">soft wrap opportunities</span> at such boundaries is undefined in Level 3. <li> For <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity①⑨">soft wrap opportunities</a> before the first or after the last character of a box, the break occurs immediately before/after the box (at its margin edge) rather than breaking the box between its content edge and the content. <li> Line breaking in/around Ruby is defined in <a href="https://www.w3.org/TR/css-ruby-1/#line-breaks"><cite>CSS Ruby Annotation Layout 1</cite> § 3.4 Breaking Across Lines</a>. <a data-link-type="biblio" href="#biblio-css-ruby-1" title="CSS Ruby Annotation Layout Module Level 1">[CSS-RUBY-1]</a> <li> In order to avoid unexpected overflow, if the user agent is unable to perform the requisite lexical or orthographic analysis for line breaking any <a data-link-type="dfn" href="#content-language" id="ref-for-content-language⑧">content language</a> that requires it—for example due to lacking a dictionary for certain languages—it must assume a <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②⓪">soft wrap opportunity</a> between pairs of <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit②">typographic letter units</a> in that writing system. <p class="note" role="note"><span class="marker">Note:</span> This provision is not triggered merely when the UA fails to find a word boundary in a particular text run; the text run may well be a single unbreakable word. It applies for example when a text run is composed of Khmer characters (U+1780 to U+17FF) if the user agent does not know how to determine word boundaries in Khmer.</p> </ul> <h3 class="heading settled" data-level="5.2" id="word-break-property"><span class="secno">5.2. </span><span class="content"> Breaking Rules for Letters: the <a class="property css" data-link-type="property" href="#propdef-word-break" id="ref-for-propdef-word-break③">word-break</a> property</span><span id="word-break"></span><a class="self-link" href="#word-break-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="word-break"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-word-break">word-break</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one⑨">|</a> keep-all <span id="ref-for-comb-one①⓪">|</span> break-all <span id="ref-for-comb-one①①">|</span> break-word <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property specifies <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②①">soft wrap opportunities</a> between letters, i.e. where it is “normal” and permissible to break lines of text. Specifically it controls whether a <span id="ref-for-soft-wrap-opportunity②②">soft wrap opportunity</span> generally exists between adjacent <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit③">typographic letter units</a>, treating non-<a data-link-type="dfn" href="#letter" id="ref-for-letter②">letter</a> <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①③">typographic character units</a> belonging to the <code>NU</code>, <code>AL</code>, <code>AI</code>, or <code>ID</code> Unicode line breaking classes as <span id="ref-for-typographic-letter-unit④">typographic letter units</span> for this purpose (only). <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> It does not affect rules governing the <span id="ref-for-soft-wrap-opportunity②③">soft wrap opportunities</span> created by <a data-link-type="dfn" href="#white-space" id="ref-for-white-space②⓪">white space</a> (as well as by <a data-link-type="dfn" href="#other-space-separators" id="ref-for-other-space-separators⑥">other space separators</a>) and around punctuation. (See <a class="property css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break⑤">line-break</a> for controls affecting punctuation and small kana.)</p> <div class="example" id="example-f0d22488"> <a class="self-link" href="#example-f0d22488"></a> For example, in some styles of CJK typesetting, English words are allowed to break between any two letters, rather than only at spaces or hyphenation points; this can be enabled with <span class="css">word-break:break-all</span>. <figure> <img alt="A snippet of Japanese text with English in it. The word 'caption' is broken into 'capt' and 'ion' across two lines." height="109" src="images/break-all.png" width="480"> <figcaption> An example of English text embedded in Japanese being broken at an arbitrary point in the word. </figcaption> </figure> <p>As another example, Korean has two styles of line-breaking: between any two Korean syllables (<a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break④">word-break: normal</a>) or, like English, mainly at spaces (<span class="css" id="ref-for-propdef-word-break⑤">word-break: keep-all</span>).</p> <pre>각 줄의 마지막에 한글이 올 때 줄 나눔 <strong>기 준을</strong> “글자” 또는 “어절” 단위로 한다. </pre> <pre>각 줄의 마지막에 한글이 올 때 줄 나눔 <strong>기준을</strong> “글자” 또는 “어절” 단위로 한다. </pre> <p>Ethiopic similarly has two styles of line-breaking, either only breaking at <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator④">word separators</a> (<a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break⑥">word-break: normal</a>), or also allowing breaks between letters within a word (<span class="css" id="ref-for-propdef-word-break⑦">word-break: break-all</span>).</p> <pre>ተወልዱ፡ኵሉ፡ሰብእ፡ግዑዛን፡ወዕሩያን፡ <strong>በማዕረግ</strong>፡ወብሕግ።ቦሙ፡ኅሊና፡ወዐቅል፡ ወይትጌበሩ፡አሐዱ፡ምስለ፡አሀዱ፡ በመንፈሰ፡እኍና። </pre> <pre>ተወልዱ፡ኵሉ፡ሰብእ፡ግዑዛን፡ወዕሩያን፡<strong>በማ ዕረግ</strong>፡ወብሕግ።ቦሙ፡ኅሊና፡ወዐቅል፡ወይትጌ በሩ፡አሐዱ፡ምስለ፡አሀዱ፡በመንፈሰ፡እኍና። </pre> </div> <p class="note" role="note"><span class="marker">Note:</span> To enable additional break opportunities only in the case of overflow, see <a class="property css" data-link-type="property" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap③">overflow-wrap</a>.</p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="word-break" data-dfn-type="value" data-export id="valdef-word-break-normal">normal</dfn> <dd> Words break according to their customary rules, as described <a href="#line-breaking">above</a>. Korean, which commonly exhibits two different behaviors, allows breaks between any two consecutive Hangul/Hanja. For Ethiopic, which also exhibits two different behaviors, such breaks within words are not allowed. <dt><dfn class="dfn-paneled css" data-dfn-for="word-break" data-dfn-type="value" data-export id="valdef-word-break-break-all">break-all</dfn> <dd> Breaking is allowed within “words”: specifically, in addition to <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②④">soft wrap opportunities</a> allowed for <a class="css" data-link-type="maybe" href="#valdef-word-break-normal" id="ref-for-valdef-word-break-normal">normal</a>, any <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit⑤">typographic letter units</a> (and any <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①④">typographic character units</a> resolving to the <code>NU</code> (“numeric”), <code>AL</code> (“alphabetic”), or <code>SA</code> (“Southeast Asian”) line breaking classes <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a>) are instead treated as <code>ID</code> (“ideographic characters”) for the purpose of line-breaking. Hyphenation is not applied. <p class="note" role="note"><span class="marker">Note:</span> This value does not affect whether there are <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②⑤">soft wrap opportunities</a> around punctuation characters. To allow breaks anywhere, see <a class="css" data-link-type="propdesc" href="#propdef-line-break" id="ref-for-propdef-line-break⑥">line-break: anywhere</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> This option enables the other common behavior for Ethiopic. It is also often used in a context where the text consists predominantly of CJK characters with only short non-CJK excerpts, and it is desired that the text be better distributed on each line.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="word-break" data-dfn-type="value" data-export id="valdef-word-break-keep-all">keep-all</dfn> <dd> Breaking is forbidden within “words”: implicit <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②⑥">soft wrap opportunities</a> between <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit⑥">typographic letter units</a> (or other <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①⑤">typographic character units</a> belonging to the <code>NU</code>, <code>AL</code>, <code>AI</code>, or <code>ID</code> Unicode line breaking classes <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a>) are suppressed, i.e. breaks are prohibited between pairs of such characters (regardless of <a class="property css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break⑦">line-break</a> settings other than <a class="css" data-link-type="maybe" href="#valdef-line-break-anywhere" id="ref-for-valdef-line-break-anywhere">anywhere</a>) except where opportunities exist due to dictionary-based breaking. Otherwise this option is equivalent to <a class="css" data-link-type="maybe" href="#valdef-word-break-normal" id="ref-for-valdef-word-break-normal①">normal</a>. In this style, sequences of CJK characters do not break. <p class="note" role="note"><span class="marker">Note:</span> This is the other common behavior for Korean (which uses <a data-link-type="dfn" href="#spaces" id="ref-for-spaces③⓪">spaces</a> between words), and is also useful for mixed-script text where CJK snippets are mixed into another language that uses <span id="ref-for-spaces③①">spaces</span> for separation.</p> </dl> <p>Symbols that line-break the same way as letters of a particular category are affected the same way as those letters.</p> <div class="example" id="example-cc487741"> <a class="self-link" href="#example-cc487741"></a> Here’s a mixed-script sample text: <pre style="white-space: pre-wrap">这是一些汉字 and some Latin <bdi dir="rtl">و کمی خط عربی</bdi> และตัวอย่างการเขียนภาษาไทย በጽሑፍ፡ማራዘሙን፡አንዳንድ፡ </pre> <p>The break-points are determined as follows (indicated by ‘·’):</p> <dl> <dt><a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break⑧">word-break: normal</a> <dd> <pre style="white-space: pre-wrap">这·是·一·些·汉·字·and·some·Latin·<bdi dir="rtl">و·کمی·خط·عربی</bdi>·และ·ตัวอย่าง·การเขียน·ภาษาไทย·በጽሑፍ፡·ማራዘሙን፡·አንዳንድ፡ </pre> <dt><a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break⑨">word-break: break-all</a> <dd> <pre style="white-space: pre-wrap">这·是·一·些·汉·字·a·n·d·s·o·m·e·L·a·t·i·n·<bdi dir="rtl">و·ﮐ·ﻤ·ﻰ·ﺧ·ﻁ·ﻋ·ﺮ·ﺑ·ﻰ</bdi>·แ·ล·ะ·ตั·ว·อ·ย่·า·ง·ก·า·ร·เ·ขี·ย·น·ภ·า·ษ·า·ไ·ท·ย·በ·ጽ·ሑ·ፍ፡·ማ·ራ·ዘ·ሙ·ን፡·አ·ን·ዳ·ን·ድ፡ </pre> <dt><a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break①⓪">word-break: keep-all</a> <dd> <pre style="white-space: pre-wrap">这是一些汉字·and·some·Latin·<bdi dir="rtl">و·کمی·خط·عربی</bdi>·และ·ตัวอย่าง·การเขียน·ภาษาไทย·በጽሑፍ፡·ማራዘሙን፡·አንዳንድ፡ </pre> </dl> </div> <div class="example" id="jp-title-break"> <a class="self-link" href="#jp-title-break"></a> <p>Japanese is usually typeset allowing line breaks within words. However, it is sometimes preferred to suppress these wrapping opportunities and to only allow wrapping at the end of certain sentence fragments. This is most commonly done in very short pieces of text, such as headings and table or figure captions.</p> <p>This can be achieved by marking the allowed wrapping points with <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> or U+200B ZERO WIDTH SPACE, and suppressing the other ones using <a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break①①">word-break: keep-all</a>.</p> <p>For instance, the following markup can produce either of the renderings below, depending on the value of the <a class="property css" data-link-type="property" href="#propdef-word-break" id="ref-for-propdef-word-break①②">word-break</a> property:</p> <pre class="highlight"><c- p><</c-><c- f>h1</c-><c- p>></c->窓ぎわの<c- p><</c-><c- f>wbr</c-><c- p>></c->トットちゃん<c- p></</c-><c- f>h1</c-><c- p>></c-> </pre> <table class="data"> <colgroup span="1"> <colgroup span="2"> <thead> <tr> <td> <th><code class="highlight">h1 <c- p>{</c-> <c- k>word-break</c-><c- p>:</c-> normal <c- p>}</c-></code> <th><code class="highlight">h1 <c- p>{</c-> <c- k>word-break</c-><c- p>:</c-> keep-all <c- p>}</c-></code> <tbody> <tr> <th scope="row">Expected rendering <td> <pre lang="ja">窓ぎわのトットちゃ ん </pre> <td> <pre lang="ja">窓ぎわの トットちゃん </pre> <tr> <th scope="row">Result in your browser <td> <samp lang="ja"> 窓ぎわの<wbr>トットちゃん </samp> <td> <samp lang="ja" style="word-break:keep-all"> 窓ぎわの<wbr>トットちゃん </samp> </table> </div> <p>When shaping scripts such as Arabic are allowed to break within words due to <a class="css" data-link-type="maybe" href="#valdef-word-break-break-all" id="ref-for-valdef-word-break-break-all">break-all</a> the characters must still be shaped as if the word were <a href="#word-break-shaping">not broken</a> (see <a href="#word-break-shaping">§ 5.6 Shaping Across Intra-word Breaks</a>).</p> <p>For compatibility with legacy content, the <a class="property css" data-link-type="property" href="#propdef-word-break" id="ref-for-propdef-word-break①③">word-break</a> property also supports a deprecated <dfn class="dfn-paneled css" data-dfn-for="word-break" data-dfn-type="value" data-export id="valdef-word-break-break-word">break-word</dfn> keyword. When specified, this has the same effect as <span class="css" id="ref-for-propdef-word-break①④">word-break: normal</span> and <a class="css" data-link-type="propdesc" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap④">overflow-wrap: anywhere</a>, regardless of the actual value of the <span class="property" id="ref-for-propdef-overflow-wrap⑤">overflow-wrap</span> property.</p> <h3 class="heading settled" data-level="5.3" id="line-break-property"><span class="secno">5.3. </span><span class="content"> Line Breaking Strictness: the <a class="property css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break⑧">line-break</a> property</span><a class="self-link" href="#line-break-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="line-break"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-line-break">line-break</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①②">|</a> loose <span id="ref-for-comb-one①③">|</span> normal <span id="ref-for-comb-one①④">|</span> strict <span id="ref-for-comb-one①⑤">|</span> anywhere <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property specifies the strictness of line-breaking rules applied within an element: especially how <a data-link-type="dfn" href="#wrapping" id="ref-for-wrapping②">wrapping</a> interacts with punctuation and symbols. Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="line-break" data-dfn-type="value" data-export id="valdef-line-break-auto">auto</dfn> <dd> The UA determines the set of line-breaking restrictions to use, and it may vary the restrictions based on the length of the line; e.g., use a less restrictive set of line-break rules for short lines. <dt><dfn class="dfn-paneled css" data-dfn-for="line-break" data-dfn-type="value" data-export id="valdef-line-break-loose">loose</dfn> <dd> Breaks text using the least restrictive set of line-breaking rules. Typically used for short lines, such as in newspapers. <dt><dfn class="dfn-paneled css" data-dfn-for="line-break" data-dfn-type="value" data-export id="valdef-line-break-normal">normal</dfn> <dd> Breaks text using the most common set of line-breaking rules. <dt><dfn class="dfn-paneled css" data-dfn-for="line-break" data-dfn-type="value" data-export id="valdef-line-break-strict">strict</dfn> <dd> Breaks text using the most stringent set of line-breaking rules. <dt><dfn class="dfn-paneled css" data-dfn-for="line-break" data-dfn-type="value" data-export id="valdef-line-break-anywhere">anywhere</dfn> <dd> There is a <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②⑦">soft wrap opportunity</a> around every <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①⑥">typographic character unit</a>, including around any punctuation character or <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space①②">preserved white spaces</a>, or in the middle of words, disregarding any prohibition against line breaks, even those introduced by characters with the <code>GL</code>, <code>WJ</code>, or <code>ZWJ</code> line breaking classes or mandated by the <a class="property css" data-link-type="property" href="#propdef-word-break" id="ref-for-propdef-word-break①⑤">word-break</a> property. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> The different wrapping opportunities must not be prioritized. Hyphenation is not applied. <p class="note" role="note"><span class="marker">Note:</span> This value triggers the line breaking rules typically seen in terminals.</p> <div class="note" role="note"> Note: <a class="css" data-link-type="maybe" href="#valdef-line-break-anywhere" id="ref-for-valdef-line-break-anywhere①">anywhere</a> only allows <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space①③">preserved white spaces</a> at the end of the line to be wrapped to the next line when <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①⑦">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-break-spaces" id="ref-for-valdef-white-space-break-spaces⑤">break-spaces</a>, because in other cases: <ul> <li> <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space①④">preserved white space</a> at the end/start of the line is discarded (<a class="css" data-link-type="maybe" href="#valdef-white-space-normal" id="ref-for-valdef-white-space-normal⑧">normal</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line" id="ref-for-valdef-white-space-pre-line⑤">pre-line</a>) <li> wrapping is forbidden altogether (<a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap" id="ref-for-valdef-white-space-nowrap④">nowrap</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-pre" id="ref-for-valdef-white-space-pre⑤">pre</a>) <li> the <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space①⑤">preserved white space</a> <a data-link-type="dfn" href="#hang" id="ref-for-hang⑨">hang</a> (<a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap" id="ref-for-valdef-white-space-pre-wrap⑥">pre-wrap</a>). </ul> <p>When it does have an effect on <a data-link-type="dfn" href="#preserved-white-space" id="ref-for-preserved-white-space①⑥">preserved white space</a>, with <a class="css" data-link-type="propdesc" href="#propdef-white-space" id="ref-for-propdef-white-space①⑧">white-space: break-spaces</a>, it allows breaking before the first space of a sequence, which <a class="css" data-link-type="maybe" href="#valdef-white-space-break-spaces" id="ref-for-valdef-white-space-break-spaces⑥">break-spaces</a> on its own does not.</p> </div> </dl> <p>CSS distinguishes between four levels of strictness in the rules for text wrapping. The precise set of rules in effect for each of <a class="css" data-link-type="maybe" href="#valdef-line-break-loose" id="ref-for-valdef-line-break-loose">loose</a>, <a class="css" data-link-type="maybe" href="#valdef-line-break-normal" id="ref-for-valdef-line-break-normal">normal</a>, and <a class="css" data-link-type="maybe" href="#valdef-line-break-strict" id="ref-for-valdef-line-break-strict">strict</a> is up to the UA and should follow language conventions. However, for these three keywords, this specification does require that:</p> <ul> <li> The following breaks are forbidden in <a class="css" data-link-type="maybe" href="#valdef-line-break-strict" id="ref-for-valdef-line-break-strict①">strict</a> line breaking and allowed in <a class="css" data-link-type="maybe" href="#valdef-line-break-normal" id="ref-for-valdef-line-break-normal①">normal</a> and <a class="css" data-link-type="maybe" href="#valdef-line-break-loose" id="ref-for-valdef-line-break-loose①">loose</a>: <ul> <li> breaks before Japanese small kana or the Katakana-Hiragana prolonged sound mark, i.e. characters from the Unicode line breaking class <code>CJ</code>. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> </ul> <li> The following breaks are allowed for <a class="css" data-link-type="maybe" href="#valdef-line-break-normal" id="ref-for-valdef-line-break-normal②">normal</a> and <a class="css" data-link-type="maybe" href="#valdef-line-break-loose" id="ref-for-valdef-line-break-loose②">loose</a> line breaking if the <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system①">writing system</a> is <a data-link-type="dfn" href="#writing-system-chinese" id="ref-for-writing-system-chinese">Chinese</a> or <a data-link-type="dfn" href="#writing-system-japanese" id="ref-for-writing-system-japanese">Japanese</a>, and are otherwise forbidden: <ul> <li> breaks before certain CJK hyphen-like characters:<br> 〜 U+301C, ゠ U+30A0 </ul> <li> The following breaks are allowed for <a class="css" data-link-type="maybe" href="#valdef-line-break-loose" id="ref-for-valdef-line-break-loose③">loose</a> line breaking if the preceding character belongs to the Unicode line breaking class <code>ID</code> <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> (including when the preceding character is treated as <code>ID</code> due to <a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break①⑥">word-break: break-all</a>), and are otherwise forbidden: <ul> <li> breaks before hyphens:<br> ‐ U+2010, – U+2013 </ul> <li> The following breaks are forbidden for <a class="css" data-link-type="maybe" href="#valdef-line-break-normal" id="ref-for-valdef-line-break-normal③">normal</a> and <a class="css" data-link-type="maybe" href="#valdef-line-break-strict" id="ref-for-valdef-line-break-strict②">strict</a> line breaking and allowed in <a class="css" data-link-type="maybe" href="#valdef-line-break-loose" id="ref-for-valdef-line-break-loose④">loose</a>: <ul> <li> breaks before iteration marks:<br> 々 U+3005, 〻 U+303B, ゝ U+309D, ゞ U+309E, ヽ U+30FD, ヾ U+30FE <li> breaks between inseparable characters (such as ‥ U+2025, … U+2026) i.e. characters from the Unicode line breaking class <code>IN</code>. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> </ul> <li> The following breaks are allowed for <a class="css" data-link-type="maybe" href="#valdef-line-break-loose" id="ref-for-valdef-line-break-loose⑤">loose</a> if the <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system②">writing system</a> is <a data-link-type="dfn" href="#writing-system-chinese" id="ref-for-writing-system-chinese①">Chinese</a> or <a data-link-type="dfn" href="#writing-system-japanese" id="ref-for-writing-system-japanese①">Japanese</a> and are otherwise forbidden: <ul> <li> breaks before certain centered punctuation marks:<br> ・ U+30FB, : U+FF1A, ; U+FF1B, ・ U+FF65, ‼ U+203C, ⁇ U+2047, ⁈ U+2048, ⁉ U+2049, ! U+FF01, ? U+FF1F <li> breaks before suffixes:<br> Characters with the Unicode line breaking class <code>PO</code> <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> and the <a data-link-type="dfn" href="#unicode-east-asian-width" id="ref-for-unicode-east-asian-width">East Asian Width property</a> <a data-link-type="biblio" href="#biblio-uax11" title="East Asian Width">[UAX11]</a> <code>Ambiguous</code>, <code>Fullwidth</code>, or <code>Wide</code>. <li> breaks after prefixes:<br> Characters with the Unicode line breaking class <code>PR</code> <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> and the <a data-link-type="dfn" href="#unicode-east-asian-width" id="ref-for-unicode-east-asian-width①">East Asian Width property</a> <a data-link-type="biblio" href="#biblio-uax11" title="East Asian Width">[UAX11]</a> <code>Ambiguous</code>, <code>Fullwidth</code>, or <code>Wide</code>. </ul> </ul> <p class="note" role="note"><span class="marker">Note:</span> The requirements listed above only create distinctions in CJK text. In an implementation that matches only the rules above, and no additional rules, <a class="property css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break⑨">line-break</a> would only affect CJK code points unless the writing system is tagged as <a data-link-type="dfn" href="#writing-system-chinese" id="ref-for-writing-system-chinese②">Chinese</a> or <a data-link-type="dfn" href="#writing-system-japanese" id="ref-for-writing-system-japanese②">Japanese</a>. Future levels may add additional specific rules for other writing systems and languages as their requirements become known.</p> <div class="example" id="example-038e656c"><a class="self-link" href="#example-038e656c"></a> As UAs can add additional distinctions between <a class="css" data-link-type="maybe" href="#valdef-line-break-strict" id="ref-for-valdef-line-break-strict③">strict</a>/<a class="css" data-link-type="maybe" href="#valdef-line-break-normal" id="ref-for-valdef-line-break-normal④">normal</a>/<a class="css" data-link-type="maybe" href="#valdef-line-break-loose" id="ref-for-valdef-line-break-loose⑥">loose</a> modes, these values can exhibit differences in other writing systems as well. For example, a UA with sufficiently-advanced Thai language processing ability could choose to map different levels of strictness in Thai line-breaking to these keywords, e.g. disallowing breaks within compound words in <span class="css" id="ref-for-valdef-line-break-strict④">strict</span> mode (e.g. breaking ตัวอย่างการเขียนภาษาไทย as ตัวอย่าง·การเขียน·ภาษาไทย) while allowing more breaks in <span class="css" id="ref-for-valdef-line-break-loose⑦">loose</span> (ตัวอย่าง·การ·เขียน·ภาษา·ไทย). </div> <p class="note" role="note"><span class="marker">Note:</span> The CSSWG recognizes that in a future edition of the specification finer control over line breaking may be necessary to satisfy high-end publishing requirements.</p> <h3 class="heading settled" data-level="5.4" id="hyphenation"><span class="secno">5.4. </span><span class="content"> Hyphenation: the <a class="property css" data-link-type="property" href="#propdef-hyphens" id="ref-for-propdef-hyphens①">hyphens</a> property</span><span id="hyphens-property"></span><a class="self-link" href="#hyphenation"></a></h3> <p></p> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="hyphenation|hyphenate" data-noexport id="hyphenate">Hyphenation</dfn> is the controlled splitting of words where they usually would not be allowed to break to improve the layout of paragraphs, typically splitting words at syllabic or morphemic boundaries and often visually indicating the split (usually by inserting a hyphen, U+2010). In some cases, hyphenation may also alter the spelling of a word. Regardless, hyphenation is a rendering effect only: it must have no effect on the underlying document content or on text selection or searching.</p> <div class="example" id="example-17746cb4"> <a class="self-link" href="#example-17746cb4"></a> Hyphenation practices vary across languages, and can involve not just inserting a hyphen before the line break, but inserting a hyphen after the break (or both), inserting a different character than U+2010, or changing the spelling of the word. <table class="data"> <thead> <tr> <th>Language <th>Unbroken <th>Before <th>After <tbody> <tr lang="en"> <th>English <td>Unbroken <td>Un‐ <td>broken <tr lang="nl"> <th lang="en">Dutch <td>cafeetje <td>café‐ <td>tje <tr lang="hu"> <th lang="en">Hungarian <td>Összeg <td>Ösz‐ <td>szeg <tr lang="zh-Latn-pinyin"> <th lang="en" rowspan="2">Mandarin <td>tú’àn <td>tú‐ <td>àn <tr lang="zh-Latn-pinyin"> <td>àizēng‐fēnmíng <td>àizēng‐ <td>‐fēnmíng <tr lang="ug"> <th lang="en">Uyghur <td dir="rtl"> <img alt=" [isolated DAL + isolated ALEF + initial MEEM + medial YEH + final DAL + isolated ALEF MAKSURA]" height="304" src="images/uyghur-unbroken.svg" style="height: 1.5em; vertical-align: -13%"> <td dir="rtl"> <img alt="[isolated DAL + isolated ALEF + initial MEEM + final YEH + hyphen ]" height="304" src="images/uyghur-hyphenate-joined-before.svg" style="height: 1.5em; vertical-align: -13%"> <td dir="rtl"> <img alt="[ isolated DAL + isolated ALEF MAKSURA]" height="304" src="images/uyghur-hyphenate-joined-after.svg" style="height: 1.5em; vertical-align: -13%"> <tr lang="cr"> <th lang="en">Cree <td> <img alt="[ᑲᓯᑕᓂᐘᓂᓂᐠ] (CANADIAN SYLLABICS KA + CANADIAN SYLLABICS SI + CANADIAN SYLLABICS TA + CANADIAN SYLLABICS NI + CANADIAN SYLLABICS WEST-CREE WA + CANADIAN SYLLABICS NI + CANADIAN SYLLABICS NI + CANADIAN SYLLABICS FINAL GRAVE)" height="524" src="images/cree.svg" style="height: 1em; vertical-align: baseline;"> <td> <img alt="[ᑲᓯᑕᓂ᐀] (CANADIAN SYLLABICS KA + CANADIAN SYLLABICS SI + CANADIAN SYLLABICS TA + CANADIAN SYLLABICS NI + CANADIAN SYLLABICS HYPHEN)" height="524" src="images/cree-before.svg" style="height: 1em; vertical-align: baseline;"> <td> <img alt="[ᐘᓂᓂᐠ] (CANADIAN SYLLABICS WEST-CREE WA + CANADIAN SYLLABICS NI + CANADIAN SYLLABICS NI + CANADIAN SYLLABICS FINAL GRAVE)" height="524" src="images/cree-after.svg" style="height: 1em; vertical-align: baseline;"> </table> </div> <p>Hyphenation occurs when the line breaks at a valid <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="hyphenation-opportunity">hyphenation opportunity</dfn>, which is a type of <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②⑧">soft wrap opportunity</a> that exists within a word where <a data-link-type="dfn" href="#hyphenate" id="ref-for-hyphenate">hyphenation</a> is allowed. In CSS <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity">hyphenation opportunities</a> are controlled with the <a class="property css" data-link-type="property" href="#propdef-hyphens" id="ref-for-propdef-hyphens②">hyphens</a> property. CSS Text Level 3 does not define the exact rules for <span id="ref-for-hyphenate①">hyphenation</span>; however UAs are strongly encouraged to optimize their choice of break points and to chose language-appropriate hyphenation points.</p> <p class="note" role="note"><span class="marker">Note:</span> The <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity②⑨">soft wrap opportunity</a> introduced by the U+002D - HYPHEN-MINUS character or the U+2010 ‐ HYPHEN character is not a <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity①">hyphenation opportunity</a>, as no visual indication of the split is <em>created</em> when wrapping: these characters are visible whether the line is wrapped at that point or not.</p> <p>Hyphenation opportunities <em>are</em> considered when calculating <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#min-content" id="ref-for-min-content">min-content intrinsic sizes</a>.</p> <p class="note" role="note"><span class="marker">Note:</span> This allows tables to hyphenate their contents instead of overflowing their containing block, which is particularly important in long-word languages like German.</p> <table class="def propdef" data-link-for-hint="hyphens"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-hyphens">hyphens</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">none <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⑥">|</a> manual <span id="ref-for-comb-one①⑦">|</span> auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>manual <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property controls whether <a data-link-type="dfn" href="#hyphenate" id="ref-for-hyphenate②">hyphenation</a> is allowed to create more <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③⓪">soft wrap opportunities</a> within a line of text. Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="hyphens" data-dfn-type="value" data-export id="valdef-hyphens-none">none</dfn> <dd> Words are not hyphenated, even if characters inside the word explicitly define <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity②">hyphenation opportunities</a>. <p class="note" role="note"><span class="marker">Note:</span> This does not suppress the existing <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③①">soft wrap opportunities</a> introduced by always visible characters such as U+002D - HYPHEN-MINUS or U+2010 ‐ HYPHEN.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="hyphens" data-dfn-type="value" data-export id="valdef-hyphens-manual">manual</dfn> <dd> Words are only hyphenated where there are characters inside the word that explicitly suggest <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity③">hyphenation opportunities</a>. The UA must use the appropriate language-specific hyphenation character(s) and should apply any appropriate spelling changes just as for automatic hyphenation at the same point. <div class="example" id="example-b6db0d14"> <a class="self-link" href="#example-b6db0d14"></a> In Unicode, U+00AD is a conditional "soft hyphen" and U+2010 is an unconditional hyphen. <cite>Unicode Standard Annex #14</cite> describes the <a href="http://unicode.org/reports/tr14/#SoftHyphen">role of soft hyphens in</a> Unicode line breaking. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> In HTML, &shy; represents the soft hyphen character, which suggests a hyphenation opportunity. <pre class="highlight">ex<c- ni>&shy;</c->ample</pre> </div> <dt><dfn class="dfn-paneled css" data-dfn-for="hyphens" data-dfn-type="value" data-export id="valdef-hyphens-auto">auto</dfn> <dd> Words may be broken at <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity④">hyphenation opportunities</a> determined automatically by a language-appropriate hyphenation resource in addition to those indicated explicitly by a conditional hyphen. Automatic <span id="ref-for-hyphenation-opportunity⑤">hyphenation opportunities</span> elsewhere within a word must be ignored if the word contains a conditional hyphen (&shy; or U+00AD SOFT HYPHEN), in favor of the conditional hyphen(s). However, if, even after breaking at such opportunities, a portion of that word is still too long to fit on one line, an automatic hyphenation opportunity may be used. </dl> <p>Correct automatic hyphenation requires a hyphenation resource appropriate to the language of the text being broken. The UA must therefore only automatically hyphenate text for which the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language⑨">content language</a> is known and for which it has an appropriate hyphenation resource.</p> <div class="advisement"> Authors should correctly tag their content’s <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①⓪">language</a> (e.g. using the HTML <code>lang</code> attribute or XML <code>xml:lang</code> attribute) in order to obtain correct automatic hyphenation. </div> <p>The UA may use language-tailored heuristics to exclude certain words from automatic hyphenation. For example, a UA might try to avoid hyphenation in proper nouns by excluding words matching certain capitalization and punctuation patterns. Such heuristics are not defined by this specification. (Note that such heuristics will need to vary by language: English and German, for example, have very different capitalization conventions.)</p> <p>For the purpose of the <a class="property css" data-link-type="property" href="#propdef-hyphens" id="ref-for-propdef-hyphens③">hyphens</a> property, what constitutes a “word” is UA-dependent. However, inline element boundaries and out-of-flow elements must be ignored when determining word boundaries.</p> <p>Any glyphs shown due to hyphenation at a <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity⑥">hyphenation opportunity</a> created by a conditional hyphen character (such as U+00AD SOFT HYPHEN) are represented by that character and are styled according to the properties applied to it.</p> <p>When shaping scripts such as Arabic are allowed to break within words due to hyphenation, the characters must still be shaped as if the word were <a href="#word-break-shaping">not broken</a> (see <a href="#word-break-shaping">§ 5.6 Shaping Across Intra-word Breaks</a>).</p> <div class="example" id="example-4faf88c1"><a class="self-link" href="#example-4faf88c1"></a> For example, if the Uyghur word “داميدى” were hyphenated, it would appear as <img alt="[isolated DAL + isolated ALEF + initial MEEM + medial YEH + hyphen + line-break + final DAL + isolated ALEF MAKSURA]" height="608" src="images/uyghur-hyphenate-joined.svg" style="height: 3.5em; background: white;"> not as <img alt="[isolated DAL + isolated ALEF + initial MEEM + final YEH + hyphen + line-break + isolated DAL + isolated ALEF MAKSURA]" height="608" src="images/uyghur-hyphenate-unjoined.svg" style="height: 3.5em; background: white;"> . </div> <h3 class="heading settled" data-level="5.5" id="overflow-wrap-property"><span class="secno">5.5. </span><span class="content"> Overflow Wrapping: the <a class="property css" data-link-type="property" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap⑥">overflow-wrap</a>/<a class="property css" data-link-type="property" href="#propdef-word-wrap" id="ref-for-propdef-word-wrap">word-wrap</a> property</span><span id="overflow-wrap"></span><a class="self-link" href="#overflow-wrap-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="overflow-wrap"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-overflow-wrap">overflow-wrap</dfn>, <dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-word-wrap">word-wrap</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one①⑧">|</a> break-word <span id="ref-for-comb-one①⑨">|</span> anywhere <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property specifies whether the UA may break at otherwise disallowed points within a line to prevent overflow, when an otherwise-unbreakable string is too long to fit within the line box. It only has an effect when <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space①⑨">white-space</a> allows <a data-link-type="dfn" href="#wrapping" id="ref-for-wrapping③">wrapping</a>. Possible values:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="overflow-wrap" data-dfn-type="value" data-export id="valdef-overflow-wrap-normal">normal</dfn> <dd> Lines may break only at allowed break points. However, the restrictions introduced by <a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break①⑦">word-break: keep-all</a> may be relaxed to match <span class="css" id="ref-for-propdef-word-break①⑧">word-break: normal</span> if there are no otherwise-acceptable break points in the line. <dt><dfn class="dfn-paneled css" data-dfn-for="overflow-wrap" data-dfn-type="value" data-export id="valdef-overflow-wrap-anywhere">anywhere</dfn> <dd> An otherwise unbreakable sequence of <a data-link-type="dfn" href="#character" id="ref-for-character①①">characters</a> may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line. Shaping characters are still shaped as if the word were not broken, and grapheme clusters must stay together as one unit. No hyphenation character is inserted at the break point. <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③②">Soft wrap opportunities</a> introduced by <a class="css" data-link-type="maybe" href="#valdef-overflow-wrap-anywhere" id="ref-for-valdef-overflow-wrap-anywhere">anywhere</a> <em>are considered</em> when calculating <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#min-content" id="ref-for-min-content①">min-content intrinsic sizes</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="overflow-wrap" data-dfn-type="value" data-export id="valdef-overflow-wrap-break-word">break-word</dfn> <dd> As for <a class="css" data-link-type="maybe" href="#valdef-overflow-wrap-anywhere" id="ref-for-valdef-overflow-wrap-anywhere①">anywhere</a> except that <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③③">soft wrap opportunities</a> introduced by <a class="css" data-link-type="maybe" href="#valdef-overflow-wrap-break-word" id="ref-for-valdef-overflow-wrap-break-word">break-word</a> are <em>not</em> considered when calculating <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#min-content" id="ref-for-min-content②">min-content intrinsic sizes</a>. </dl> <p>For legacy reasons, UAs must treat <a class="property css" data-link-type="property" href="#propdef-word-wrap" id="ref-for-propdef-word-wrap①">word-wrap</a> as a <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#legacy-name-alias" id="ref-for-legacy-name-alias">legacy name alias</a> of the <a class="property css" data-link-type="property" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap⑦">overflow-wrap</a> property.</p> <h3 class="heading settled" data-level="5.6" id="word-break-shaping"><span class="secno">5.6. </span><span class="content"> Shaping Across Intra-word Breaks</span><a class="self-link" href="#word-break-shaping"></a></h3> <p>When shaping scripts such as Arabic <a data-link-type="dfn" href="#wrapping" id="ref-for-wrapping④">wrap</a> at unforced <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③④">soft wrap opportunities</a> within words (such as when breaking due to <a class="css" data-link-type="propdesc" href="#propdef-word-break" id="ref-for-propdef-word-break①⑨">word-break: break-all</a>, <a class="css" data-link-type="propdesc" href="#propdef-line-break" id="ref-for-propdef-line-break①⓪">line-break: anywhere</a>, <a class="css" data-link-type="propdesc" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap⑧">overflow-wrap: break-word</a>, <span class="css" id="ref-for-propdef-overflow-wrap⑨">overflow-wrap: anywhere</span>, or when <a data-link-type="dfn" href="#hyphenate" id="ref-for-hyphenate③">hyphenating</a>) the characters must still be shaped (their joining forms chosen) as if the word were still whole.</p> <div class="example" id="example-433d41a3"><a class="self-link" href="#example-433d41a3"></a> For example, if the word “نوشتن” is broken between the “ش” and “ت”, the “ش” still takes its initial form (“ﺷ”), and the “ت” its medial form (“ﺘ”)—forming as in “ﻧﻮﺷ | ﺘﻦ”, not as in “نوش | تن”. </div> <h2 class="heading settled" data-level="6" id="justification"><span class="secno">6. </span><span class="content"> Alignment and Justification</span><a class="self-link" href="#justification"></a></h2> <p>Alignment and justification controls how inline content is distributed within a line box.</p> <h3 class="heading settled" data-level="6.1" id="text-align-property"><span class="secno">6.1. </span><span class="content"> Text Alignment: the <a class="property css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align">text-align</a> shorthand</span><span id="text-align"></span><a class="self-link" href="#text-align-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="text-align"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-align">text-align</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">start <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②⓪">|</a> end <span id="ref-for-comb-one②①">|</span> left <span id="ref-for-comb-one②②">|</span> right <span id="ref-for-comb-one②③">|</span> center <span id="ref-for-comb-one②④">|</span> justify <span id="ref-for-comb-one②⑤">|</span> match-parent <span id="ref-for-comb-one②⑥">|</span> justify-all <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>start <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>block containers <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>yes <tr> <th><a href="https://www.w3.org/TR/css-values/#percentages">Percentages:</a> <td>see individual properties <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>see individual properties <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a </table> <p>This <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#shorthand-property" id="ref-for-shorthand-property">shorthand property</a> sets the <a class="property css" data-link-type="property" href="#propdef-text-align-all" id="ref-for-propdef-text-align-all">text-align-all</a> and <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last">text-align-last</a> properties and describes how the inline-level content of a block is aligned along the inline axis if the content does not completely fill the line box. Values other than <a class="css" data-link-type="maybe" href="#valdef-text-align-justify-all" id="ref-for-valdef-text-align-justify-all">justify-all</a> or <a class="css" data-link-type="maybe" href="#valdef-text-align-match-parent" id="ref-for-valdef-text-align-match-parent">match-parent</a> are assigned to <span class="property" id="ref-for-propdef-text-align-all①">text-align-all</span> and reset <span class="property" id="ref-for-propdef-text-align-last①">text-align-last</span> to <a class="css" data-link-type="maybe" href="#valdef-text-align-last-auto" id="ref-for-valdef-text-align-last-auto">auto</a>.</p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-start">start</dfn> <dd> Inline-level content is aligned to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#start" id="ref-for-start">start</a> edge of the line box. <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-end">end</dfn> <dd> Inline-level content is aligned to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#end" id="ref-for-end">end</a> edge of the line box. <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-left">left</dfn> <dd> Inline-level content is aligned to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#line-left" id="ref-for-line-left">line-left</a> edge of the line box. (In vertical writing modes, this can be either the physical top or bottom, depending on <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode">writing-mode</a>.) <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a> <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-right">right</dfn> <dd> Inline-level content is aligned to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#line-right" id="ref-for-line-right">line-right</a> edge of the line box. (In vertical writing modes, this can be either the physical top or bottom, depending on <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode" id="ref-for-propdef-writing-mode①">writing-mode</a>.) <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a> <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-center">center</dfn> <dd> Inline-level content is centered within the line box. <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-justify">justify</dfn> <dd> Text is justified according to the method specified by the <a class="property css" data-link-type="property" href="#propdef-text-justify" id="ref-for-propdef-text-justify①">text-justify</a> property, in order to exactly fill the line box. Unless otherwise specified by <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last②">text-align-last</a>, the last line before a forced break or the end of the block is <a class="css" data-link-type="maybe" href="#valdef-text-align-start" id="ref-for-valdef-text-align-start">start</a>-aligned. <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-justify-all">justify-all</dfn> <dd> Sets both <a class="property css" data-link-type="property" href="#propdef-text-align-all" id="ref-for-propdef-text-align-all②">text-align-all</a> and <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last③">text-align-last</a> to <a class="css" data-link-type="maybe" href="#valdef-text-align-justify" id="ref-for-valdef-text-align-justify">justify</a>, forcing the last line to justify as well. <dt><dfn class="dfn-paneled css" data-dfn-for="text-align" data-dfn-type="value" data-export id="valdef-text-align-match-parent">match-parent</dfn> <dd> This value behaves the same as <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit" id="ref-for-valdef-all-inherit">inherit</a> (computes to its parent’s computed value) except that an <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#inherited-value" id="ref-for-inherited-value">inherited value</a> of <a class="css" data-link-type="maybe" href="#valdef-text-align-start" id="ref-for-valdef-text-align-start①">start</a> or <a class="css" data-link-type="maybe" href="#valdef-text-align-end" id="ref-for-valdef-text-align-end">end</a> is interpreted against the parent’s <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction">direction</a> value and results in a computed value of either <a class="css" data-link-type="maybe" href="#valdef-text-align-left" id="ref-for-valdef-text-align-left">left</a> or <a class="css" data-link-type="maybe" href="#valdef-text-align-right" id="ref-for-valdef-text-align-right">right</a>. Computes to <span class="css" id="ref-for-valdef-text-align-start②">start</span> when specified on the <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#root-element" id="ref-for-root-element">root element</a>. <p>When specified on the <a class="property css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align①">text-align</a> shorthand, sets both <a class="property css" data-link-type="property" href="#propdef-text-align-all" id="ref-for-propdef-text-align-all③">text-align-all</a> and <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last④">text-align-last</a> to <a class="css" data-link-type="maybe" href="#valdef-text-align-match-parent" id="ref-for-valdef-text-align-match-parent①">match-parent</a>.</p> </dl> <p>A block of text is a stack of <a data-link-type="dfn" href="https://www.w3.org/TR/css-inline-3/#line-box" id="ref-for-line-box">line boxes</a>. This property specifies how the inline-level boxes within each line box align with respect to the start and end sides of the line box. Alignment is not with respect to the <a href="https://www.w3.org/TR/CSS21/visuren.html#viewport">viewport</a> or containing block.</p> <p>In the case of <a class="css" data-link-type="maybe" href="#valdef-text-align-justify" id="ref-for-valdef-text-align-justify①">justify</a>, the UA may stretch or shrink any inline boxes by <a href="#text-justify-property">adjusting</a> their text. (See <a class="property css" data-link-type="property" href="#propdef-text-justify" id="ref-for-propdef-text-justify②">text-justify</a>.) If an element’s <a data-link-type="dfn" href="#white-space" id="ref-for-white-space②①">white space</a> is not <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space⑨">collapsible</a>, then the UA is not required to adjust its text for the purpose of justification and may instead treat the text as having no <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity">justification opportunities</a>. If the UA chooses to adjust the text, then it must ensure that <a data-link-type="dfn" href="#tab-stop" id="ref-for-tab-stop②">tab stops</a> continue to line up as required by the <a href="#white-space-rules">white space processing rules</a>.</p> <p>If (after justification, if any) the inline contents of a line box are too long to fit within it, then the contents are <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#start" id="ref-for-start①">start</a>-aligned: any content that doesn’t fit overflows the line box’s <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#end" id="ref-for-end①">end</a> edge.</p> <p>See <a href="#bidi-linebox">§ 8.3 Bidirectionality and Line Boxes</a> for details on how to determine the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#start" id="ref-for-start②">start</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#end" id="ref-for-end②">end</a> edges of a line box.</p> <h3 class="heading settled" data-level="6.2" id="text-align-all-property"><span class="secno">6.2. </span><span class="content"> Default Text Alignment: the <a class="property css" data-link-type="property" href="#propdef-text-align-all" id="ref-for-propdef-text-align-all④">text-align-all</a> property</span><span id="text-align-all"></span><a class="self-link" href="#text-align-all-property"></a></h3> <table class="def propdef" data-link-for-hint="text-align-all"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-align-all">text-align-all</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">start <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one②⑦">|</a> end <span id="ref-for-comb-one②⑧">|</span> left <span id="ref-for-comb-one②⑨">|</span> right <span id="ref-for-comb-one③⓪">|</span> center <span id="ref-for-comb-one③①">|</span> justify <span id="ref-for-comb-one③②">|</span> match-parent <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>start <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>block containers <tr> <th><a href="https://www.w3.org/TR/css-cascade/#inherited-property">Inherited:</a> <td>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>keyword as specified, except for <a class="css" data-link-type="maybe" href="#valdef-text-align-match-parent" id="ref-for-valdef-text-align-match-parent②">match-parent</a> which computes as defined above <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This longhand of the <a class="property css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align②">text-align</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#shorthand-property" id="ref-for-shorthand-property①">shorthand property</a> specifies the inline alignment of all lines of inline content in the block container, except for last lines overridden by a non-<a class="css" data-link-type="maybe" href="#valdef-text-align-last-auto" id="ref-for-valdef-text-align-last-auto①">auto</a> value of <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last⑤">text-align-last</a>. See <span class="property" id="ref-for-propdef-text-align③">text-align</span> for a full description of values.</p> <p class="advisement"> Authors should use the <a class="property css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align④">text-align</a> shorthand instead of this property. </p> <h3 class="heading settled" data-level="6.3" id="text-align-last-property"><span class="secno">6.3. </span><span class="content"> Last Line Alignment: the <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last⑥">text-align-last</a> property</span><span id="text-align-last"></span><a class="self-link" href="#text-align-last-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="text-align-last"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-align-last">text-align-last</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one③③">|</a> start <span id="ref-for-comb-one③④">|</span> end <span id="ref-for-comb-one③⑤">|</span> left <span id="ref-for-comb-one③⑥">|</span> right <span id="ref-for-comb-one③⑦">|</span> center <span id="ref-for-comb-one③⑧">|</span> justify <span id="ref-for-comb-one③⑨">|</span> match-parent <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>block containers <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>keyword as specified, except for <a class="css" data-link-type="maybe" href="#valdef-text-align-match-parent" id="ref-for-valdef-text-align-match-parent③">match-parent</a> which computes as defined above <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property describes how the last line of a block or a line right before a <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break⑥">forced line break</a> is aligned.</p> <p>If <dfn class="dfn-paneled css" data-dfn-for="text-align-last" data-dfn-type="value" data-export id="valdef-text-align-last-auto">auto</dfn> is specified, content on the affected line is aligned per <a class="property css" data-link-type="property" href="#propdef-text-align-all" id="ref-for-propdef-text-align-all⑤">text-align-all</a> unless <span class="property" id="ref-for-propdef-text-align-all⑥">text-align-all</span> is set to <a class="css" data-link-type="maybe" href="#valdef-text-align-justify" id="ref-for-valdef-text-align-justify②">justify</a>, in which case it is <a class="css" data-link-type="maybe" href="#valdef-text-align-start" id="ref-for-valdef-text-align-start③">start</a>-aligned. All other values are interpreted as described for <a class="property css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align⑤">text-align</a>.</p> <h3 class="heading settled" data-level="6.4" id="text-justify-property"><span class="secno">6.4. </span><span class="content"> Justification Method: the <a class="property css" data-link-type="property" href="#propdef-text-justify" id="ref-for-propdef-text-justify③">text-justify</a> property</span><span id="text-justify"></span><a class="self-link" href="#text-justify-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="text-justify"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-justify">text-justify</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">auto <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one④⓪">|</a> none <span id="ref-for-comb-one④①">|</span> inter-word <span id="ref-for-comb-one④②">|</span> inter-character <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>auto <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword (except for the <a class="css" data-link-type="maybe" href="#valdef-text-justify-distribute" id="ref-for-valdef-text-justify-distribute">distribute</a> legacy value) <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property selects the justification method used when a line’s alignment is set to <a class="css" data-link-type="maybe" href="#valdef-text-align-justify" id="ref-for-valdef-text-align-justify③">justify</a> (see <a class="property css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align⑥">text-align</a>). The property applies to text, but is inherited from block containers to the root inline box containing their inline-level contents. It takes the following values:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="text-justify" data-dfn-type="value" data-export id="valdef-text-justify-auto">auto</dfn> <dd> The UA determines the justification algorithm to follow, based on a balance between performance and adequate presentation quality. Since justification rules vary by <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system③">writing system</a> and <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①①">language</a>, UAs should, where possible, use a justification algorithm appropriate to the text. <div class="example" id="example-0bd57ccb"><a class="self-link" href="#example-0bd57ccb"></a> For example, the UA could use by default a justification method that is a simple universal compromise for all writing systems—such as primarily expanding <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator⑤">word separators</a> and between CJK <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit⑦">typographic letter units</a> along with secondarily expanding between Southeast Asian <span id="ref-for-typographic-letter-unit⑧">typographic letter units</span>. Then, in cases where the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①②">content language</a> of the paragraph is known, it could choose a more language-tailored justification behavior e.g. following the <a href="https://www.w3.org/TR/jlreq/"><cite>Requirements for Japanese Text Layout</cite></a> for Japanese <a data-link-type="biblio" href="#biblio-jlreq" title="Requirements for Japanese Text Layout 日本語組版処理の要件(日本語版)">[JLREQ]</a>, using cursive elongation for Arabic, using <a class="css" data-link-type="maybe" href="#valdef-text-justify-inter-word" id="ref-for-valdef-text-justify-inter-word">inter-word</a> for German, etc. </div> <figure id="fig-text-justify-cursive"> <p><img alt="Two lines of calligraphic Arabic end together due to a mix of compressed and swash forms." height="182" src="images/text-justify-cursive.png" title="Swash forms elongate the first line while a compressed contextual ligature shortens the second, allowing both to end precisely together." width="392"></p> <figcaption> An example of cursively-justified Arabic text, rendered by <a href="https://www.decotype.com/">Tasmeem</a>. Like English, Arabic can be justified by adjusting the spacing between words, but in most styles it can also be justified by calligraphically elongating or compressing the letterforms themselves. In this example, the upper text is extended to fill the line by the use of elongated (kashida) forms and swash forms, while the bottom line is compressed slightly by using a stacked combination for the characters between ت and م. By employing traditional calligraphic techniques, a typesetter can justify the line while preserving flow and color, providing a very high quality justification effect. However, this is by its nature a very script-specific effect. </figcaption> </figure> <figure id="fig-text-justify-compromise"> <img alt="Extra space is partly to spaces and partly among CJK and Thai letters." height="37" src="images/text-justify-compromise.png" width="573"> <figcaption> Mixed-script text with <a class="css" data-link-type="propdesc" href="#propdef-text-justify" id="ref-for-propdef-text-justify④">text-justify: auto</a>: this interpretation uses a universal-compromise justification method, expanding at spaces as well as between CJK and Southeast Asian letters. This effectively uses inter-word + inter-ideograph spacing for lines that have word-separators and/or CJK characters and falls back to inter-cluster behavior for lines that don’t or for which the space stretches too far. </figcaption> </figure> <dt><dfn class="dfn-paneled css" data-dfn-for="text-justify" data-dfn-type="value" data-export id="valdef-text-justify-none">none</dfn> <dd> Justification is disabled: there are no <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①">justification opportunities</a> within the text. <figure id="fig-text-justify-none"> <img alt="No extra space is inserted." height="37" src="images/text-justify-none.png" width="573"> <figcaption> Mixed-script text with <a class="css" data-link-type="propdesc" href="#propdef-text-justify" id="ref-for-propdef-text-justify⑤">text-justify: none</a> </figcaption> </figure> <p class="note" role="note"><span class="marker">Note:</span> This value is intended for use in user stylesheets to improve readability or for accessibility purposes.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="text-justify" data-dfn-type="value" data-export id="valdef-text-justify-inter-word">inter-word</dfn> <dd> Justification adjusts spacing at <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator⑥">word separators</a> only (effectively varying the used <a class="property css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing①">word-spacing</a> on the line). This behavior is typical for languages that separate words using spaces, like English or Korean. <figure id="fig-text-justify-interword"> <img alt="Extra space is equally distributed mainly to spaces." height="37" src="images/text-justify-interword.png" width="573"> <figcaption> Mixed-script text with <a class="css" data-link-type="propdesc" href="#propdef-text-justify" id="ref-for-propdef-text-justify⑥">text-justify: inter-word</a> </figcaption> </figure> <dt><dfn class="dfn-paneled css" data-dfn-for="text-justify" data-dfn-type="value" data-export id="valdef-text-justify-inter-character">inter-character</dfn> <dd> Justification adjusts spacing between each pair of adjacent <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①⑦">typographic character units</a> (effectively varying the used <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①">letter-spacing</a> on the line). This value is sometimes used in East Asian systems such as Japanese. <figure id="fig-text-justify-distribute"> <img alt="Extra space is equally distributed at points between spaces and letters of all writing systems." height="37" src="images/text-justify-distribute.png" width="573"> <figcaption> Mixed-script text with <a class="css" data-link-type="propdesc" href="#propdef-text-justify" id="ref-for-propdef-text-justify⑦">text-justify: inter-character</a> </figcaption> </figure> <p>For legacy reasons, UAs must also support the alternate keyword <dfn class="dfn-paneled css" data-dfn-for="text-justify" data-dfn-type="value" data-export id="valdef-text-justify-distribute">distribute</dfn> which must compute to <a class="css" data-link-type="maybe" href="#valdef-text-justify-inter-character" id="ref-for-valdef-text-justify-inter-character">inter-character</a>, thus having the exact same meaning and behavior. UAs may treat this as a <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#css-legacy-value-alias" id="ref-for-css-legacy-value-alias">legacy value alias</a>.</p> </dl> <p class="advisement"> Since optimal justification is <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①③">language</a>-sensitive, authors should correctly language-tag their content for the best results. </p> <p class="note" role="note"><span class="marker">Note:</span> The guidelines in this level of CSS do not describe a complete justification algorithm. They are merely a minimum set of requirements that a complete algorithm should meet. Limiting the set of requirements gives UAs some latitude in choosing a justification algorithm that meets their needs and desired balance of quality, speed, and complexity.</p> <h4 class="heading settled" data-level="6.4.1" id="expanding-text"><span class="secno">6.4.1. </span><span class="content"> Expanding and Compressing Text</span><a class="self-link" href="#expanding-text"></a></h4> <p></p> <p>When justifying text, the user agent takes the remaining space between the ends of a line’s contents and the edges of its line box, and distributes that space throughout its content so that the contents exactly fill the line box. The user agent may alternatively distribute negative space, putting more content on the line than would otherwise fit under normal spacing conditions.</p> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="justification-opportunity">justification opportunity<span id="expansion-opportunity"></span></dfn> is a point where the justification algorithm may alter spacing within the text. A justification opportunity can be provided by a single <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit①⑧">typographic character unit</a> (such as a <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator⑦">word separator</a>), or by the juxtaposition of two <span id="ref-for-typographic-character-unit①⑨">typographic character units</span>. As with controls for <a href="#line-break-details">soft wrap opportunities</a>, whether a <span id="ref-for-typographic-character-unit②⓪">typographic character unit</span> provides a <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity②">justification opportunity</a> is controlled by the <a class="property css" data-link-type="property" href="#propdef-text-justify" id="ref-for-propdef-text-justify⑧">text-justify</a> value of its parent; similarly, whether a <span id="ref-for-justification-opportunity③">justification opportunity</span> exists between two consecutive <span id="ref-for-typographic-character-unit②①">typographic character units</span> is determined by the <span class="property" id="ref-for-propdef-text-justify⑨">text-justify</span> value of their nearest common ancestor.</p> <p>Space distributed by justification is <em>in addition to</em> the spacing defined by the <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing②">letter-spacing</a> or <a class="property css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing②">word-spacing</a> properties. When such additional space is distributed to a <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator⑧">word separator</a> <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity④">justification opportunity</a>, it is applied under the same rules as for <span class="property" id="ref-for-propdef-word-spacing③">word-spacing</span>. Similarly, when space is distributed to a <span id="ref-for-justification-opportunity⑤">justification opportunity</span> between two <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit②②">typographic character units</a>, should be applied under the same rules as for <span class="property" id="ref-for-propdef-letter-spacing③">letter-spacing</span>.</p> <p>A justification algorithm may divide <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity⑥">justification opportunities</a> into different priority levels. All <span id="ref-for-justification-opportunity⑦">justification opportunities</span> within a given level are expanded or compressed at the same priority, regardless of which <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit②③">typographic character units</a> created that opportunity. For example, if <span id="ref-for-justification-opportunity⑧">justification opportunities</span> between two Han characters and between two Latin letters are defined to be at the same level (as they are in the <a class="css" data-link-type="maybe" href="#valdef-text-justify-inter-character" id="ref-for-valdef-text-justify-inter-character①">inter-character</a> justification style), they are not treated differently because they originate from different <span id="ref-for-typographic-character-unit②④">typographic character units</span>. It is not defined in this level whether or how other factors (such as font size, letter-spacing, glyph shape, position within the line, etc.) may influence the distribution of space to <span id="ref-for-justification-opportunity⑨">justification opportunities</span> within the line.</p> <p>The UA may enable or break optional ligatures or use other font features such as alternate glyphs or glyph compression to help justify the text under any method. This behavior is not controlled by this level of CSS. However, UAs <em>must not</em> break required ligatures or otherwise disable features required to correctly shape complex scripts.</p> <p>If a <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①⓪">justification opportunity</a> exists within a line, and <a href="#text-align-property">text alignment</a> specifies full justification (<a class="css" data-link-type="maybe" href="#valdef-text-align-justify" id="ref-for-valdef-text-align-justify④">justify</a>) for that line, it must be justified.</p> <h4 class="heading settled" data-level="6.4.2" id="justify-symbols"><span class="secno">6.4.2. </span><span class="content"> Handling Symbols and Punctuation</span><a class="self-link" href="#justify-symbols"></a></h4> <p>When determining <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①①">justification opportunities</a>, a <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit②⑤">typographic character unit</a> from the Unicode Symbols (S*) and Punctuation (P*) classes is generally treated the same as a <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit⑨">typographic letter unit</a> of the same script (or, if the character’s script property is Common, then as a <span id="ref-for-typographic-letter-unit①⓪">typographic letter unit</span> of the dominant script).</p> <p>However, by typographic tradition there may be additional rules controlling the justification of symbols and punctuation. Therefore, the UA may reassign specific characters or introduce additional levels of prioritization to handle <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①②">justification opportunities</a> involving symbols and punctuation.</p> <div class="example" id="example-3ce55d62"><a class="self-link" href="#example-3ce55d62"></a> For example, there are traditionally no <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①③">justification opportunities</a> between consecutive U+2014 — EM DASH, U+2015 ― HORIZONTAL BAR, U+2026 … HORIZONTAL ELLIPSIS, or U+2025 ‥ TWO DOT LEADER characters <a data-link-type="biblio" href="#biblio-jlreq" title="Requirements for Japanese Text Layout 日本語組版処理の要件(日本語版)">[JLREQ]</a>; thus a UA might assign these characters to a “never” prioritization level. As another example, certain full-width punctuation characters (such as U+301A 〚 LEFT WHITE SQUARE BRACKET) are considered to contain a <span id="ref-for-justification-opportunity①④">justification opportunity</span> in Japanese. The UA might therefore assign these characters to a higher prioritization level than the opportunities between ideographic characters. </div> <h4 class="heading settled" data-level="6.4.3" id="justify-limits"><span class="secno">6.4.3. </span><span class="content"> Unexpandable Text</span><a class="self-link" href="#justify-limits"></a></h4> <p></p> <p>If the inline contents of a line cannot be stretched to the full width of the line box, then they must be aligned as specified by the <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last⑦">text-align-last</a> property. (If <span class="property" id="ref-for-propdef-text-align-last⑧">text-align-last</span> is <a class="css" data-link-type="maybe" href="#valdef-text-align-justify" id="ref-for-valdef-text-align-justify⑤">justify</a>, then they must be aligned as for <a class="css" data-link-type="maybe" href="#valdef-text-align-center" id="ref-for-valdef-text-align-center">center</a>.)</p> <h4 class="heading settled" data-level="6.4.4" id="justify-cursive"><span class="secno">6.4.4. </span><span class="content"> Cursive Scripts</span><a class="self-link" href="#justify-cursive"></a></h4> <p>Justification <em>must not</em> introduce gaps between the joined <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit①①">typographic letter units</a> of <a data-link-type="dfn" href="#cursive-script" id="ref-for-cursive-script">cursive scripts</a> such as Arabic. If it is able, the UA <em>may</em> translate space distributed to <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①⑤">justification opportunities</a> within a run of such <span id="ref-for-typographic-letter-unit①②">typographic letter units</span> into some form of cursive elongation for that run. It otherwise <em>must</em> assume that no <span id="ref-for-justification-opportunity①⑥">justification opportunity</span> exists between any pair of <span id="ref-for-typographic-letter-unit①③">typographic letter units</span> in <span id="ref-for-cursive-script①">cursive script</span> (regardless of whether they join).</p> <div class="example" id="example-5407996d"> <a class="self-link" href="#example-5407996d"></a> The following are examples of unacceptable justification: <figure> <img alt height="40" src="images/arabic-stretch-spaced.png" width="358"> <figcaption> Adding gaps between every pair of Arabic letters </figcaption> </figure> <figure> <img alt height="40" src="images/arabic-stretch-unjoined.png" width="358"> <figcaption> Adding gaps between every pair of unjoined Arabic letters </figcaption> </figure> </div> <p>Some font designs allow for the use of the tatweel character for justification. A UA that performs tatweel-based justification must properly handle the rules for its use. Note that correct insertion of tatweel characters depends on context, including the letter-combinations involved, location within the word, and location of the word within the line.</p> <h4 class="heading settled" data-level="6.4.5" id="justify-algos"><span class="secno">6.4.5. </span><span class="content"> Minimum Requirements for <a class="css" data-link-type="maybe" href="#valdef-text-justify-auto" id="ref-for-valdef-text-justify-auto">auto</a> Justification</span><a class="self-link" href="#justify-algos"></a></h4> <p>For <a class="css" data-link-type="maybe" href="#valdef-text-justify-auto" id="ref-for-valdef-text-justify-auto①">auto</a> justification, this specification does not define what all of the <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①⑦">justification opportunities</a> are, how they are prioritized, or when and how multiple levels of <span id="ref-for-justification-opportunity①⑧">justification opportunities</span> interact. However, it does require that:</p> <ul> <li> Unless contraindicated by the typographic traditions of the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①④">content language</a> or adjacent symbols/punctuation, each of the following provides a <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity①⑨">justification opportunity</a>: <ul> <li> <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator⑨">Word separators</a> <li> The boundary between a <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit②⑥">typographic character unit</a> of any <a data-link-type="dfn" href="#block-scripts" id="ref-for-block-scripts">block scripts</a> and any other <span id="ref-for-typographic-character-unit②⑦">typographic character unit</span> <li> The boundary between a <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit②⑧">typographic character unit</a> of any <a data-link-type="dfn" href="#clustered-scripts" id="ref-for-clustered-scripts">clustered scripts</a> and any other <span id="ref-for-typographic-character-unit②⑨">typographic character unit</span> </ul> <li> All <a data-link-type="dfn" href="#letter" id="ref-for-letter③">letters</a> belonging to all <a data-link-type="dfn" href="#block-scripts" id="ref-for-block-scripts①">block scripts</a> are treated the same, and all <span id="ref-for-letter④">letters</span> belonging to all <a data-link-type="dfn" href="#clustered-scripts" id="ref-for-clustered-scripts①">clustered scripts</a> are treated the same. For example, no distinction is made between the justification opportunity between a Han letter followed by another Han letter, vs. the justification opportunity between a Han letter followed by a Hangul letter. </ul> <p>Further information on text justification can be found in (or submitted to) <a href="https://www.w3.org/International/articles/typography/justification">“Approaches to Full Justification”</a>, which indexes by writing system and language, and is maintained by the <a href="https://www.w3.org/International/">W3C Internationalization Working Group</a>. <a data-link-type="biblio" href="#biblio-justify" title="Approches to Full Justification">[JUSTIFY]</a></p> <h2 class="heading settled" data-level="7" id="spacing"><span class="secno">7. </span><span class="content"> Spacing</span><a class="self-link" href="#spacing"></a></h2> <p>CSS offers control over text spacing via the <a class="property css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing④">word-spacing</a> and <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing④">letter-spacing</a> properties, which specify additional space around <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator①⓪">word separators</a> or between <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit③⓪">typographic character units</a>, respectively.</p> <h3 class="heading settled" data-level="7.1" id="word-spacing-property"><span class="secno">7.1. </span><span class="content"> Word Spacing: the <a class="property css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing⑤">word-spacing</a> property</span><span id="word-spacing"></span><a class="self-link" href="#word-spacing-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="word-spacing"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-word-spacing">word-spacing</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <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="https://www.w3.org/TR/css-values-4/#length-value" id="ref-for-length-value①"><length></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>an absolute length <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <p>This property specifies additional spacing between “words”. Values are interpreted as defined below:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="word-spacing" data-dfn-type="value" data-export id="valdef-word-spacing-normal">normal</dfn> <dd> No additional spacing is applied. Computes to zero. <dt><dfn class="dfn-paneled css" data-dfn-for="word-spacing" data-dfn-type="value" data-export id="valdef-word-spacing-length"><length></dfn> <dd> Specifies extra spacing <em>in addition to</em> the intrinsic inter-word spacing defined by the font. </dl> <p>Additional spacing is applied to each <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator①①">word separator</a> left in the text after the <a href="#white-space-rules">white space processing rules</a> have been applied, and should be applied half on each side of the character unless otherwise dictated by typographic tradition. Values may be negative, but there may be implementation-dependent limits.</p> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="word-separator character | word separator" data-noexport id="word-separator">Word-separator characters</dfn> are <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit③①">typographic character units</a> whose primary purpose and general usage is to separate words. In Unicode this includes (but is not exhaustively defined as) the space (U+0020), the no-break space (U+00A0), the Ethiopic word space (U+1361), the Aegean word separators (U+10100,U+10101), the Ugaritic word divider (U+1039F), and the Phoenician word separator (U+1091F). <a data-link-type="biblio" href="#biblio-unicode" title="The Unicode Standard">[UNICODE]</a></p> <p class="note" role="note"><span class="marker">Note:</span> Neither punctuation in general, nor fixed-width spaces (such as U+3000 and U+2000 through U+200A), are considered <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator①②">word-separator characters</a>, because even though they frequently happen to separate words, their primary purpose is not to separate words.</p> <p>If there are no <a data-link-type="dfn" href="#word-separator" id="ref-for-word-separator①③">word-separator characters</a>, or if a word-separating character has a zero advance width (such as U+200B ZERO WIDTH SPACE) then the user agent must not create an additional spacing between words.</p> <h3 class="heading settled" data-level="7.2" id="letter-spacing-property"><span class="secno">7.2. </span><span class="content"> Tracking: the <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing⑤">letter-spacing</a> property</span><span id="letter-spacing"></span><a class="self-link" href="#letter-spacing-property"></a></h3> <p></p> <table class="def propdef" data-link-for-hint="letter-spacing"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-letter-spacing">letter-spacing</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">normal <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="https://www.w3.org/TR/css-values-4/#length-value" id="ref-for-length-value②"><length></a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>normal <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-display-3/#inline-box" id="ref-for-inline-box①">inline boxes</a> and text <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>an absolute length <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td>n/a <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <p>This property specifies additional spacing (commonly called <dfn class="dfn-paneled" data-dfn-type="dfn" data-export id="tracking">tracking</dfn>) between adjacent <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit③②">typographic character units</a>. Letter-spacing is applied after <a href="https://www.w3.org/TR/css-writing-modes-4/#text-direction">bidi reordering</a> and is in addition to <a href="https://www.w3.org/TR/css-fonts-3/#font-kerning-prop">kerning</a> and <a class="property css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing⑥">word-spacing</a>. <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a> <a data-link-type="biblio" href="#biblio-css-fonts-3" title="CSS Fonts Module Level 3">[CSS-FONTS-3]</a> Depending on the justification rules in effect, user agents may further increase or decrease the space between <span id="ref-for-typographic-character-unit③③">typographic character units</span> in order to <a href="#text-justify-property">justify text</a>.</p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="letter-spacing" data-dfn-type="value" data-export id="valdef-letter-spacing-normal">normal</dfn> <dd> No additional spacing is applied. Computes to zero. <dt><dfn class="dfn-paneled css" data-dfn-for="letter-spacing" data-dfn-type="value" data-export id="valdef-letter-spacing-length"><length></dfn> <dd> Specifies <em>additional</em> spacing between <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit③④">typographic character units</a>. Values may be negative, but there may be implementation-dependent limits. </dl> <p>For <a href="https://github.com/w3c/csswg-drafts/issues/1484">legacy reasons</a>, a computed <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing⑥">letter-spacing</a> of zero yields a <a data-link-type="dfn" href="https://www.w3.org/TR/cssom-1/#resolved-value" id="ref-for-resolved-value">resolved value</a> (<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> return value) of <a class="css" data-link-type="maybe" href="#valdef-letter-spacing-normal" id="ref-for-valdef-letter-spacing-normal">normal</a>.</p> <p>For the purpose of <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing⑦">letter-spacing</a>, each consecutive run of <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#atomic-inline" id="ref-for-atomic-inline③">atomic inlines</a> (such as images and inline blocks) is treated as a single <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit③⑤">typographic character unit</a>.</p> <p>Letter-spacing must not be applied at the beginning of a line. Whether letter-spacing is applied at the end of a line is undefined in this level.</p> <div class="example" id="example-7880704e"> <a class="self-link" href="#example-7880704e"></a> When letter-spacing is not applied at the beginning or end of a line, text always fits flush with the edge of the block. <pre class="highlight">p <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>1</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-> </pre> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c->abc<c- p></</c-><c- f>p</c-><c- p>></c-> </pre> <p class="ls-ex good ls-fixed-width color-box" style="text-align: left">a b c</p> <p class="ls-ex good ls-fixed-width color-box" style="text-align: right">a b c</p> <p>UAs therefore <em>really should not</em> <a data-link-type="biblio" href="#biblio-rfc6919" title="Further Key Words for Use in RFCs to Indicate Requirement Levels">[RFC6919]</a> append letter spacing to the right or trailing edge of a line:</p> <p class="ls-ex bad ls-fixed-width color-box" style="text-align: right">a b c </p> </div> <p>Letter spacing between two <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit③⑥">typographic character units</a> effectively “belongs” to the innermost element that contains the two <span id="ref-for-typographic-character-unit③⑦">typographic character units</span>: the total letter spacing between two adjacent <span id="ref-for-typographic-character-unit③⑧">typographic character units</span> (after bidi reordering) is specified by and rendered within the innermost element that <em>contains</em> the boundary between the two <span id="ref-for-typographic-character-unit③⑨">typographic character units</span>. However, the UA may instead attach letter-spacing at element boundaries to one or the other <span id="ref-for-typographic-character-unit④⓪">typographic character unit</span> using the letter-spacing value pertaining to its containing element.</p> <p class="note" role="note"><span class="marker">Note:</span> This secondary behavior is permitted in this level due to Web-compat concerns.</p> <div class="example" id="example-58b27a9a"> <a class="self-link" href="#example-58b27a9a"></a> An inline box is expected to only include letter spacing between characters completely contained within that element, thus excluding letter spacing on the right or trailing edge of the element: <pre class="highlight">p <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>1</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-></pre> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c->a<c- p><</c-><c- f>span</c-><c- p>></c->bb<c- p></</c-><c- f>span</c-><c- p>></c->c<c- p></</c-><c- f>p</c-><c- p>></c-></pre> <p class="ls-ex good">a <span class="color-box">b b</span> c</p> <p class="ls-ex bad">a <span class="color-box">b b </span>c</p> <p>Consequently a given value of <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing⑧">letter-spacing</a> is expected to only affect the spacing between characters completely contained within the element for which it is specified:</p> <pre class="highlight">p <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>1</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-> span <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>2</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-> </pre> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c->a<c- p><</c-><c- f>span</c-><c- p>></c->bb<c- p></</c-><c- f>span</c-><c- p>></c->c<c- p></</c-><c- f>p</c-><c- p>></c-></pre> <p class="ls-ex">a <span class="color-box">b b</span> c</p> <p>This further implies that applying <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing⑨">letter-spacing</a> to an element containing only a single character has no effect on the rendered result: </p> <pre class="highlight">p <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>1</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-> span <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>2</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-> </pre> <pre class="highlight"><c- p><</c-><c- f>p</c-><c- p>></c->a<c- p><</c-><c- f>span</c-><c- p>></c->b<c- p></</c-><c- f>span</c-><c- p>></c->c<c- p></</c-><c- f>p</c-><c- p>></c-></pre> <p class="ls-ex">a <span class="color-box">b</span> c</p> <p>Since letter spacing is inserted <strong>after</strong> RTL reordering, the letter spacing applied to the inner span below likewise has no effect, since after reordering the "c" doesn’t end up next to "א":</p> <pre class="highlight">p <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>1</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-> span <c- p>{</c-> <c- k>letter-spacing</c-><c- p>:</c-> <c- m>2</c-><c- k>em</c-><c- p>;</c-> <c- p>}</c-> </pre> <pre class="highlight"><c- d><!-- abc followed by Hebrew letters alef (א), bet (ב) and gimel (ג) --></c-> <c- d><!-- Reordering will display these in reverse order. --></c-> <bdo dir="ltr"><c- p><</c-><c- f>p</c-><c- p>></c->ab<c- p><</c-><c- f>span</c-><c- p>></c->cא<c- p></</c-><c- f>span</c-><c- p>></c->בג<c- p></</c-><c- f>p</c-><c- p>></c-></bdo> </pre> <p class="ls-ex">a b <span class="color-box">c</span> <span class="color-box">א</span> ב ג</p> </div> <p>Letter spacing ignores invisible zero-width formatting characters (such as those from the Unicode Cf category). Spacing must be added as if those characters did not exist in the document.</p> <div class="example" id="example-35549407"><a class="self-link" href="#example-35549407"></a> For example, <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①⓪">letter-spacing</a> applied to <code class="highlight">A<c- ni>&#x200B;</c->B</code> is identical to <code class="highlight">AB</code>, regardless of where any element boundaries might fall. </div> <p>When the effective spacing between two characters is not zero (due to either <a href="#text-justify-property">justification</a> or a non-zero value of <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①①">letter-spacing</a>), user agents should not apply optional ligatures, i.e. those that are not defined as required for fundamentally correct glyph shaping. However, ligatures and other font features specified via the low-level <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-fonts-4/#propdef-font-feature-settings" id="ref-for-propdef-font-feature-settings">font-feature-settings</a> property take precedence over this rule. See <a href="https://www.w3.org/TR/css-fonts-3/#feature-precedence">CSS Fonts Module Level 3 § feature-precedence</a>.</p> <div class="example" id="example-d2a0b994"> <a class="self-link" href="#example-d2a0b994"></a> For example, if the word “filial” is letter-spaced, an “fi” ligature should not be used as it will prevent even spacing of the text. <figure> <strong style="letter-spacing: 0.5em">filial</strong> vs <strong style="letter-spacing: 0.5em">filial</strong> </figure> </div> <p class="note" role="note"><span class="marker">Note:</span> In OpenType, required ligatures are expected to be associated to the <code>rlig</code> feature. All other ligatures are therefore considered optional. In some cases, however, UA or platform heuristics apply additional ligatures in order to handle broken fonts; this specification does not define or override such exceptional handling.</p> <h4 class="heading settled" data-level="7.2.1" id="cursive-tracking"><span class="secno">7.2.1. </span><span class="content"> Cursive Scripts</span><a class="self-link" href="#cursive-tracking"></a></h4> <p>If it is able, the UA <em>may</em> apply letter spacing to <a data-link-type="dfn" href="#cursive-script" id="ref-for-cursive-script②">cursive scripts</a> by translating the total extra space to be distributed to a run of such letters into some form of cursive elongation (or compression, for negative tracking values) for that run that results in an equivalent total expansion (or compression) of the run. Otherwise, if the UA cannot expand text from a <span id="ref-for-cursive-script③">cursive script</span> without breaking its cursive connections, it <em>must not</em> apply spacing between any pair of that script’s <a data-link-type="dfn" href="#typographic-letter-unit" id="ref-for-typographic-letter-unit①④">typographic letter units</a> at all (effectively treating each word as a single <span id="ref-for-typographic-letter-unit①⑤">typographic letter unit</span> for the purpose of letter-spacing). Both cases will result in an effective spacing of zero between such letters; however the former will preserve the sense of stretching out the text.</p> <div class="example" id="example-9902d8b5"> <a class="self-link" href="#example-9902d8b5"></a> Below are some appropriate and inappropriate examples of spacing out Arabic text. <table class="data"> <thead> <tr> <td><img alt height="41" src="images/arabic-stretch-original.png" width="358"> <td>— <td>Original text <tbody> <tr> <td><img alt height="40" src="images/arabic-stretch-spaced.png" width="358"> <td class="no">BAD <th> Even distribution of space between each letter. <em>Notice this breaks cursive joins!</em> <tr> <td><img alt height="40" src="images/arabic-stretch-kashida.png" width="358"> <td class="ok">OK <th> Distributing ∑<var>letter-spacing</var> by typographically-appropriate cursive elongation. <em>The resulting text is as long as the previous evenly-spaced example.</em> <tr> <td><img alt height="40" src="images/arabic-stretch-suppressed.png" width="358"> <td class="ok">OK <th> Suppressing <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①②">letter-spacing</a> between Arabic letters. <em>Notice <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①③">letter-spacing</a> is nonetheless applied to non-Arabic characters (like <a data-link-type="dfn" href="#spaces" id="ref-for-spaces③②">spaces</a>).</em> <tr> <td><img alt height="40" src="images/arabic-stretch-unjoined.png" width="358"> <td class="no">BAD <th> Applying <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①④">letter-spacing</a> only between non-joined letters. <em>This distorts typographic color and obfuscates word boundaries.</em> </table> </div> <p class="note" role="note"><span class="marker">Note:</span> Proper cursive elongation or compression of a text can vary depending on the script, typeface, language, location within a word, location within a line, implementation complexity, font capabilities, and calligraphic preferences, and may not be possible in certain cases at all. It may involve the use of shortening ligatures, swash variants, contextual forms, elongation glyphs such as U+0640 ـ ARABIC TATWEEL, or other microtypography. It is outside the scope of CSS to define rules for these effects. Authors should avoid applying <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①⑤">letter-spacing</a> to cursive scripts unless they are prepared to accept non-interoperable results.</p> <h3 class="heading settled" data-level="7.3" id="boundary-shaping"><span class="secno">7.3. </span><span class="content"> Shaping Across Element Boundaries</span><a class="self-link" href="#boundary-shaping"></a></h3> <p>Text shaping <em>must</em> be broken at inline box boundaries when any of the following are true for any box whose boundary separates the two <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit④①">typographic character units</a>:</p> <ul> <li> Any of <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-box-4/#propdef-margin" id="ref-for-propdef-margin">margin</a>/<a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-backgrounds-3/#propdef-border" id="ref-for-propdef-border">border</a>/<a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-box-4/#propdef-padding" id="ref-for-propdef-padding">padding</a> separating the two <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit④②">typographic character units</a> in the inline axis is non-zero. <li> <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-inline-3/#propdef-vertical-align" id="ref-for-propdef-vertical-align">vertical-align</a> is not <a class="css" data-link-type="maybe" href="https://www.w3.org/TR/css-inline-3/#valdef-alignment-baseline-baseline" id="ref-for-valdef-alignment-baseline-baseline">baseline</a>. <li> The boundary is a <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#bidi-isolate" id="ref-for-bidi-isolate">bidi isolation boundary</a>. </ul> <p>Text shaping <em>must not</em> be broken across inline box boundaries when there is no effective change in formatting, or if the only formatting changes do not affect the glyphs (as in applying <a href="https://www.w3.org/TR/css-text-decor-3/">text decoration</a>).</p> <p>Text shaping <em>should not</em> be broken across inline box boundaries otherwise, if it is reasonable and possible for that case given the limitations of the font technology.</p> <div class="example" id="example-d57c8f22"> <a class="self-link" href="#example-d57c8f22"></a> An example of reasonable and possible shaping across boundaries is Arabic shaping: in many systems this is performed by the font engine, allowing the font to provide variant glyphs with potentially very sophisticated contextual shaping. It’s not generally possible to rely on this system across a font change unless the font engine has an API to provide context, but it is straightforward and therefore quite reasonable for an engine to work around this limitation by, for example, using the zero-width-joiner (U+200D) or zero-width-non-joiner (U+200C) as appropriate to solicit the correct choice of initial/medial/final/isolated glyph. <p>An example of possible but not reasonable shaping across boundaries is handling a font that is sensitive to 20 characters of context on either side to choose its glyphs: passing all the text before <em>and after</em> the string in question, even through multiple inline boundaries with formatting changes, is complicated. The UA <em>could</em> handle such cases, but is not required to, as they are not typical or fundamentally required by any modern writing system.</p> <p>An example of impossible shaping across boundaries is a change in font weight partway through the word “and” in a font where a ligature would replace all three letters of the word “and” with an ampersand glyph (“&”).</p> </div> <h2 class="heading settled" data-level="8" id="edge-effects"><span class="secno">8. </span><span class="content"> Edge Effects</span><a class="self-link" href="#edge-effects"></a></h2> <p>Edge effects control the indentation of lines with respect to other lines in the block (<a class="property css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent">text-indent</a>) and how content is measured at the start and end edges of a line (<a class="property css" data-link-type="property" href="#propdef-hanging-punctuation" id="ref-for-propdef-hanging-punctuation①">hanging-punctuation</a>).</p> <h3 class="heading settled" data-level="8.1" id="text-indent-property"><span class="secno">8.1. </span><span class="content"> First Line Indentation: the <a class="property css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent①">text-indent</a> property</span><span id="text-indent"></span><a class="self-link" href="#text-indent-property"></a></h3> <table class="def propdef" data-link-for-hint="text-indent"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-text-indent">text-indent</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/#typedef-length-percentage" id="ref-for-typedef-length-percentage"><length-percentage></a> ] <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-all" id="ref-for-comb-all">&&</a> hanging<a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#mult-opt" id="ref-for-mult-opt">?</a> <span id="ref-for-comb-all①">&&</span> each-line<span id="ref-for-mult-opt①">?</span> <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>block containers <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>refers to block container’s own <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-axis" id="ref-for-inline-axis">inline-axis</a> <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#inner-size" id="ref-for-inner-size">inner size</a> <tr> <th><a href="https://www.w3.org/TR/css-cascade/#computed">Computed value:</a> <td>computed <a class="production css" data-link-type="type" href="https://www.w3.org/TR/css-values-4/#typedef-length-percentage" id="ref-for-typedef-length-percentage①"><length-percentage></a> value, plus any specified keywords <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td><abbr title="follows order of property value definition">per grammar</abbr> <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>by computed value type </table> <p>This property specifies the indentation applied to lines of inline content in a block. The indent is treated as a margin applied to the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#start" id="ref-for-start③">start</a> edge of the line box.</p> <p>Unless otherwise specified by the <a class="css" data-link-type="maybe" href="#valdef-text-indent-each-line" id="ref-for-valdef-text-indent-each-line">each-line</a> and/or <a class="css" data-link-type="maybe" href="#valdef-text-indent-hanging" id="ref-for-valdef-text-indent-hanging">hanging</a> keywords, only lines that are 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 an element are affected. <a data-link-type="biblio" href="#biblio-css-pseudo-4" title="CSS Pseudo-Elements Module Level 4">[CSS-PSEUDO-4]</a> For example, the first line of an anonymous block box is only affected if it is the first child of its parent element.</p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="text-indent" data-dfn-type="value" data-export id="valdef-text-indent-length"><length></dfn> <dd> Gives the amount of the indent as an absolute length. <dt><dfn class="dfn-paneled css" data-dfn-for="text-indent" data-dfn-type="value" data-export id="valdef-text-indent-percentage"><percentage></dfn> <dd> Gives the amount of the indent as a percentage of the block container’s own <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#logical-width" id="ref-for-logical-width">logical width</a>. <p>Percentages must be treated as <span class="css">0</span> for the purpose of calculating <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-size-contribution" id="ref-for-intrinsic-size-contribution">intrinsic size contributions</a>, but are always resolved normally when performing layout.</p> <p class="note" role="note"><span class="marker">Note:</span> This can lead to the element overflowing. It is not recommended to use percentage indents and intrinsic sizing together.</p> <dt><dfn class="dfn-paneled css" data-dfn-for="text-indent" data-dfn-type="value" data-export id="valdef-text-indent-each-line">each-line</dfn> <dd> Indentation affects the first line of each block container and each line after a <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break⑦">forced line break</a> (but not lines after a <a data-link-type="dfn" href="#soft-wrap-break" id="ref-for-soft-wrap-break">soft wrap break</a>). <dt><dfn class="dfn-paneled css" data-dfn-for="text-indent" data-dfn-type="value" data-export id="valdef-text-indent-hanging">hanging</dfn> <dd> Inverts which lines are affected. </dl> <div class="example" id="example-7dde3c71"> <a class="self-link" href="#example-7dde3c71"></a> <p>If <a class="property css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align⑦">text-align</a> is <a class="css" data-link-type="maybe" href="#valdef-text-align-start" id="ref-for-valdef-text-align-start④">start</a> and <a class="property css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent②">text-indent</a> is <span class="css">5em</span> in left-to-right text with no floats present, then first line of text will start 5em into the block:</p> <pre class="output"> Since CSS1 it has been possible to indent the first line of a block element 5em by setting the 'text-indent' property to '5em'. </pre> <p>If we add the <a class="css" data-link-type="maybe" href="#valdef-text-indent-hanging" id="ref-for-valdef-text-indent-hanging①">hanging</a> keyword, then the first line will start flush, but other lines will be indented 5em:</p> <pre class="output">In CSS3 we can instead indent all other lines of the block element by 5em by setting the 'text-indent' property to 'hanging 5em'. </pre> </div> <div class="example" id="example-f29e1f90"> <a class="self-link" href="#example-f29e1f90"></a> Since the <a class="property css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent③">text-indent</a> property only affects the “first formatted line”, a line after a forced break will not be indented. <pre class="output"> For example, in the middle of this paragraph is an equation, which is centered: x + y = z The first line after the equation is flush (else it would look like we started a new paragraph). </pre> <p>However, sometimes (as in poetry or code), it is appropriate to indent each line that happens to be long enough to wrap. In the following example, <a class="property css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent④">text-indent</a> is given a value of <span class="css">3em hanging each-line</span>, giving the third line of the poem a hanging indent where it soft-wraps at the block’s right boundary:</p> <pre class="output">In a short line of text There need be no wrapping, But when we go on and on and on and on, Sometimes a soft break Can help us stay on the page. </pre> </div> <p class="note" role="note"><span class="marker">Note:</span> Since the <a class="property css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent⑤">text-indent</a> property inherits, when specified on a block element, it will affect descendant inline-block elements. For this reason, it is often wise to specify <span class="css" id="ref-for-propdef-text-indent⑥">text-indent: 0</span> on elements that are specified <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-display-3/#propdef-display" id="ref-for-propdef-display">display: inline-block</a>.</p> <p></p> <h3 class="heading settled" data-level="8.2" id="hanging"><span class="secno">8.2. </span><span class="content"> Hanging Glyphs</span><a class="self-link" href="#hanging"></a></h3> <p>When a glyph at the start or end edge of a line <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="hang" data-noexport id="hang">hangs</dfn>, it is not considered when measuring the line’s contents for fit, alignment, or justification. Depending on the line’s alignment/justification, this can result in the mark being placed outside the line box. The <a data-link-type="dfn" href="#hang" id="ref-for-hang①⓪">hanging</a> glyph is also not taken into account when computing <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#intrinsic-size" id="ref-for-intrinsic-size">intrinsic sizes</a> (<a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#min-content" id="ref-for-min-content③">min-content size</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#max-content" id="ref-for-max-content">max-content size</a>), and any sizes derived thereof. (The interaction of this measurement and kerning is currently UA-defined; the CSSWG <a href="https://github.com/w3c/csswg-drafts/issues/2397">welcomes advice</a> on this point.)</p> <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="hanging-glyph"><a data-link-type="dfn" href="#hang" id="ref-for-hang①①">hanging</a> glyph</dfn> is still enclosed inside its parent inline box and still participates in text justification: its character advance is just not measured when determining how much content fits on the line, how much the line’s contents need to be expanded or compressed for justification, or how to position the content within the line box for text alignment. Effectively, the <a data-link-type="dfn" href="#hang" id="ref-for-hang①②">hanging</a> glyph character advance is re-interpreted as an additional negative margin on the affected edge of its parent <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#inline-box" id="ref-for-inline-box②">inline box</a>; the line is otherwise laid out as usual. An overflowing <a data-link-type="dfn" href="#hanging-glyph" id="ref-for-hanging-glyph">hanging glyph</a> should typically be considered <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#ink-overflow" id="ref-for-ink-overflow">ink overflow</a> so as to avoid creating unnecessary scrollbars, but the UA may treat it as <a data-link-type="dfn" href="https://www.w3.org/TR/css-overflow-3/#scrollable-overflow" id="ref-for-scrollable-overflow">scrollable overflow</a> when the content is editable or in other circumstances where treating it as <span id="ref-for-scrollable-overflow①">scrollable overflow</span> would be useful to the user. <a data-link-type="biblio" href="#biblio-css-overflow-3" title="CSS Overflow Module Level 3">[CSS-OVERFLOW-3]</a></p> <p>In some cases, a glyph at the end of a line can <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="conditionally-hang">conditionally hang</dfn>: it <a data-link-type="dfn" href="#hang" id="ref-for-hang①③">hangs</a> only if it does not otherwise fit in the line prior to justification. It is not considered when measuring the line’s contents for fit; however, any part of it that does not fit is considered to <span id="ref-for-hang①④">hang</span>. Glyphs that <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang⑥">conditionally hang</a> are not taken into account when computing <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#min-content" id="ref-for-min-content④">min-content sizes</a> and any sizes derived thereof, but they are taken into account for <a data-link-type="dfn" href="https://www.w3.org/TR/css-sizing-3/#max-content" id="ref-for-max-content①">max-content sizes</a> and any sizes derived thereof.</p> <p>Non-zero inline-axis borders or padding between a <a data-link-type="dfn" href="#hang" id="ref-for-hang①⑤">hang</a>able glyph and the edge of the line prevent the glyph from hanging. For example, a period at the end of an inline box with end padding does not <span id="ref-for-hang①⑥">hang</span> at the end edge of a line.</p> <p>Multiple adjacent glyphs can hang together, however specific limits on how many are allowed to hang may be specified (e.g. at most one punctuation character may <a data-link-type="dfn" href="#hang" id="ref-for-hang①⑦">hang</a> at each edge of the line).</p> <h4 class="heading settled" data-level="8.2.1" id="hanging-punctuation-property"><span class="secno">8.2.1. </span><span class="content"> Hanging Punctuation: the <a class="property css" data-link-type="property" href="#propdef-hanging-punctuation" id="ref-for-propdef-hanging-punctuation②">hanging-punctuation</a> property</span><span id="hanging-punctuation"></span><a class="self-link" href="#hanging-punctuation-property"></a></h4> <p></p> <table class="def propdef" data-link-for-hint="hanging-punctuation"> <tbody> <tr> <th>Name: <td><dfn class="dfn-paneled css" data-dfn-type="property" data-export id="propdef-hanging-punctuation">hanging-punctuation</dfn> <tr class="value"> <th><a href="https://www.w3.org/TR/css-values/#value-defs">Value:</a> <td class="prod">none <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-one" id="ref-for-comb-one④⑤">|</a> [ first <a data-link-type="grammar" href="https://www.w3.org/TR/css-values-4/#comb-any" id="ref-for-comb-any②">||</a> [ force-end <span id="ref-for-comb-one④⑥">|</span> allow-end ] <span id="ref-for-comb-any③">||</span> last ] <tr> <th><a href="https://www.w3.org/TR/css-cascade/#initial-values">Initial:</a> <td>none <tr> <th><a href="https://www.w3.org/TR/css-cascade/#applies-to">Applies to:</a> <td>text <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>specified keyword(s) <tr> <th><a href="https://www.w3.org/TR/cssom/#serializing-css-values">Canonical order:</a> <td><abbr title="follows order of property value definition">per grammar</abbr> <tr> <th><a href="https://www.w3.org/TR/web-animations/#animation-type">Animation type:</a> <td>discrete </table> <p>This property determines whether a punctuation mark, if one is present, <a data-link-type="dfn" href="#hang" id="ref-for-hang①⑧">hangs</a> and may be placed outside the line box (or in the indent) at the start or at the end of a line of text.</p> <p class="note" role="note"><span class="marker">Note:</span> If there is not sufficient padding on the block container, <a class="property css" data-link-type="property" href="#propdef-hanging-punctuation" id="ref-for-propdef-hanging-punctuation③">hanging-punctuation</a> can trigger overflow.</p> <p></p> <p>Values have the following meanings:</p> <dl> <dt><dfn class="dfn-paneled css" data-dfn-for="hanging-punctuation" data-dfn-type="value" data-export id="valdef-hanging-punctuation-none">none</dfn> <dd> No punctuation character is made to <a data-link-type="dfn" href="#hang" id="ref-for-hang①⑨">hang</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="hanging-punctuation" data-dfn-type="value" data-export id="valdef-hanging-punctuation-first">first</dfn> <dd> An opening bracket, quote, or ideographic space at the start 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 an element <a data-link-type="dfn" href="#hang" id="ref-for-hang②⓪">hangs</a>. This applies to all characters in the Unicode categories Ps, Pf, Pi plus the ASCII quote marks U+0027 ' APOSTROPHE and U+0022 " QUOTATION MARK and the IDEOGRAPHIC SPACE U+3000. <dt><dfn class="dfn-paneled css" data-dfn-for="hanging-punctuation" data-dfn-type="value" data-export id="valdef-hanging-punctuation-last">last</dfn> <dd> A closing bracket or quote at the end of the last formatted line of an element <a data-link-type="dfn" href="#hang" id="ref-for-hang②①">hangs</a>. This applies to all characters in the Unicode categories Pe, Pf, Pi plus the ASCII quote marks U+0027 ' APOSTROPHE and U+0022 " QUOTATION MARK. <dt><dfn class="dfn-paneled css" data-dfn-for="hanging-punctuation" data-dfn-type="value" data-export id="valdef-hanging-punctuation-force-end">force-end</dfn> <dd> A <a data-link-type="dfn" href="#stop-or-comma" id="ref-for-stop-or-comma">stop or comma</a> at the end of a line <a data-link-type="dfn" href="#hang" id="ref-for-hang②②">hangs</a>. <dt><dfn class="dfn-paneled css" data-dfn-for="hanging-punctuation" data-dfn-type="value" data-export id="valdef-hanging-punctuation-allow-end">allow-end</dfn> <dd> A <a data-link-type="dfn" href="#stop-or-comma" id="ref-for-stop-or-comma①">stop or comma</a> at the end of a line <a data-link-type="dfn" href="#conditionally-hang" id="ref-for-conditionally-hang⑦">conditionally hangs</a>. </dl> <p>At most one punctuation character may <a data-link-type="dfn" href="#hang" id="ref-for-hang②③">hang</a> at each edge of the line.</p> <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="stop or comma" data-noexport id="stop-or-comma">Stops and commas</dfn> allowed to <a data-link-type="dfn" href="#hang" id="ref-for-hang②④">hang</a> include:</p> <table class="data"> <tbody> <tr> <td>U+002C <td>, <td>COMMA <tr> <td>U+002E <td>. <td>FULL STOP <tr> <td>U+060C <td>، <td>ARABIC COMMA <tr> <td>U+06D4 <td>۔ <td>ARABIC FULL STOP <tr> <td>U+3001 <td>、 <td>IDEOGRAPHIC COMMA <tr> <td>U+3002 <td>。 <td>IDEOGRAPHIC FULL STOP <tr> <td>U+FF0C <td>, <td>FULLWIDTH COMMA <tr> <td>U+FF0E <td>. <td>FULLWIDTH FULL STOP <tr> <td>U+FE50 <td>﹐ <td>SMALL COMMA <tr> <td>U+FE51 <td>﹑ <td>SMALL IDEOGRAPHIC COMMA <tr> <td>U+FE52 <td>﹒ <td>SMALL FULL STOP <tr> <td>U+FF61 <td>。 <td>HALFWIDTH IDEOGRAPHIC FULL STOP <tr> <td>U+FF64 <td>、 <td>HALFWIDTH IDEOGRAPHIC COMMA </table> <p>The UA may include other characters as appropriate.</p> <p class="note" role="note"><span class="marker">Note:</span> The CSS Working Group would appreciate if UAs including other characters would <a href="#sotd">inform the working group</a> of such additions.</p> <div class="example" id="example-68d23fbc"> <a class="self-link" href="#example-68d23fbc"></a> The <a class="css" data-link-type="maybe" href="#valdef-hanging-punctuation-allow-end" id="ref-for-valdef-hanging-punctuation-allow-end">allow-end</a> and <a class="css" data-link-type="maybe" href="#valdef-hanging-punctuation-force-end" id="ref-for-valdef-hanging-punctuation-force-end">force-end</a> are two variations of hanging punctuation used in East Asia. <div> <figure class="sidefigure"> <img alt="hanging-punctuation: allow-end" height="51" src="images/hanging-punctuation-allow-end.png" width="202"> </figure> <pre class="highlight">p <c- p>{</c-> <c- k>text-align</c-><c- p>:</c-> justify<c- p>;</c-> <c- k>hanging-punctuation</c-><c- p>:</c-> allow-end<c- p>;</c-> <c- p>}</c-> </pre> <figure class="sidefigure"> <img alt="hanging-punctuation: force-end" height="51" src="images/hanging-punctuation-force-end.png" width="202"> </figure> <pre class="highlight">p <c- p>{</c-> <c- k>text-align</c-><c- p>:</c-> justify<c- p>;</c-> <c- k>hanging-punctuation</c-><c- p>:</c-> force-end<c- p>;</c-> <c- p>}</c-> </pre> </div> <p>The punctuation at the end of the first line for <a class="css" data-link-type="maybe" href="#valdef-hanging-punctuation-allow-end" id="ref-for-valdef-hanging-punctuation-allow-end①">allow-end</a> does not hang, because it fits without hanging. However, if <a class="css" data-link-type="maybe" href="#valdef-hanging-punctuation-force-end" id="ref-for-valdef-hanging-punctuation-force-end①">force-end</a> is used, it is forced to hang. The justification measures the line without the hanging punctuation. Therefore when the line is expanded, the punctuation is pushed outside the line.</p> </div> <h3 class="heading settled" data-level="8.3" id="bidi-linebox"><span class="secno">8.3. </span><span class="content"> Bidirectionality and Line Boxes</span><a class="self-link" href="#bidi-linebox"></a></h3> <p>The <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#start" id="ref-for-start④">start</a> and <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#end" id="ref-for-end③">end</a> sides of a line box are determined by the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-base-direction" id="ref-for-inline-base-direction">inline base direction</a> of the line box. Although they usually match, the <span id="ref-for-inline-base-direction①">inline base direction</span> of a <a data-link-type="dfn" href="https://www.w3.org/TR/css-inline-3/#line-box" id="ref-for-line-box①">line box</a> is distinct from the <span id="ref-for-inline-base-direction②">inline base direction</span> of the <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#containing-block" id="ref-for-containing-block">containing block</a> or the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#bidi-paragraph" id="ref-for-bidi-paragraph">bidi paragraph</a>. The <span id="ref-for-line-box②">line box</span>’s <span id="ref-for-inline-base-direction③">inline base direction</span> affects <a class="property css" data-link-type="property" href="#propdef-text-align-all" id="ref-for-propdef-text-align-all⑦">text-align-all</a>, <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last⑨">text-align-last</a>, <a class="property css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent⑦">text-indent</a>, and <a class="property css" data-link-type="property" href="#propdef-hanging-punctuation" id="ref-for-propdef-hanging-punctuation④">hanging-punctuation</a>—i.e. the position and alignment of its contents with respect to its edges. It does not affect the formatting or ordering of inline content (which is controlled by the <a href="https://www.unicode.org/reports/tr9/"><cite>Unicode Bidirectional Algorithm</cite></a> as applied by <a href="https://www.w3.org/TR/css-writing-modes-3/"><cite>CSS Writing Modes</cite></a> <a data-link-type="biblio" href="#biblio-uax9" title="Unicode Bidirectional Algorithm">[UAX9]</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a>).</p> <p>In most cases, a <a data-link-type="dfn" href="https://www.w3.org/TR/css-inline-3/#line-box" id="ref-for-line-box③">line box</a>’s <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-base-direction" id="ref-for-inline-base-direction④">inline base direction</a> is given by its <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#containing-block" id="ref-for-containing-block①">containing block</a>’s computed <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction①">direction</a>. However, if its <span id="ref-for-containing-block②">containing block</span> has <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-writing-modes-3/#propdef-unicode-bidi" id="ref-for-propdef-unicode-bidi">unicode-bidi: plaintext</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a>:</p> <ul> <li> If the <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#bidi-paragraph" id="ref-for-bidi-paragraph①">bidi paragraph</a> to which the <a data-link-type="dfn" href="https://www.w3.org/TR/css-inline-3/#line-box" id="ref-for-line-box④">line box</a> belongs (that is, the <span id="ref-for-bidi-paragraph②">bidi paragraph</span> for which the line box holds content) has strong directionality, the line box’s <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-base-direction" id="ref-for-inline-base-direction⑤">inline base direction</a> is that direction. <li> If the <a data-link-type="dfn" href="https://www.w3.org/TR/css-inline-3/#line-box" id="ref-for-line-box⑤">line box</a> is empty (i.e. contains no <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#atomic-inline" id="ref-for-atomic-inline④">atomic inlines</a> or characters other than the newline character, if any) or otherwise has no strong directionality (contains only weak or neutral characters), its <a data-link-type="dfn" href="https://www.w3.org/TR/css-writing-modes-4/#inline-base-direction" id="ref-for-inline-base-direction⑥">inline base direction</a> is taken from the preceding line box (if any), or, if this is the first line box in the containing block, from the <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction②">direction</a> property of the containing block. (This can result in an RTL line box whose contents have an LTR base direction.) </ul> <div class="example" id="example-0a5e92f2"> <a class="self-link" href="#example-0a5e92f2"></a> In the following example, assuming the <code><block></code> is a start-aligned preformatted block (<a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-display-3/#propdef-display" id="ref-for-propdef-display①">display: block; white-space: pre; text-align: start</a>), every other line is right-aligned: <pre class="highlight" dir="auto"><c- p><</c-><c- f>block</c-> <c- e>style</c-><c- o>=</c-><c- s>"unicode-bidi: plaintext"</c-><c- p>></c-> français فارسی français فارسی français فارسی <c- p></</c-><c- f>block</c-><c- p>></c-> </pre> </div> <div class="example" id="example-a82b4049"> <a class="self-link" href="#example-a82b4049"></a> Because neutral characters (such as punctuation) and isolated runs are skipped when <a href="http://unicode.org/reports/tr9/#P2">finding the inline base direction of a plaintext bidi paragraph</a>, the line box in the following example will be left-to-right (and thus left-aligned given <a class="css" data-link-type="propdesc" href="#propdef-text-align" id="ref-for-propdef-text-align⑧">text-align: start</a>), as dictated by the first strong character, ‘h’: <pre class="highlight"><c- p><</c-><c- f>para</c-> <c- e>style</c-><c- o>=</c-><c- s>"display: block; direction: rtl; unicode-bidi:plaintext"</c-><c- p>></c-> “<c- p><</c-><c- f>quote</c-> <c- e>style</c-><c- o>=</c-><c- s>"unicode-bidi:plaintext"</c-><c- p>></c->שלום!<c- p></</c-><c- f>quote</c-><c- p>></c->”, they said. <c- p></</c-><c- f>para</c-><c- p>></c-> </pre> </div> <div class="example" id="example-478dd3e8"> <a class="self-link" href="#example-478dd3e8"></a> <pre class="highlight"><c- p><</c-><c- f>textarea</c-> <c- e>style</c-><c- o>=</c-><c- s>"direction: rtl; unicode-bidi:plaintext"</c-><c- p>></c-> Hello! <c- p></</c-><c- f>textarea</c-><c- p>></c-> </pre> <p>Because of <a class="css" data-link-type="propdesc" href="https://www.w3.org/TR/css-writing-modes-3/#propdef-unicode-bidi" id="ref-for-propdef-unicode-bidi①">unicode-bidi: plaintext</a>, the “Hello!” is typeset LTR (i.e. with the exclamation mark on the right side) and left-aligned, ignoring the containing block’s RTL <a class="property css" data-link-type="property" href="https://www.w3.org/TR/css-writing-modes-3/#propdef-direction" id="ref-for-propdef-direction③">direction</a>. This makes the empty line following it LTR as well, which means that a caret on that line should appear at its left edge. The empty first line, however, is right-aligned: having no preceding line, it assumes the RTL direction of its containing block.</p> </div> <h2 class="no-num heading settled" id="order"><span class="content"> Appendix A: Text Processing Order of Operations</span><a class="self-link" href="#order"></a></h2> <p><em>This appendix is normative.</em></p> <p>The following list defines the order of text operations. (Implementations are not bound to this order as long as the resulting layout is the same.)</p> <ol> <li> <a href="#white-space-phase-1">white space processing</a> part I (pre-wrapping) <li> <a href="#transforming">text transformation</a> <li> <a href="https://www.w3.org/TR/css-writing-modes-4/#text-combine-upright">text combination</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a> <li> <a href="https://www.w3.org/TR/css-writing-modes-4/#text-orientation">text orientation</a> <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a> <li> <a data-link-type="dfn" href="#wrapping" id="ref-for-wrapping⑤">text wrapping</a> while applying per line: <ul> <li data-md> <p><a href="#text-indent-property">indentation</a></p> <li data-md> <p><a href="https://www.w3.org/TR/css-writing-modes-4/#text-direction">bidirectional reordering</a> <a data-link-type="biblio" href="#biblio-css2" title="Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification">[CSS2]</a> / <a data-link-type="biblio" href="#biblio-css-writing-modes-4" title="CSS Writing Modes Level 4">[CSS-WRITING-MODES-4]</a></p> <li data-md> <p><a href="#white-space-phase-2">white space processing</a> part II</p> <li data-md> <p><a href="https://www.w3.org/TR/css-fonts-3/">font/glyph selection and positioning</a> <a data-link-type="biblio" href="#biblio-css-fonts-3" title="CSS Fonts Module Level 3">[CSS-FONTS-3]</a></p> <li data-md> <p><a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①⑥">letter-spacing</a> and <a class="property css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing⑦">word-spacing</a></p> <li data-md> <p><a href="#hanging-punctuation-property">hanging punctuation</a></p> </ul> <li> <a href="#justification">justification</a> (which may affect glyph selection and/or text wrapping, looping back into that step) <li><a href="#text-align-property">text alignment</a> </ol> <h2 class="no-num heading settled" id="plaintext"><span class="content"> Appendix B: Conversion to Plaintext</span><a class="self-link" href="#plaintext"></a></h2> <p><em>This appendix is normative</em> for the purpose of plaintext copy-paste operations.</p> <p>When a CSS-rendered document is converted to a plaintext format, it is expected that:</p> <ul> <li> The <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform⑧">text-transform</a> property has no effect. <li> <a href="#white-space-phase-1">§ 4.1.1 Phase I: Collapsing and Transformation</a> is applied and any sequence of <a data-link-type="dfn" href="#collapsible-white-space" id="ref-for-collapsible-white-space①⓪">collapsible</a> <a data-link-type="dfn" href="#white-space" id="ref-for-white-space②②">white space</a> at the beginning of a <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#block" id="ref-for-block">block</a> or immediately following a <a data-link-type="dfn" href="#forced-line-break" id="ref-for-forced-line-break⑧">forced line break</a> is removed. </ul> <h2 class="no-num heading settled" id="default-stylesheet"><span class="content"> Appendix C: Default UA Stylesheet</span><a class="self-link" href="#default-stylesheet"></a></h2> <p><em>This appendix is informative,</em> and is to help UA developers to implement a default stylesheet for HTML, but UA developers are free to ignore or modify as appropriate.</p> <div class="example" id="example-5e698866"> <a class="self-link" href="#example-5e698866"></a> <pre class="highlight"><c- c>/* make option elements align together */</c-> option <c- p>{</c-> <c- k>text-align</c-><c- p>:</c-> match-parent<c- p>;</c-> <c- p>}</c-> </pre> </div> <h2 class="no-num heading settled" id="script-groups"><span class="content"> Appendix D: Scripts and Spacing</span><a class="self-link" href="#script-groups"></a></h2> <p><em>This appendix is normative.</em></p> <p>Typographic behavior varies somewhat by language, but varies drastically by writing system. This appendix categorizes some common <a data-link-type="dfn" href="#unicode-script" id="ref-for-unicode-script①">scripts</a> in Unicode 6.0 according to their justification and spacing behavior. Category descriptions are descriptive, not prescriptive; the determining factor is the prioritization of <a data-link-type="dfn" href="#justification-opportunity" id="ref-for-justification-opportunity②⓪">justification opportunities</a>.</p> <dl> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="block-scripts">block scripts</dfn> <dd> CJK and by extension all Wide characters (see <a href="https://www.unicode.org/reports/tr11/"><cite>East Asian Width</cite></a> <a data-link-type="biblio" href="#biblio-uax11" title="East Asian Width">[UAX11]</a>). The following <a data-link-type="dfn" href="#unicode-script" id="ref-for-unicode-script②">Unicode scripts</a> are included: Bopomofo, Han, Hangul, Hiragana, Katakana, and Yi. Characters of the <a data-link-type="dfn" href="#unicode-east-asian-width" id="ref-for-unicode-east-asian-width②">East Asian Width property</a> <code>Wide</code> and <code>Fullwidth</code> are also included, but <code>Ambiguous</code> characters are included only if the <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system④">writing system</a> is <a data-link-type="dfn" href="#writing-system-chinese" id="ref-for-writing-system-chinese③">Chinese</a>, <a data-link-type="dfn" href="#writing-system-korean" id="ref-for-writing-system-korean">Korean</a>, or <a data-link-type="dfn" href="#writing-system-japanese" id="ref-for-writing-system-japanese③">Japanese</a>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="clustered-scripts">clustered scripts</dfn> <dd> Clustered scripts have discrete units and break only at word boundaries, but do not use visible word separators. They prioritize stretching spaces, but comfortably admit inter-character spacing for justification. The clustered scripts include, but are not limited to, the following <a data-link-type="dfn" href="#unicode-script" id="ref-for-unicode-script③">Unicode scripts</a>: Khmer, Lao, Myanmar, New Tai Lue, Tai Le, Tai Tham, Tai Viet, Thai <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="cursive script" data-noexport id="cursive-script">cursive scripts</dfn> <dd> Cursive scripts do not admit gaps between their letters for either justification or <a class="property css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①⑦">letter-spacing</a>. The following <a data-link-type="dfn" href="#unicode-script" id="ref-for-unicode-script④">Unicode scripts</a> are included: Arabic, Hanifi Rohingya, Mandaic, Mongolian, N’Ko, Phags Pa, Syriac <p class="note" role="note"><span class="marker">Note:</span> Indic scripts with baseline connectors (such as Devanagari and Gujarati) <em>are not</em> considered <a data-link-type="dfn" href="#cursive-script" id="ref-for-cursive-script④">cursive scripts</a>, and <em>do</em> admit such gaps between <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit④③">typographic character units</a>. See <a href="https://www.w3.org/TR/ilreq/"><cite>Indic Layout Requirements</cite></a>. <a data-link-type="biblio" href="#biblio-ilreq" title="Indic Layout Requirements">[ILREQ]</a></p> </dl> <p>User agents should update this list as they update their Unicode support to handle as-yet-unencoded cursive scripts in future versions of Unicode, and are encouraged to ask the CSSWG to update this spec accordingly.</p> <h2 class="no-num heading settled" id="character-properties"><span class="content"> Appendix E: Characters and Properties</span><a class="self-link" href="#character-properties"></a></h2> <p><em>This appendix is normative.</em></p> <p>Unicode defines four code point-level properties that are referenced in CSS typesetting:</p> <dl> <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="Unicode East Asian Width|East Asian Width property" id="unicode-east-asian-width"><a href="http://www.unicode.org/reports/tr11/#Definitions">East Asian width property</a></dfn> <dd> Defined in <cite>Unicode Standard Annex #11</cite> <a data-link-type="biblio" href="#biblio-uax11" title="East Asian Width">[UAX11]</a> and given as the <code>East_Asian_Width</code> property in the <a href="https://www.unicode.org/reports/tr44/"><cite>Unicode Character Database</cite></a> <a data-link-type="biblio" href="#biblio-uax44" title="Unicode Character Database">[UAX44]</a>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="Unicode General Category|Unicode category|General Category" id="unicode-general-category"><a href="http://www.unicode.org/reports/tr44/#General_Category_Values">general category</a></dfn> <dd> Defined in <cite>Unicode Standard Annex #44</cite> <a data-link-type="biblio" href="#biblio-uax44" title="Unicode Character Database">[UAX44]</a> and given as the <code>General_Category</code> property in the <a href="https://www.unicode.org/reports/tr44/"><cite>Unicode Character Database</cite></a> <span title="Unicode Character Database">[UAX44]</span>. <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="Unicode Script|Script property" id="unicode-script"><a href="http://www.unicode.org/reports/tr24/#Values">script property</a></dfn> <dd> Defined in <cite>Unicode Standard Annex #24</cite> <a data-link-type="biblio" href="#biblio-uax24" title="Unicode Script Property">[UAX24]</a> and given as the <code>Script</code> property in the <a href="https://www.unicode.org/reports/tr44/"><cite>Unicode Character Database</cite></a> <a data-link-type="biblio" href="#biblio-uax44" title="Unicode Character Database">[UAX44]</a>. (UAs must include any ScriptExtensions.txt assignments in this mapping.) <dt><dfn class="dfn-paneled" data-dfn-type="dfn" data-export data-lt="Unicode Vertical Orientation|Vertical Orientation" id="unicode-vertical-orientation"><a href="http://www.unicode.org/reports/tr50/">Vertical Orientation</a></dfn> <dd> Defined in <cite>Unicode Standard Annex #50</cite> <a data-link-type="biblio" href="#biblio-uax50" title="Unicode Vertical Text Layout">[UAX50]</a> as the Vertical_Orientation property in the <a href="https://www.unicode.org/reports/tr44/"><cite>Unicode Character Database</cite></a> <a data-link-type="biblio" href="#biblio-uax44" title="Unicode Character Database">[UAX44]</a>. </dl> <p>Unicode defines properties for individual code points, but sometimes it is necessary to determine the properties of a <a data-link-type="dfn" href="#typographic-character-unit" id="ref-for-typographic-character-unit④④">typographic character unit</a>. For the purposes of CSS Text, the properties of a <span id="ref-for-typographic-character-unit④⑤">typographic character unit</span> are given by the base character of its first <a data-link-type="dfn" href="#grapheme-cluster" id="ref-for-grapheme-cluster④">grapheme cluster</a>—except in two cases:</p> <ul> <li> <a data-link-type="dfn" href="#grapheme-cluster" id="ref-for-grapheme-cluster⑤">Grapheme clusters</a> formed with an Enclosing Mark (<code>Me</code>) of the Common script are considered to be Other Symbols (<code>So</code>) in the Common script. They are assumed to have the same Unicode properties as the replacement character (U+FFFD). <li> <a data-link-type="dfn" href="#grapheme-cluster" id="ref-for-grapheme-cluster⑥">Grapheme clusters</a> formed with a Space Separator (<code>Zs</code>) as the base are considered to be Modifier Symbols (<code>Sk</code>). They are assumed to have the same East Asian Width property as the base, but take their other properties from the first combining character in the sequence. </ul> <h2 class="no-num heading settled" id="script-tagging"><span class="content"> Appendix F: Identifying the Content Writing System</span><a class="self-link" href="#script-tagging"></a></h2> <p></p> <p><em>This appendix is normative.</em></p> <p>While most languages have a preferred writing system, some have multiple, and most can also be transcribed into one or more foreign writing systems. As a common example, most languages have at least one Latin transcription, and can thus be written in the Latin writing system. Transcribed texts typically adopt the typographic conventions of the writing system: for example Japanese “romaji” and Chinese Pinyin use Latin letters and word spaces, and follow Latin line-breaking and justification practices accordingly. As another example, historical ideographic Korean (<code>ko-Hani</code>) does not use word spaces, and should therefore be typeset similar to Chinese rather than modern Korean.</p> <p>In HTML or any other <a data-link-type="dfn" href="https://www.w3.org/TR/CSS21/conform.html#doclanguage" id="ref-for-doclanguage④">document language</a> using <cite>BCP47</cite> tags for identifying languages to declare the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①⑤">content language</a>, authors can disambiguate or indicate the use of an atypical writing system with script subtags. <a data-link-type="biblio" href="#biblio-bcp47" title="Tags for Identifying Languages">[BCP47]</a> For example, to indicate use of the Latin writing system for languages which don’t natively use it, the <code>-Latn</code> script subtag can be added, e.g. <code>ja-Latn</code> for Japanese romaji. Other subtags exist for other writing systems, see ISO’s <cite>Code for the Representation of Names of Scripts</cite> and the <a href="http://unicode.org/iso15924/iso15924-codes.html">ISO15924 script tag registry</a>. <a data-link-type="biblio" href="#biblio-iso15924" title="Code for the representation of names of scripts.">[ISO15924]</a></p> <div class="example" id="example-a2325afd"> <a class="self-link" href="#example-a2325afd"></a> Some common/historical examples of using <cite>BCP47</cite> tags with script subtags: <dl> <dt><code>zh-Latn</code> <dd>Chinese, written in Latin transcription. <dt><code>ko-Hani</code> <dd>Korean, written in Hanja (Chinese ideographic characters). <dt><code>tr-Arab</code> <dd>Turkish, written in Arabic script. <dt><code>mn-Cyrl</code> <dd>Mongolian, written in Cyrillic. <dt><code>mn-Mong</code> <dd>Mongolian, written in traditional Mongolian script. </dl> </div> <p>However, <cite>BCP47</cite> script subtags are not typically used (and are in fact discouraged) for languages strongly associated with a single writing system: instead that writing system is expected to be implied when no other is specified. <a data-link-type="biblio" href="#biblio-bcp47" title="Tags for Identifying Languages">[BCP47]</a> IANA maintains a database of various languages’ most common writing system via the <code>Suppress-Script</code> field in its <a href="https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry">language subtag registry</a> for this purpose.</p> <p class="note" role="note"><span class="marker">Note:</span> More advice on language tagging can be found in the <a href="https://www.w3.org/International/core/">Internationalization Working Group</a>’s <a href="https://www.w3.org/International/articles/language-tags/">“Language tags in HTML and XML”</a> and <a href="https://www.w3.org/International/questions/qa-choosing-language-tags">“Choosing a Language Tag”</a>.</p> <p>When no writing system is explicitly indicated, UAs should assume the most common writing system of the declared <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①⑥">content language</a> for language-sensitive typographic behaviors such as line-breaking or justification. However, UAs must not assume that writing system if the author has explicitly declared a different one. If the UA has no language-specific knowledge of a particular language and writing system combination, it must use the typographic conventions of the declared writing system (assuming the conventions of a different language if necessary), not the conventions of the declared language in an assumed writing system, which would be inappropriate to the declared writing system.</p> <p>The full correspondence between languages and their most common writing systems is out of scope for this document. However, user agents must assume at least the following:</p> <ul> <li> If the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①⑦">content language</a> is Chinese and the <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system⑤">writing system</a> is unspecified, or for any <span id="ref-for-content-language①⑧">content language</span> if the <span id="ref-for-content-writing-system⑥">writing system</span> to specified to be one of the <span class="css">Hant</span>, <span class="css">Hans</span>, <span class="css">Hani</span>, <span class="css">Hanb</span>, or <span class="css">Bopo</span> ISO script codes, then the <span id="ref-for-content-writing-system⑦">writing system</span> is <dfn class="dfn-paneled" data-dfn-for="writing-system" data-dfn-type="dfn" data-noexport id="writing-system-chinese">Chinese</dfn>. <li> If the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language①⑨">content language</a> is Japanese and the <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system⑧">writing system</a> is unspecified, or for any <span id="ref-for-content-language②⓪">content language</span> if the <span id="ref-for-content-writing-system⑨">writing system</span> to specified to be one of the <span class="css">Jpan</span>, <span class="css">Hrkt</span>, <span class="css">Hira</span>, or <span class="css">Kana</span> ISO script codes, then the <span id="ref-for-content-writing-system①⓪">writing system</span> is <dfn class="dfn-paneled" data-dfn-for="writing-system" data-dfn-type="dfn" data-noexport id="writing-system-japanese">Japanese</dfn>. <li> If the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language②①">content language</a> is Korean and the <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system①①">writing system</a> is unspecified, or for any <span id="ref-for-content-language②②">content language</span> if the <span id="ref-for-content-writing-system①②">writing system</span> to specified to be one of the <span class="css">Kore</span>, <span class="css">Hang</span>, or <span class="css">Jamo</span> ISO script codes, then the <span id="ref-for-content-writing-system①③">writing system</span> is <dfn class="dfn-paneled" data-dfn-for="writing-system" data-dfn-type="dfn" data-noexport id="writing-system-korean">Korean</dfn>. <li> The <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system①④">writing system</a> is only considered to be <dfn class="dfn-paneled" data-dfn-for="writing-system" data-dfn-type="dfn" data-lt="known | unknown" data-noexport id="writing-system-known">unknown</dfn> if the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language②③">content language</a> itself is unknown, or if it explicitly indicates an unknown writing system. <p class="note" role="note"><span class="marker">Note:</span> Mere omission of the <a data-link-type="dfn" href="#content-writing-system" id="ref-for-content-writing-system①⑤">writing system</a> information when the <a data-link-type="dfn" href="#content-language" id="ref-for-content-language②④">content language</a> is declared means the that the <span id="ref-for-content-writing-system①⑥">writing system</span> is implied, not unknown.</p> </ul> <h2 class="no-num heading settled" id="small-kana"><span class="content"> Appendix G: Small Kana Mappings</span><a class="self-link" href="#small-kana"></a></h2> <p><em>This appendix is normative.</em></p> <div class="pairs-table"> <table class="data"> <caption>Small Kana Map to Full-size Kana</caption> <thead> <tr> <th scope="col"><dfn class="dfn-paneled" data-dfn-for="kana" data-dfn-type="dfn" data-lt="small | small kana" data-noexport id="kana-small">Small</dfn> <th scope="col"><dfn class="dfn-paneled" data-dfn-for="kana" data-dfn-type="dfn" data-lt="full-size |full-size kana" data-noexport id="kana-full-size">Full-size</dfn> <tbody title="Hiragana"> <tr> <td>ぁ U+3041 <td>あ U+3042 <tr> <td>ぃ U+3043 <td>い U+3044 <tr> <td>ぅ U+3045 <td>う U+3046 <tr> <td>ぇ U+3047 <td>え U+3048 <tr> <td>ぉ U+3049 <td>お U+304A <tr> <td>ゕ U+3095 <td>か U+304B <tr> <td>ゖ U+3096 <td>け U+3051 <tr> <td>𛄲 U+1B132 <td>こ U+3053 <tr> <td>っ U+3063 <td>つ U+3064 <tr> <td>ゃ U+3083 <td>や U+3084 <tr> <td>ゅ U+3085 <td>ゆ U+3086 <tr> <td>ょ U+3087 <td>よ U+3088 <tr> <td>ゎ U+308E <td>わ U+308F <tr> <td>𛅐 U+1B150 <td>ゐ U+3090 <tr> <td>𛅑 U+1B151 <td>ゑ U+3091 <tr> <td>𛅒 U+1B152 <td>を U+3092 <tbody title="Katakana"> <tr> <td>ァ U+30A1 <td>ア U+30A2 <tr> <td>ィ U+30A3 <td>イ U+30A4 <tr> <td>ゥ U+30A5 <td>ウ U+30A6 <tr> <td>ェ U+30A7 <td>エ U+30A8 <tr> <td>ォ U+30A9 <td>オ U+30AA <tr> <td>ヵ U+30F5 <td>カ U+30AB <tr> <td>ㇰ U+31F0 <td>ク U+30AF <tr> <td>ヶ U+30F6 <td>ケ U+30B1 <tr> <td>𛅕 U+1B155 <td>コ U+30B3 <tr> <td>ㇱ U+31F1 <td>シ U+30B7 <tr> <td>ㇲ U+31F2 <td>ス U+30B9 <tr> <td>ッ U+30C3 <td>ツ U+30C4 <tr> <td>ㇳ U+31F3 <td>ト U+30C8 <tr> <td>ㇴ U+31F4 <td>ヌ U+30CC <tr> <td>ㇵ U+31F5 <td>ハ U+30CF <tr> <td>ㇶ U+31F6 <td>ヒ U+30D2 <tr> <td>ㇷ U+31F7 <td>フ U+30D5 <tr> <td>ㇸ U+31F8 <td>ヘ U+30D8 <tr> <td>ㇹ U+31F9 <td>ホ U+30DB <tr> <td>ㇺ U+31FA <td>ム U+30E0 <tr> <td>ャ U+30E3 <td>ヤ U+30E4 <tr> <td>ュ U+30E5 <td>ユ U+30E6 <tr> <td>ョ U+30E7 <td>ヨ U+30E8 <tr> <td>ㇻ U+31FB <td>ラ U+30E9 <tr> <td>ㇼ U+31FC <td>リ U+30EA <tr> <td>ㇽ U+31FD <td>ル U+30EB <tr> <td>ㇾ U+31FE <td>レ U+30EC <tr> <td>ㇿ U+31FF <td>ロ U+30ED <tr> <td>ヮ U+30EE <td>ワ U+30EF <tr> <td>𛅤 U+1B164 <td>ヰ U+30F0 <tr> <td>𛅥 U+1B165 <td>ヱ U+30F1 <tr> <td>𛅦 U+1B166 <td>ヲ U+30F2 <tr> <td>𛅧 U+1B167 <td>ン U+30F3 <tbody title="Half-width Katakana"> <tr> <td>ァ U+FF67 <td>ア U+FF71 <tr> <td>ィ U+FF68 <td>イ U+FF72 <tr> <td>ゥ U+FF69 <td>ウ U+FF73 <tr> <td>ェ U+FF6A <td>エ U+FF74 <tr> <td>ォ U+FF6B <td>オ U+FF75 <tr> <td>ッ U+FF6F <td>ツ U+FF82 <tr> <td>ャ U+FF6C <td>ヤ U+FF94 <tr> <td>ュ U+FF6D <td>ユ U+FF95 <tr> <td>ョ U+FF6E <td>ヨ U+FF96 </table> </div> <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 leaks the user’s installed hyphenation and line-breaking dictionaries.</p> <h2 class="no-num heading settled" id="sec"><span class="content"> Security Considerations</span><a class="self-link" href="#sec"></a></h2> <p>This specification introduces no new security considerations.</p> <h2 class="no-num heading settled" id="acknowledgements"><span class="content"> Acknowledgements</span><a class="self-link" href="#acknowledgements"></a></h2> <p>This specification would not have been possible without the help from: Addison Phillips, Aharon Lanin, Alan Stearns, Ambrose Li, Arnold Schrijver, Arye Gittelman, Ayman Aldahleh, Ben Errez, Bert Bos, Chris Lilley, Chris Pratley, Chris Thrasher, Chris Wilson, Dave Hyatt, David Baron, Emilio Cobos Álvarez, Eric LeVine, Etan Wexler, Frank Tang, Håkon Wium Lie, IM Mincheol, Ian Hickson, James Clark, Javier Fernandez, John Daggett, Jonathan Kew, Ken Lunde, Laurie Anna Edlund, Marcin Sawicki, Martin Dürst, Martin Heijdra, Masafumi Yabe, Masayasu Ishikawa, Michael Jochimsen, Michel Suignard, Mike Bemford, Myles Maxfield, Nat McCully, Paul Nelson, Rahul Sonnad, Richard Ishida, Shinyu Murakami, Stephen Deach, Steve Zilles, Takao Suzuki, Tantek Çelik, Xidorn Quan, Yaniv Feinberg.</p> <h2 class="no-num heading settled" id="changes"><span class="content"> Changes</span><a class="self-link" href="#changes"></a></h2> <h3 class="no-num heading settled" id="recent-changes"><span class="content"> Recent Changes</span><a class="self-link" href="#recent-changes"></a></h3> <p>The following normative changes have been made since the <a href="https://www.w3.org/TR/2023/CRD-css-text-3-20230903/">September 2023 Candidate Recommendation Draft</a>:</p> <ul> <li data-md> <p>Corrected the Computed Value line for <a class="property css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last①⓪">text-align-last</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/7331">Issue 7331</a>)</p> <li data-md> <p>Disambiguate soft wrap opportunities around replaced elements. (<a href="https://github.com/w3c/csswg-drafts/issues/9964">Issue 9964</a>)</p> <blockquote> For <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③⑤">soft wrap opportunities</a> defined by the boundary between two characters <ins> or <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#atomic-inline" id="ref-for-atomic-inline⑤">atomic inlines</a></ins> , the <a class="property css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space②⓪">white-space</a> property on the nearest common ancestor of the two characters controls breaking; </blockquote> </ul> <p>The following normative changes have been made since the <a href="https://www.w3.org/TR/2023/CRD-css-text-3-20230213/">February 2023 Candidate Recommendation Draft</a>.</p> <ul> <li data-md> <p>Update <a href="#small-kana">Appendix G: Small Kana Mappings</a> to Unicode 15.0. (<a href="https://github.com/w3c/csswg-drafts/issues/8442">Issue 8442</a>)</p> <li data-md> <p>Non-tailorable Unicode line breaking controls other than NBSP take precedence over our rule about atomic inlines. (<a href="https://github.com/w3c/csswg-drafts/issues/8972">Issue 8972</a>)</p> <blockquote> For Web-compatibility there is a <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③⑥">soft wrap opportunity</a> before and after each replaced element or other <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#atomic-inline" id="ref-for-atomic-inline⑥">atomic inline</a>, even when adjacent to a character that would normally suppress them, <del>such as</del> <ins>including</ins> U+00A0 NO-BREAK SPACE. <ins> However, with the exception of U+00A0 NO-BREAK SPACE, there must be no <a data-link-type="dfn" href="#soft-wrap-opportunity" id="ref-for-soft-wrap-opportunity③⑦">soft wrap opportunity</a> between <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#atomic-inline" id="ref-for-atomic-inline⑦">atomic inlines</a> and adjacent characters belonging to the Unicode GL, WJ, or ZWJ line breaking classes. <a data-link-type="biblio" href="#biblio-uax14" title="Unicode Line Breaking Algorithm">[UAX14]</a> </ins> </blockquote> </ul> <p>The following normative changes have been made since the <a href="https://www.w3.org/TR/2020/CR-css-text-3-20201222/">December 2020 Candidate Recommendation</a>.</p> <ul> <li data-md> <p>Allow <a class="css" data-link-type="propdesc" href="#propdef-hanging-punctuation" id="ref-for-propdef-hanging-punctuation⑤">hanging-punctuation: first</a> to hang U+300 IDEOGRAPHIC SPACE in order to accommodate plaintext indentation habits. (<a href="https://github.com/w3c/csswg-drafts/issues/2462">Issue 2462</a>)</p> <blockquote> <dl> <dt>first <dd> An opening bracket <ins>,</ins> <del> or</del> quote <ins>, or ideographic space</ins> at the start 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 an element <a data-link-type="dfn" href="#hang" id="ref-for-hang②⑤">hangs</a>. This applies to all characters in the Unicode categories Ps, Pf, Pi plus the ASCII quote marks U+0027 ' APOSTROPHE and U+0022 " QUOTATION MARK plus the ASCII quote marks U+0027 ' APOSTROPHE and U+0022 " QUOTATION MARK <ins>and the IDEOGRAPHIC SPACE U+3000</ins> . </dl> </blockquote> <li data-md> <p>Define that <a class="css" data-link-type="maybe" href="#valdef-text-justify-distribute" id="ref-for-valdef-text-justify-distribute①">distribute</a> computes to <a class="css" data-link-type="maybe" href="#valdef-text-justify-inter-character" id="ref-for-valdef-text-justify-inter-character②">inter-character</a>, rather than merely behave the same; allow <span class="css" id="ref-for-valdef-text-justify-distribute②">distribute</span> to be implemented as a <a data-link-type="dfn" href="https://www.w3.org/TR/css-cascade-5/#css-legacy-value-alias" id="ref-for-css-legacy-value-alias①">legacy value alias</a>, since this is easier for some engines and does not matter for compatibility. (<a href="https://github.com/w3c/csswg-drafts/issues/6156">Issue 6156</a>, <a href="https://github.com/w3c/csswg-drafts/issues/7322">Issue 7322</a>)</p> <li data-md> <p>Clarify that language-specific hyphenation rules also apply to explicit <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity⑦">hyphenation opportunities</a>. (<a href="https://github.com/w3c/csswg-drafts/issues/5973">Issue 5973</a>)</p> <blockquote> Words are only hyphenated where there are characters inside the word that explicitly suggest <a data-link-type="dfn" href="#hyphenation-opportunity" id="ref-for-hyphenation-opportunity⑧">hyphenation opportunities</a>. <ins>The UA must use the appropriate language-specific hyphenation character(s) and should apply any appropriate spelling changes just as for automatic hyphenation at the same point.</ins> </blockquote> <li data-md> <p>Define <a class="css" data-link-type="maybe" href="#valdef-text-align-match-parent" id="ref-for-valdef-text-align-match-parent④">match-parent</a> on the <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#root-element" id="ref-for-root-element①">root element</a> to compute to <a class="css" data-link-type="maybe" href="#valdef-text-align-start" id="ref-for-valdef-text-align-start⑤">start</a> instead of computing against 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>. (<a href="https://github.com/w3c/csswg-drafts/issues/6542">Issue 6542</a>)</p> <li data-md> <p>Make authoring advice regarding <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform⑨">text-transform</a> a normative recommendation. (<a href="https://github.com/w3c/csswg-drafts/issues/8279">Issue 8279</a>)</p> <blockquote> <p> <del>Note: The <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform①⓪">text-transform</a> property only affects the presentation layer; correct casing for semantic purposes is expected to be represented in the source document.</del> </p> <p> <ins>Advisement: Authors must not rely on <a class="property css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform①①">text-transform</a> for semantic purposes; rather the correct casing and semantics should be encoded in the source document text and markup.</ins> </p> </blockquote> </ul> <p>In addition there have been some minor editorial fixes.</p> <h3 class="no-num heading settled" id="old-changes"><span class="content"> Older Changes</span><a class="self-link" href="#old-changes"></a></h3> <p>See also <a href="https://www.w3.org/TR/2020/CR-css-text-3-20201222/#changes">earlier list of changes</a> covering the 2020 and 2019 Working Drafts prior to that Candidate Recommendation and the <a href="https://drafts.csswg.org/css-text-3/issues-lc-2013">Disposition of Comments</a> covering all comments between 2013 and 2020.</p> </main> <h2 class="no-ref no-num heading settled" id="w3c-conformance"><span class="content"> Conformance</span><a class="self-link" href="#w3c-conformance"></a></h2> <h3 class="no-ref heading settled" id="w3c-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#w3c-conventions"></a></h3> <p>Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification. </p> <p>All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119" title="Key words for use in RFCs to Indicate Requirement Levels">[RFC2119]</a></p> <p>Examples in this specification are introduced with the words “for example” or are set apart from the normative text with <code>class="example"</code>, like this: </p> <div class="example" id="w3c-example"> <a class="self-link" href="#w3c-example"></a> <p>This is an example of an informative example.</p> </div> <p>Informative notes begin with the word “Note” and are set apart from the normative text with <code>class="note"</code>, like this: </p> <p class="note" role="note">Note, this is an informative note.</p> <p>Advisements are normative sections styled to evoke special attention and are set apart from other normative text with <code><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="#valdef-hanging-punctuation-allow-end">allow-end</a><span>, in § 8.2.1</span> <li> anywhere <ul> <li><a href="#valdef-line-break-anywhere">value for line-break</a><span>, in § 5.3</span> <li><a href="#valdef-overflow-wrap-anywhere">value for overflow-wrap</a><span>, in § 5.5</span> </ul> <li> auto <ul> <li><a href="#valdef-hyphens-auto">value for hyphens</a><span>, in § 5.4</span> <li><a href="#valdef-line-break-auto">value for line-break</a><span>, in § 5.3</span> <li><a href="#valdef-text-align-last-auto">value for text-align-last</a><span>, in § 6.3</span> <li><a href="#valdef-text-justify-auto">value for text-justify</a><span>, in § 6.4</span> </ul> <li><a href="#bidi-formatting-characters">bidi formatting characters</a><span>, in § 4.1.1</span> <li><a href="#block-scripts">block scripts</a><span>, in § Unnumbered section</span> <li><a href="#valdef-word-break-break-all">break-all</a><span>, in § 5.2</span> <li><a href="#valdef-white-space-break-spaces">break-spaces</a><span>, in § 3</span> <li> break-word <ul> <li><a href="#valdef-overflow-wrap-break-word">value for overflow-wrap</a><span>, in § 5.5</span> <li><a href="#valdef-word-break-break-word">value for word-break</a><span>, in § 5.2</span> </ul> <li><a href="#valdef-text-transform-capitalize">capitalize</a><span>, in § 2.1</span> <li><a href="#valdef-text-align-center">center</a><span>, in § 6.1</span> <li><a href="#character">character</a><span>, in § 1.4</span> <li><a href="#writing-system-chinese">Chinese</a><span>, in § Unnumbered section</span> <li><a href="#clustered-scripts">clustered scripts</a><span>, in § Unnumbered section</span> <li><a href="#collapsible-white-space">collapsible</a><span>, in § 4.1.1</span> <li><a href="#collapsible-white-space">collapsible white space</a><span>, in § 4.1.1</span> <li><a href="#conditionally-hang">conditionally hang</a><span>, in § 8.2</span> <li><a href="#content-language">content language</a><span>, in § 1.3</span> <li><a href="#content-writing-system">content writing system</a><span>, in § 1.3</span> <li><a href="#cursive-script">cursive script</a><span>, in § Unnumbered section</span> <li><a href="#valdef-text-justify-distribute">distribute</a><span>, in § 6.4</span> <li><a href="#white-space">document white space</a><span>, in § 4.1</span> <li><a href="#white-space">document white space characters</a><span>, in § 4.1</span> <li><a href="#valdef-text-indent-each-line">each-line</a><span>, in § 8.1</span> <li><a href="#unicode-east-asian-width">East Asian Width property</a><span>, in § Unnumbered section</span> <li><a href="#valdef-text-align-end">end</a><span>, in § 6.1</span> <li><a href="#valdef-hanging-punctuation-first">first</a><span>, in § 8.2.1</span> <li><a href="#forced-line-break">forced line break</a><span>, in § 5</span> <li><a href="#valdef-hanging-punctuation-force-end">force-end</a><span>, in § 8.2.1</span> <li><a href="#kana-full-size">full-size</a><span>, in § Unnumbered section</span> <li><a href="#kana-full-size">full-size kana</a><span>, in § Unnumbered section</span> <li><a href="#valdef-text-transform-full-size-kana">full-size-kana</a><span>, in § 2.1</span> <li> full-width <ul> <li><a href="#full-width">definition of</a><span>, in § 2.1.1</span> <li><a href="#valdef-text-transform-full-width">value for text-transform</a><span>, in § 2.1</span> </ul> <li><a href="#unicode-general-category">General Category</a><span>, in § Unnumbered section</span> <li><a href="#grapheme-cluster">grapheme cluster</a><span>, in § 1.4</span> <li><a href="#half-width">half-width</a><span>, in § 2.1.1</span> <li><a href="#hang">hang</a><span>, in § 8.2</span> <li><a href="#valdef-text-indent-hanging">hanging</a><span>, in § 8.1</span> <li><a href="#hanging-glyph">hanging glyph</a><span>, in § 8.2</span> <li><a href="#propdef-hanging-punctuation">hanging-punctuation</a><span>, in § 8.2.1</span> <li><a href="#hyphenate">hyphenate</a><span>, in § 5.4</span> <li><a href="#hyphenate">hyphenation</a><span>, in § 5.4</span> <li><a href="#hyphenation-opportunity">hyphenation opportunity</a><span>, in § 5.4</span> <li><a href="#propdef-hyphens">hyphens</a><span>, in § 5.4</span> <li><a href="#valdef-text-justify-inter-character">inter-character</a><span>, in § 6.4</span> <li><a href="#valdef-text-justify-inter-word">inter-word</a><span>, in § 6.4</span> <li><a href="#writing-system-japanese">Japanese</a><span>, in § Unnumbered section</span> <li><a href="#justification-opportunity">justification opportunity</a><span>, in § 6.4.1</span> <li><a href="#valdef-text-align-justify">justify</a><span>, in § 6.1</span> <li><a href="#valdef-text-align-justify-all">justify-all</a><span>, in § 6.1</span> <li><a href="#valdef-word-break-keep-all">keep-all</a><span>, in § 5.2</span> <li><a href="#writing-system-known">known</a><span>, in § Unnumbered section</span> <li><a href="#writing-system-korean">Korean</a><span>, in § Unnumbered section</span> <li><a href="#valdef-hanging-punctuation-last">last</a><span>, in § 8.2.1</span> <li><a href="#valdef-text-align-left">left</a><span>, in § 6.1</span> <li> <length> <ul> <li><a href="#valdef-letter-spacing-length">value for letter-spacing</a><span>, in § 7.2</span> <li><a href="#valdef-text-indent-length">value for text-indent</a><span>, in § 8.1</span> <li><a href="#valdef-word-spacing-length">value for word-spacing</a><span>, in § 7.1</span> </ul> <li><a href="#letter">letter</a><span>, in § 1.4</span> <li><a href="#propdef-letter-spacing">letter-spacing</a><span>, in § 7.2</span> <li><a href="#line-break">line break</a><span>, in § 5</span> <li><a href="#propdef-line-break">line-break</a><span>, in § 5.3</span> <li><a href="#line-breaking-process">line breaking</a><span>, in § 5</span> <li><a href="#line-breaking-process">line breaking process</a><span>, in § 5</span> <li><a href="#valdef-line-break-loose">loose</a><span>, in § 5.3</span> <li><a href="#valdef-text-transform-lowercase">lowercase</a><span>, in § 2.1</span> <li><a href="#valdef-hyphens-manual">manual</a><span>, in § 5.4</span> <li><a href="#valdef-text-align-match-parent">match-parent</a><span>, in § 6.1</span> <li> none <ul> <li><a href="#valdef-hanging-punctuation-none">value for hanging-punctuation</a><span>, in § 8.2.1</span> <li><a href="#valdef-hyphens-none">value for hyphens</a><span>, in § 5.4</span> <li><a href="#valdef-text-justify-none">value for text-justify</a><span>, in § 6.4</span> <li><a href="#valdef-text-transform-none">value for text-transform</a><span>, in § 2.1</span> </ul> <li> normal <ul> <li><a href="#valdef-letter-spacing-normal">value for letter-spacing</a><span>, in § 7.2</span> <li><a href="#valdef-line-break-normal">value for line-break</a><span>, in § 5.3</span> <li><a href="#valdef-overflow-wrap-normal">value for overflow-wrap</a><span>, in § 5.5</span> <li><a href="#valdef-white-space-normal">value for white-space</a><span>, in § 3</span> <li><a href="#valdef-word-break-normal">value for word-break</a><span>, in § 5.2</span> <li><a href="#valdef-word-spacing-normal">value for word-spacing</a><span>, in § 7.1</span> </ul> <li><a href="#valdef-white-space-nowrap">nowrap</a><span>, in § 3</span> <li><a href="#other-space-separators">other space separators</a><span>, in § 4.1</span> <li><a href="#propdef-overflow-wrap">overflow-wrap</a><span>, in § 5.5</span> <li><a href="#valdef-text-indent-percentage"><percentage></a><span>, in § 8.1</span> <li><a href="#valdef-white-space-pre">pre</a><span>, in § 3</span> <li><a href="#valdef-white-space-pre-line">pre-line</a><span>, in § 3</span> <li><a href="#preserved-white-space">preserved</a><span>, in § 3</span> <li><a href="#preserved-white-space">preserved white space</a><span>, in § 3</span> <li><a href="#valdef-white-space-pre-wrap">pre-wrap</a><span>, in § 3</span> <li><a href="#valdef-text-align-right">right</a><span>, in § 6.1</span> <li><a href="#unicode-script">Script property</a><span>, in § Unnumbered section</span> <li><a href="#segment-break">segment break</a><span>, in § 4</span> <li><a href="#kana-small">small</a><span>, in § Unnumbered section</span> <li><a href="#kana-small">small kana</a><span>, in § Unnumbered section</span> <li><a href="#soft-wrap-break">soft wrap break</a><span>, in § 5</span> <li><a href="#soft-wrap-opportunity">soft wrap opportunity</a><span>, in § 5</span> <li><a href="#spaces">spaces</a><span>, in § 4.1</span> <li><a href="#valdef-text-align-start">start</a><span>, in § 6.1</span> <li><a href="#stop-or-comma">stop or comma</a><span>, in § 8.2.1</span> <li><a href="#valdef-line-break-strict">strict</a><span>, in § 5.3</span> <li><a href="#tabs">tabs</a><span>, in § 4.1</span> <li><a href="#tab-size-dfn">tab size</a><span>, in § 4.2</span> <li><a href="#propdef-tab-size">tab-size</a><span>, in § 4.2</span> <li><a href="#tab-stop">tab stop</a><span>, in § 4.1.2</span> <li><a href="#propdef-text-align">text-align</a><span>, in § 6.1</span> <li><a href="#propdef-text-align-all">text-align-all</a><span>, in § 6.2</span> <li><a href="#propdef-text-align-last">text-align-last</a><span>, in § 6.3</span> <li><a href="#propdef-text-indent">text-indent</a><span>, in § 8.1</span> <li><a href="#propdef-text-justify">text-justify</a><span>, in § 6.4</span> <li><a href="#propdef-text-transform">text-transform</a><span>, in § 2.1</span> <li><a href="#tracking">tracking</a><span>, in § 7.2</span> <li><a href="#typographic-character-unit">typographic character</a><span>, in § 1.4</span> <li><a href="#typographic-character-unit">typographic character unit</a><span>, in § 1.4</span> <li><a href="#typographic-letter-unit">typographic letter unit</a><span>, in § 1.4</span> <li><a href="#unicode-general-category">Unicode category</a><span>, in § Unnumbered section</span> <li><a href="#unicode-east-asian-width">Unicode East Asian Width</a><span>, in § Unnumbered section</span> <li><a href="#unicode-general-category">Unicode General Category</a><span>, in § Unnumbered section</span> <li><a href="#unicode-script">Unicode Script</a><span>, in § Unnumbered section</span> <li><a href="#unicode-vertical-orientation">Unicode Vertical Orientation</a><span>, in § Unnumbered section</span> <li><a href="#writing-system-known">unknown</a><span>, in § Unnumbered section</span> <li><a href="#valdef-text-transform-uppercase">uppercase</a><span>, in § 2.1</span> <li><a href="#unicode-vertical-orientation">Vertical Orientation</a><span>, in § Unnumbered section</span> <li><a href="#white-space">white space</a><span>, in § 4.1</span> <li><a href="#propdef-white-space">white-space</a><span>, in § 3</span> <li><a href="#white-space">white space characters</a><span>, in § 4.1</span> <li><a href="#propdef-word-break">word-break</a><span>, in § 5.2</span> <li><a href="#word-separator">word separator</a><span>, in § 7.1</span> <li><a href="#word-separator">word-separator character</a><span>, in § 7.1</span> <li><a href="#propdef-word-spacing">word-spacing</a><span>, in § 7.1</span> <li><a href="#propdef-word-wrap">word-wrap</a><span>, in § 5.5</span> <li><a href="#wrapping">wrap</a><span>, in § 5</span> <li><a href="#wrapping">wrapping</a><span>, in § 5</span> <li><a href="#content-writing-system">writing system</a><span>, in § 1.3</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-BACKGROUNDS-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="e1674793">border</span> </ul> <li> <a data-link-type="biblio">[CSS-BOX-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="253362bb">margin</span> <li><span class="dfn-paneled" id="a3a070bd">padding</span> </ul> <li> <a data-link-type="biblio">[CSS-CASCADE-5]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="d0dc95c3">inherit</span> <li><span class="dfn-paneled" id="4905669f">inherited value</span> <li><span class="dfn-paneled" id="19fd0eed">legacy name alias</span> <li><span class="dfn-paneled" id="7a6ac42f">legacy value alias</span> <li><span class="dfn-paneled" id="980ac56a">shorthand property</span> </ul> <li> <a data-link-type="biblio">[CSS-DISPLAY-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="f2938b9c">atomic inline</span> <li><span class="dfn-paneled" id="f26fdc63">block</span> <li><span class="dfn-paneled" id="05c40e8e">block container</span> <li><span class="dfn-paneled" id="6b4fc208">containing block</span> <li><span class="dfn-paneled" id="2ccfe434">display</span> <li><span class="dfn-paneled" id="d41bfa8c">inline box</span> <li><span class="dfn-paneled" id="c7eac2b9">inline formatting context</span> <li><span class="dfn-paneled" id="06fd3b4c">out-of-flow</span> <li><span class="dfn-paneled" id="8b4f8a45">root element</span> </ul> <li> <a data-link-type="biblio">[CSS-FONTS-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="693c2890">font-feature-settings</span> </ul> <li> <a data-link-type="biblio">[CSS-INLINE-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="ea4fcd78">baseline</span> <li><span class="dfn-paneled" id="a9330658">line box</span> <li><span class="dfn-paneled" id="2d8be2d9">vertical-align</span> </ul> <li> <a data-link-type="biblio">[CSS-OVERFLOW-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="00d2e365">ink overflow</span> <li><span class="dfn-paneled" id="e3488cd0">scrollable overflow</span> </ul> <li> <a data-link-type="biblio">[CSS-PSEUDO-4]</a> defines the following terms: <ul> <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="8fd8cc1b">ruby</span> </ul> <li> <a data-link-type="biblio">[CSS-SIZING-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="de48a940">inner size</span> <li><span class="dfn-paneled" id="3ade8b07">intrinsic size</span> <li><span class="dfn-paneled" id="59e3c405">intrinsic size contribution</span> <li><span class="dfn-paneled" id="7cb1c6db">intrinsic sizing</span> <li><span class="dfn-paneled" id="8a39af7f">max-content size</span> <li><span class="dfn-paneled" id="6a444fd6">min-content size</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="4fd7e54f"><length-percentage></span> <li><span class="dfn-paneled" id="98ddb9b0"><length></span> <li><span class="dfn-paneled" id="61bb5e44"><number></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="4eb9d37e">|</span> <li><span class="dfn-paneled" id="a0336d84">||</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-3]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="fb688f4f">direction</span> <li><span class="dfn-paneled" id="23cd6e75">unicode-bidi</span> </ul> <li> <a data-link-type="biblio">[CSS-WRITING-MODES-4]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="18bb33cd">bidi paragraph</span> <li><span class="dfn-paneled" id="1b250473">bidi-isolate</span> <li><span class="dfn-paneled" id="e112902f">end</span> <li><span class="dfn-paneled" id="9933fc3f">inline base direction</span> <li><span class="dfn-paneled" id="82ddda8c">inline-axis</span> <li><span class="dfn-paneled" id="4f19c3e6">line-left</span> <li><span class="dfn-paneled" id="10d0d189">line-right</span> <li><span class="dfn-paneled" id="99a9e10b">logical width</span> <li><span class="dfn-paneled" id="953ffdad">principal writing mode</span> <li><span class="dfn-paneled" id="90c7548c">start</span> <li><span class="dfn-paneled" id="cec0d4db">upright</span> <li><span class="dfn-paneled" id="37bb38a0">writing-mode</span> </ul> <li> <a data-link-type="biblio">[CSS2]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="f1f51cad">document language</span> </ul> <li> <a data-link-type="biblio">[CSSOM-1]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="bfb148e6">getComputedStyle(elt)</span> <li><span class="dfn-paneled" id="fc19454a">resolved value</span> </ul> <li> <a data-link-type="biblio">[HTML]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="d4dbbbf0">language</span> <li><span class="dfn-paneled" id="90d63fe4">wbr</span> </ul> <li> <a data-link-type="biblio">[INFRA]</a> defines the following terms: <ul> <li><span class="dfn-paneled" id="be82f2e7">normalize newlines</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-backgrounds-3">[CSS-BACKGROUNDS-3] <dd>Elika Etemad; Brad Kemper. <a href="https://www.w3.org/TR/css-backgrounds-3/"><cite>CSS Backgrounds and Borders Module Level 3</cite></a>. 11 March 2024. CR. URL: <a href="https://www.w3.org/TR/css-backgrounds-3/">https://www.w3.org/TR/css-backgrounds-3/</a> <dt id="biblio-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-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-display-3">[CSS-DISPLAY-3] <dd>Elika Etemad; Tab Atkins Jr.. <a href="https://www.w3.org/TR/css-display-3/"><cite>CSS Display Module Level 3</cite></a>. 30 March 2023. CR. URL: <a href="https://www.w3.org/TR/css-display-3/">https://www.w3.org/TR/css-display-3/</a> <dt id="biblio-css-fonts-3">[CSS-FONTS-3] <dd>John Daggett; Myles Maxfield; Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-3/"><cite>CSS Fonts Module Level 3</cite></a>. 20 September 2018. REC. URL: <a href="https://www.w3.org/TR/css-fonts-3/">https://www.w3.org/TR/css-fonts-3/</a> <dt id="biblio-css-fonts-4">[CSS-FONTS-4] <dd>Chris Lilley. <a href="https://www.w3.org/TR/css-fonts-4/"><cite>CSS Fonts Module Level 4</cite></a>. 1 February 2024. WD. URL: <a href="https://www.w3.org/TR/css-fonts-4/">https://www.w3.org/TR/css-fonts-4/</a> <dt id="biblio-css-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-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-sizing-3">[CSS-SIZING-3] <dd>Tab Atkins Jr.; Elika Etemad. <a href="https://www.w3.org/TR/css-sizing-3/"><cite>CSS Box Sizing Module Level 3</cite></a>. 17 December 2021. WD. URL: <a href="https://www.w3.org/TR/css-sizing-3/">https://www.w3.org/TR/css-sizing-3/</a> <dt id="biblio-css-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-cssom-1">[CSSOM-1] <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-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-infra">[INFRA] <dd>Anne van Kesteren; Domenic Denicola. <a href="https://infra.spec.whatwg.org/"><cite>Infra Standard</cite></a>. Living Standard. URL: <a href="https://infra.spec.whatwg.org/">https://infra.spec.whatwg.org/</a> <dt id="biblio-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-uax11">[UAX11] <dd>Ken Lunde 小林劍󠄁. <a href="https://www.unicode.org/reports/tr11/tr11-41.html"><cite>East Asian Width</cite></a>. 17 July 2023. Unicode Standard Annex #11. URL: <a href="https://www.unicode.org/reports/tr11/tr11-41.html">https://www.unicode.org/reports/tr11/tr11-41.html</a> <dt id="biblio-uax14">[UAX14] <dd>Robin Leroy. <a href="https://www.unicode.org/reports/tr14/tr14-51.html"><cite>Unicode Line Breaking Algorithm</cite></a>. 15 August 2023. Unicode Standard Annex #14. URL: <a href="https://www.unicode.org/reports/tr14/tr14-51.html">https://www.unicode.org/reports/tr14/tr14-51.html</a> <dt id="biblio-uax24">[UAX24] <dd>Ken Whistler. <a href="https://www.unicode.org/reports/tr24/tr24-36.html"><cite>Unicode Script Property</cite></a>. 14 August 2023. Unicode Standard Annex #24. URL: <a href="https://www.unicode.org/reports/tr24/tr24-36.html">https://www.unicode.org/reports/tr24/tr24-36.html</a> <dt id="biblio-uax29">[UAX29] <dd>Josh Hadley. <a href="https://www.unicode.org/reports/tr29/tr29-43.html"><cite>Unicode Text Segmentation</cite></a>. 16 August 2023. Unicode Standard Annex #29. URL: <a href="https://www.unicode.org/reports/tr29/tr29-43.html">https://www.unicode.org/reports/tr29/tr29-43.html</a> <dt id="biblio-uax44">[UAX44] <dd>Ken Whistler. <a href="https://www.unicode.org/reports/tr44/tr44-32.html"><cite>Unicode Character Database</cite></a>. 6 September 2023. Unicode Standard Annex #44. URL: <a href="https://www.unicode.org/reports/tr44/tr44-32.html">https://www.unicode.org/reports/tr44/tr44-32.html</a> <dt id="biblio-uax50">[UAX50] <dd>Ken Lunde 小林劍󠄁; Koji Ishii 石井宏治. <a href="https://www.unicode.org/reports/tr50/tr50-29.html"><cite>Unicode Vertical Text Layout</cite></a>. 17 July 2023. Unicode Standard Annex #50. URL: <a href="https://www.unicode.org/reports/tr50/tr50-29.html">https://www.unicode.org/reports/tr50/tr50-29.html</a> <dt id="biblio-uax9">[UAX9] <dd>Manish Goregaokar मनीष गोरेगांवकर; Robin Leroy. <a href="https://www.unicode.org/reports/tr9/tr9-48.html"><cite>Unicode Bidirectional Algorithm</cite></a>. 15 August 2023. Unicode Standard Annex #9. URL: <a href="https://www.unicode.org/reports/tr9/tr9-48.html">https://www.unicode.org/reports/tr9/tr9-48.html</a> <dt id="biblio-unicode">[UNICODE] <dd><a href="https://www.unicode.org/versions/latest/"><cite>The Unicode Standard</cite></a>. URL: <a href="https://www.unicode.org/versions/latest/">https://www.unicode.org/versions/latest/</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-bcp47">[BCP47] <dd>A. Phillips, Ed.; M. Davis, Ed.. <a href="https://www.rfc-editor.org/rfc/rfc5646"><cite>Tags for Identifying Languages</cite></a>. September 2009. Best Current Practice. URL: <a href="https://www.rfc-editor.org/rfc/rfc5646">https://www.rfc-editor.org/rfc/rfc5646</a> <dt id="biblio-clreq">[CLREQ] <dd>Fuqiao Xue; Richard Ishida. <a href="https://www.w3.org/TR/clreq/"><cite>Requirements for Chinese Text Layout - 中文排版需求</cite></a>. 1 July 2024. NOTE. URL: <a href="https://www.w3.org/TR/clreq/">https://www.w3.org/TR/clreq/</a> <dt id="biblio-css-text-decor-3">[CSS-TEXT-DECOR-3] <dd>Elika Etemad; Koji Ishii. <a href="https://www.w3.org/TR/css-text-decor-3/"><cite>CSS Text Decoration Module Level 3</cite></a>. 5 May 2022. CR. URL: <a href="https://www.w3.org/TR/css-text-decor-3/">https://www.w3.org/TR/css-text-decor-3/</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-ilreq">[ILREQ] <dd>Swaran Lata. <a href="https://www.w3.org/TR/ilreq/"><cite>Indic Layout Requirements</cite></a>. 29 May 2020. WD. URL: <a href="https://www.w3.org/TR/ilreq/">https://www.w3.org/TR/ilreq/</a> <dt id="biblio-iso15924">[ISO15924] <dd><cite>Code for the representation of names of scripts.</cite> International Organization for Standardization. 1998. ISO 15924:1998. Draft International Standard <dt id="biblio-jis4051">[JIS4051] <dd><cite>Formatting rules for Japanese documents (『日本語文書の組版方法』).</cite> Japanese Standards Association. 2004. JIS X 4051:2004. In Japanese <dt id="biblio-jlreq">[JLREQ] <dd>Hiroyuki Chiba; et al. <a href="https://www.w3.org/TR/jlreq/"><cite>Requirements for Japanese Text Layout 日本語組版処理の要件(日本語版)</cite></a>. 11 August 2020. NOTE. URL: <a href="https://www.w3.org/TR/jlreq/">https://www.w3.org/TR/jlreq/</a> <dt id="biblio-justify">[JUSTIFY] <dd>Elika Etemad; Richard Ishida. <a href="https://www.w3.org/International/articles/typography/justification"><cite>Approches to Full Justification</cite></a>. URL: <a href="https://www.w3.org/International/articles/typography/justification">https://www.w3.org/International/articles/typography/justification</a> <dt id="biblio-rfc6919">[RFC6919] <dd>R. Barnes; S. Kent; E. Rescorla. <a href="https://www.rfc-editor.org/rfc/rfc6919"><cite>Further Key Words for Use in RFCs to Indicate Requirement Levels</cite></a>. 1 April 2013. Experimental. URL: <a href="https://www.rfc-editor.org/rfc/rfc6919">https://www.rfc-editor.org/rfc/rfc6919</a> <dt id="biblio-typography">[TYPOGRAPHY] <dd>Richard Ishida. <a href="https://www.w3.org/TR/typography/"><cite>Language enablement index</cite></a>. 15 August 2024. NOTE. URL: <a href="https://www.w3.org/TR/typography/">https://www.w3.org/TR/typography/</a> <dt id="biblio-xml10">[XML10] <dd>Tim Bray; et al. <a href="https://www.w3.org/TR/xml/"><cite>Extensible Markup Language (XML) 1.0 (Fifth Edition)</cite></a>. 26 November 2008. REC. URL: <a href="https://www.w3.org/TR/xml/">https://www.w3.org/TR/xml/</a> <dt id="biblio-zhmark">[ZHMARK] <dd><cite>General Rules for Punctuation (《标点符号用法》).</cite> 2011. GB/T 15834―2011. In Chinese. </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 <tbody> <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-hanging-punctuation" id="ref-for-propdef-hanging-punctuation⑥">hanging-punctuation</a> <td>none | [ first || [ force-end | allow-end ] || last ] <td>none <td>text <td>yes <td>n/a <td>discrete <td>per grammar <td>specified keyword(s) <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-hyphens" id="ref-for-propdef-hyphens④">hyphens</a> <td>none | manual | auto <td>manual <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-letter-spacing" id="ref-for-propdef-letter-spacing①⑧">letter-spacing</a> <td>normal | <length> <td>normal <td>inline boxes and text <td>yes <td>n/a <td>by computed value type <td>n/a <td>an absolute length <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-line-break" id="ref-for-propdef-line-break①①">line-break</a> <td>auto | loose | normal | strict | anywhere <td>auto <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-overflow-wrap" id="ref-for-propdef-overflow-wrap①⓪">overflow-wrap</a> <td>normal | break-word | anywhere <td>normal <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-tab-size" id="ref-for-propdef-tab-size③">tab-size</a> <td><number [0,∞]> | <length [0,∞]> <td>8 <td>text <td>yes <td>n/a <td>by computed value type <td>n/a <td>the specified number or absolute length <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-align" id="ref-for-propdef-text-align⑨">text-align</a> <td>start | end | left | right | center | justify | match-parent | justify-all <td>start <td>block containers <td>yes <td>see individual properties <td>discrete <td>n/a <td>see individual properties <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-align-all" id="ref-for-propdef-text-align-all⑧">text-align-all</a> <td>start | end | left | right | center | justify | match-parent <td>start <td>block containers <td>yes <td>n/a <td>discrete <td>n/a <td>keyword as specified, except for match-parent which computes as defined above <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-align-last" id="ref-for-propdef-text-align-last①①">text-align-last</a> <td>auto | start | end | left | right | center | justify | match-parent <td>auto <td>block containers <td>yes <td>n/a <td>discrete <td>n/a <td>keyword as specified, except for match-parent which computes as defined above <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-indent" id="ref-for-propdef-text-indent⑧">text-indent</a> <td>[ <length-percentage> ] && hanging? && each-line? <td>0 <td>block containers <td>yes <td>refers to block container’s own inline-axis inner size <td>by computed value type <td>per grammar <td>computed <length-percentage> value, plus any specified keywords <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-justify" id="ref-for-propdef-text-justify①⓪">text-justify</a> <td>auto | none | inter-word | inter-character <td>auto <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword (except for the distribute legacy value) <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-text-transform" id="ref-for-propdef-text-transform①②">text-transform</a> <td>none | [capitalize | uppercase | lowercase ] || full-width || full-size-kana <td>none <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-white-space" id="ref-for-propdef-white-space②①">white-space</a> <td>normal | pre | nowrap | pre-wrap | break-spaces | pre-line <td>normal <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-word-break" id="ref-for-propdef-word-break②⓪">word-break</a> <td>normal | keep-all | break-all | break-word <td>normal <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-word-spacing" id="ref-for-propdef-word-spacing⑧">word-spacing</a> <td>normal | <length> <td>normal <td>text <td>yes <td>N/A <td>by computed value type <td>n/a <td>an absolute length <tr> <th scope="row"><a class="css" data-link-type="property" href="#propdef-word-wrap" id="ref-for-propdef-word-wrap②">word-wrap</a> <td>normal | break-word | anywhere <td>normal <td>text <td>yes <td>n/a <td>discrete <td>n/a <td>specified keyword </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 = { "00d2e365": {"dfnID":"00d2e365","dfnText":"ink overflow","external":true,"refSections":[{"refs":[{"id":"ref-for-ink-overflow"}],"title":"8.2. \nHanging Glyphs"}],"url":"https://www.w3.org/TR/css-overflow-3/#ink-overflow"}, "05c40e8e": {"dfnID":"05c40e8e","dfnText":"block container","external":true,"refSections":[{"refs":[{"id":"ref-for-block-container"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-block-container\u2460"}],"title":"4.2. \nTab Character Size: the tab-size property"}],"url":"https://www.w3.org/TR/css-display-3/#block-container"}, "06fd3b4c": {"dfnID":"06fd3b4c","dfnText":"out-of-flow","external":true,"refSections":[{"refs":[{"id":"ref-for-out-of-flow"}],"title":"1.5. \nText Processing"}],"url":"https://www.w3.org/TR/css-display-3/#out-of-flow"}, "10d0d189": {"dfnID":"10d0d189","dfnText":"line-right","external":true,"refSections":[{"refs":[{"id":"ref-for-line-right"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#line-right"}, "18bb33cd": {"dfnID":"18bb33cd","dfnText":"bidi paragraph","external":true,"refSections":[{"refs":[{"id":"ref-for-bidi-paragraph"},{"id":"ref-for-bidi-paragraph\u2460"},{"id":"ref-for-bidi-paragraph\u2461"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#bidi-paragraph"}, "19fd0eed": {"dfnID":"19fd0eed","dfnText":"legacy name alias","external":true,"refSections":[{"refs":[{"id":"ref-for-legacy-name-alias"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"}],"url":"https://www.w3.org/TR/css-cascade-5/#legacy-name-alias"}, "1b250473": {"dfnID":"1b250473","dfnText":"bidi-isolate","external":true,"refSections":[{"refs":[{"id":"ref-for-bidi-isolate"}],"title":"7.3. \nShaping Across Element Boundaries"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#bidi-isolate"}, "23cd6e75": {"dfnID":"23cd6e75","dfnText":"unicode-bidi","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-unicode-bidi"},{"id":"ref-for-propdef-unicode-bidi\u2460"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-writing-modes-3/#propdef-unicode-bidi"}, "253362bb": {"dfnID":"253362bb","dfnText":"margin","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-margin"}],"title":"7.3. \nShaping Across Element Boundaries"}],"url":"https://www.w3.org/TR/css-box-4/#propdef-margin"}, "2ccfe434": {"dfnID":"2ccfe434","dfnText":"display","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-display"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"},{"refs":[{"id":"ref-for-propdef-display\u2460"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-display-3/#propdef-display"}, "2d8be2d9": {"dfnID":"2d8be2d9","dfnText":"vertical-align","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-vertical-align"}],"title":"7.3. \nShaping Across Element Boundaries"}],"url":"https://www.w3.org/TR/css-inline-3/#propdef-vertical-align"}, "37bb38a0": {"dfnID":"37bb38a0","dfnText":"writing-mode","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-writing-mode"},{"id":"ref-for-propdef-writing-mode\u2460"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode"}, "3ade8b07": {"dfnID":"3ade8b07","dfnText":"intrinsic size","external":true,"refSections":[{"refs":[{"id":"ref-for-intrinsic-size"}],"title":"8.2. \nHanging Glyphs"}],"url":"https://www.w3.org/TR/css-sizing-3/#intrinsic-size"}, "4905669f": {"dfnID":"4905669f","dfnText":"inherited value","external":true,"refSections":[{"refs":[{"id":"ref-for-inherited-value"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"https://www.w3.org/TR/css-cascade-5/#inherited-value"}, "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"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"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"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-comb-one\u2467"}],"title":"4.2. \nTab Character Size: the tab-size property"},{"refs":[{"id":"ref-for-comb-one\u2468"},{"id":"ref-for-comb-one\u2460\u24ea"},{"id":"ref-for-comb-one\u2460\u2460"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"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"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2465"},{"id":"ref-for-comb-one\u2460\u2466"}],"title":"5.4. \nHyphenation: the hyphens property"},{"refs":[{"id":"ref-for-comb-one\u2460\u2467"},{"id":"ref-for-comb-one\u2460\u2468"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"},{"refs":[{"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":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-comb-one\u2461\u2466"},{"id":"ref-for-comb-one\u2461\u2467"},{"id":"ref-for-comb-one\u2461\u2468"},{"id":"ref-for-comb-one\u2462\u24ea"},{"id":"ref-for-comb-one\u2462\u2460"},{"id":"ref-for-comb-one\u2462\u2461"}],"title":"6.2. \nDefault Text Alignment: the text-align-all property"},{"refs":[{"id":"ref-for-comb-one\u2462\u2462"},{"id":"ref-for-comb-one\u2462\u2463"},{"id":"ref-for-comb-one\u2462\u2464"},{"id":"ref-for-comb-one\u2462\u2465"},{"id":"ref-for-comb-one\u2462\u2466"},{"id":"ref-for-comb-one\u2462\u2467"},{"id":"ref-for-comb-one\u2462\u2468"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-comb-one\u2463\u24ea"},{"id":"ref-for-comb-one\u2463\u2460"},{"id":"ref-for-comb-one\u2463\u2461"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-comb-one\u2463\u2462"}],"title":"7.1. \nWord Spacing: the word-spacing property"},{"refs":[{"id":"ref-for-comb-one\u2463\u2463"}],"title":"7.2. \nTracking: the letter-spacing property"},{"refs":[{"id":"ref-for-comb-one\u2463\u2464"},{"id":"ref-for-comb-one\u2463\u2465"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"}],"url":"https://www.w3.org/TR/css-values-4/#comb-one"}, "4f19c3e6": {"dfnID":"4f19c3e6","dfnText":"line-left","external":true,"refSections":[{"refs":[{"id":"ref-for-line-left"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#line-left"}, "4fd7e54f": {"dfnID":"4fd7e54f","dfnText":"<length-percentage>","external":true,"refSections":[{"refs":[{"id":"ref-for-typedef-length-percentage"},{"id":"ref-for-typedef-length-percentage\u2460"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"https://www.w3.org/TR/css-values-4/#typedef-length-percentage"}, "59e3c405": {"dfnID":"59e3c405","dfnText":"intrinsic size contribution","external":true,"refSections":[{"refs":[{"id":"ref-for-intrinsic-size-contribution"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"https://www.w3.org/TR/css-sizing-3/#intrinsic-size-contribution"}, "61bb5e44": {"dfnID":"61bb5e44","dfnText":"<number>","external":true,"refSections":[{"refs":[{"id":"ref-for-number-value"},{"id":"ref-for-number-value\u2460"}],"title":"4.2. \nTab Character Size: the tab-size property"}],"url":"https://www.w3.org/TR/css-values-4/#number-value"}, "693c2890": {"dfnID":"693c2890","dfnText":"font-feature-settings","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-font-feature-settings"}],"title":"7.2. \nTracking: the letter-spacing property"}],"url":"https://www.w3.org/TR/css-fonts-4/#propdef-font-feature-settings"}, "6a444fd6": {"dfnID":"6a444fd6","dfnText":"min-content size","external":true,"refSections":[{"refs":[{"id":"ref-for-min-content"}],"title":"5.4. \nHyphenation: the hyphens property"},{"refs":[{"id":"ref-for-min-content\u2460"},{"id":"ref-for-min-content\u2461"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"},{"refs":[{"id":"ref-for-min-content\u2462"},{"id":"ref-for-min-content\u2463"}],"title":"8.2. \nHanging Glyphs"}],"url":"https://www.w3.org/TR/css-sizing-3/#min-content"}, "6b4fc208": {"dfnID":"6b4fc208","dfnText":"containing block","external":true,"refSections":[{"refs":[{"id":"ref-for-containing-block"},{"id":"ref-for-containing-block\u2460"},{"id":"ref-for-containing-block\u2461"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-display-3/#containing-block"}, "7a6ac42f": {"dfnID":"7a6ac42f","dfnText":"legacy value alias","external":true,"refSections":[{"refs":[{"id":"ref-for-css-legacy-value-alias"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-css-legacy-value-alias\u2460"}],"title":"\nRecent Changes"}],"url":"https://www.w3.org/TR/css-cascade-5/#css-legacy-value-alias"}, "7cb1c6db": {"dfnID":"7cb1c6db","dfnText":"intrinsic sizing","external":true,"refSections":[{"refs":[{"id":"ref-for-intrinsic-sizing"}],"title":"3. \nWhite Space and Wrapping: the white-space property"}],"url":"https://www.w3.org/TR/css-sizing-3/#intrinsic-sizing"}, "82ddda8c": {"dfnID":"82ddda8c","dfnText":"inline-axis","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-axis"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#inline-axis"}, "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"}, "8a39af7f": {"dfnID":"8a39af7f","dfnText":"max-content size","external":true,"refSections":[{"refs":[{"id":"ref-for-max-content"},{"id":"ref-for-max-content\u2460"}],"title":"8.2. \nHanging Glyphs"}],"url":"https://www.w3.org/TR/css-sizing-3/#max-content"}, "8b4f8a45": {"dfnID":"8b4f8a45","dfnText":"root element","external":true,"refSections":[{"refs":[{"id":"ref-for-root-element"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-root-element\u2460"}],"title":"\nRecent Changes"}],"url":"https://www.w3.org/TR/css-display-3/#root-element"}, "8fd8cc1b": {"dfnID":"8fd8cc1b","dfnText":"ruby","external":true,"refSections":[{"refs":[{"id":"ref-for-ruby"}],"title":"2.1. \nCase Transforms: the text-transform property"}],"url":"https://www.w3.org/TR/css-ruby-1/#ruby"}, "90c7548c": {"dfnID":"90c7548c","dfnText":"start","external":true,"refSections":[{"refs":[{"id":"ref-for-start"},{"id":"ref-for-start\u2460"},{"id":"ref-for-start\u2461"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-start\u2462"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"},{"refs":[{"id":"ref-for-start\u2463"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#start"}, "90d63fe4": {"dfnID":"90d63fe4","dfnText":"wbr","external":true,"refSections":[{"refs":[{"id":"ref-for-the-wbr-element"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"}],"url":"https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element"}, "953ffdad": {"dfnID":"953ffdad","dfnText":"principal writing mode","external":true,"refSections":[{"refs":[{"id":"ref-for-principal-writing-mode"}],"title":"\nRecent Changes"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#principal-writing-mode"}, "980ac56a": {"dfnID":"980ac56a","dfnText":"shorthand property","external":true,"refSections":[{"refs":[{"id":"ref-for-shorthand-property"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-shorthand-property\u2460"}],"title":"6.2. \nDefault Text Alignment: the text-align-all property"}],"url":"https://www.w3.org/TR/css-cascade-5/#shorthand-property"}, "98ddb9b0": {"dfnID":"98ddb9b0","dfnText":"<length>","external":true,"refSections":[{"refs":[{"id":"ref-for-length-value"}],"title":"4.2. \nTab Character Size: the tab-size property"},{"refs":[{"id":"ref-for-length-value\u2460"}],"title":"7.1. \nWord Spacing: the word-spacing property"},{"refs":[{"id":"ref-for-length-value\u2461"}],"title":"7.2. \nTracking: the letter-spacing property"}],"url":"https://www.w3.org/TR/css-values-4/#length-value"}, "9933fc3f": {"dfnID":"9933fc3f","dfnText":"inline base direction","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-base-direction"},{"id":"ref-for-inline-base-direction\u2460"},{"id":"ref-for-inline-base-direction\u2461"},{"id":"ref-for-inline-base-direction\u2462"},{"id":"ref-for-inline-base-direction\u2463"},{"id":"ref-for-inline-base-direction\u2464"},{"id":"ref-for-inline-base-direction\u2465"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#inline-base-direction"}, "99a0ef70": {"dfnID":"99a0ef70","dfnText":"first formatted line","external":true,"refSections":[{"refs":[{"id":"ref-for-first-formatted-line"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"},{"refs":[{"id":"ref-for-first-formatted-line\u2460"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"},{"refs":[{"id":"ref-for-first-formatted-line\u2461"}],"title":"\nRecent Changes"}],"url":"https://www.w3.org/TR/css-pseudo-4/#first-formatted-line"}, "99a9e10b": {"dfnID":"99a9e10b","dfnText":"logical width","external":true,"refSections":[{"refs":[{"id":"ref-for-logical-width"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#logical-width"}, "a0336d84": {"dfnID":"a0336d84","dfnText":"||","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-any"},{"id":"ref-for-comb-any\u2460"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-comb-any\u2461"},{"id":"ref-for-comb-any\u2462"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"}],"url":"https://www.w3.org/TR/css-values-4/#comb-any"}, "a3a070bd": {"dfnID":"a3a070bd","dfnText":"padding","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-padding"}],"title":"7.3. \nShaping Across Element Boundaries"}],"url":"https://www.w3.org/TR/css-box-4/#propdef-padding"}, "a9330658": {"dfnID":"a9330658","dfnText":"line box","external":true,"refSections":[{"refs":[{"id":"ref-for-line-box"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-line-box\u2460"},{"id":"ref-for-line-box\u2461"},{"id":"ref-for-line-box\u2462"},{"id":"ref-for-line-box\u2463"},{"id":"ref-for-line-box\u2464"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-inline-3/#line-box"}, "bdb4e757": {"dfnID":"bdb4e757","dfnText":"&&","external":true,"refSections":[{"refs":[{"id":"ref-for-comb-all"},{"id":"ref-for-comb-all\u2460"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"https://www.w3.org/TR/css-values-4/#comb-all"}, "be82f2e7": {"dfnID":"be82f2e7","dfnText":"normalize newlines","external":true,"refSections":[{"refs":[{"id":"ref-for-normalize-newlines"},{"id":"ref-for-normalize-newlines\u2460"}],"title":"4. \nWhite Space Processing & Control Characters"}],"url":"https://infra.spec.whatwg.org/#normalize-newlines"}, "bfb148e6": {"dfnID":"bfb148e6","dfnText":"getComputedStyle(elt)","external":true,"refSections":[{"refs":[{"id":"ref-for-dom-window-getcomputedstyle"}],"title":"7.2. \nTracking: the letter-spacing property"}],"url":"https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle"}, "bidi-formatting-characters": {"dfnID":"bidi-formatting-characters","dfnText":"bidi formatting characters","external":false,"refSections":[],"url":"#bidi-formatting-characters"}, "block-scripts": {"dfnID":"block-scripts","dfnText":"block scripts","external":false,"refSections":[{"refs":[{"id":"ref-for-block-scripts"},{"id":"ref-for-block-scripts\u2460"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"}],"url":"#block-scripts"}, "c7eac2b9": {"dfnID":"c7eac2b9","dfnText":"inline formatting context","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-formatting-context"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"}],"url":"https://www.w3.org/TR/css-display-3/#inline-formatting-context"}, "cec0d4db": {"dfnID":"cec0d4db","dfnText":"upright","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-text-orientation-upright"}],"title":"1.4. \nCharacters and Letters"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright"}, "character": {"dfnID":"character","dfnText":"character","external":false,"refSections":[{"refs":[{"id":"ref-for-character"},{"id":"ref-for-character\u2460"},{"id":"ref-for-character\u2461"},{"id":"ref-for-character\u2462"},{"id":"ref-for-character\u2463"},{"id":"ref-for-character\u2464"},{"id":"ref-for-character\u2465"},{"id":"ref-for-character\u2466"},{"id":"ref-for-character\u2467"},{"id":"ref-for-character\u2468"},{"id":"ref-for-character\u2460\u24ea"}],"title":"1.4. \nCharacters and Letters"},{"refs":[{"id":"ref-for-character\u2460\u2460"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"}],"url":"#character"}, "clustered-scripts": {"dfnID":"clustered-scripts","dfnText":"clustered scripts","external":false,"refSections":[{"refs":[{"id":"ref-for-clustered-scripts"},{"id":"ref-for-clustered-scripts\u2460"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"}],"url":"#clustered-scripts"}, "collapsible-white-space": {"dfnID":"collapsible-white-space","dfnText":"collapsible","external":false,"refSections":[{"refs":[{"id":"ref-for-collapsible-white-space"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-collapsible-white-space\u2460"},{"id":"ref-for-collapsible-white-space\u2461"},{"id":"ref-for-collapsible-white-space\u2462"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-collapsible-white-space\u2463"},{"id":"ref-for-collapsible-white-space\u2464"},{"id":"ref-for-collapsible-white-space\u2465"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-collapsible-white-space\u2466"},{"id":"ref-for-collapsible-white-space\u2467"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-collapsible-white-space\u2468"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-collapsible-white-space\u2460\u24ea"}],"title":"\nAppendix B:\nConversion to Plaintext"}],"url":"#collapsible-white-space"}, "conditionally-hang": {"dfnID":"conditionally-hang","dfnText":"conditionally hang","external":false,"refSections":[{"refs":[{"id":"ref-for-conditionally-hang"},{"id":"ref-for-conditionally-hang\u2460"},{"id":"ref-for-conditionally-hang\u2461"},{"id":"ref-for-conditionally-hang\u2462"},{"id":"ref-for-conditionally-hang\u2463"},{"id":"ref-for-conditionally-hang\u2464"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-conditionally-hang\u2465"}],"title":"8.2. \nHanging Glyphs"},{"refs":[{"id":"ref-for-conditionally-hang\u2466"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"}],"url":"#conditionally-hang"}, "content-language": {"dfnID":"content-language","dfnText":"content language","external":false,"refSections":[{"refs":[{"id":"ref-for-content-language"},{"id":"ref-for-content-language\u2460"},{"id":"ref-for-content-language\u2461"},{"id":"ref-for-content-language\u2462"},{"id":"ref-for-content-language\u2463"},{"id":"ref-for-content-language\u2464"}],"title":"1.3. \nLanguages and Typesetting"},{"refs":[{"id":"ref-for-content-language\u2465"},{"id":"ref-for-content-language\u2466"}],"title":"2.1.1. \nMapping Rules"},{"refs":[{"id":"ref-for-content-language\u2467"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-content-language\u2468"},{"id":"ref-for-content-language\u2460\u24ea"}],"title":"5.4. \nHyphenation: the hyphens property"},{"refs":[{"id":"ref-for-content-language\u2460\u2460"},{"id":"ref-for-content-language\u2460\u2461"},{"id":"ref-for-content-language\u2460\u2462"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-content-language\u2460\u2463"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"},{"refs":[{"id":"ref-for-content-language\u2460\u2464"},{"id":"ref-for-content-language\u2460\u2465"},{"id":"ref-for-content-language\u2460\u2466"},{"id":"ref-for-content-language\u2460\u2467"},{"id":"ref-for-content-language\u2460\u2468"},{"id":"ref-for-content-language\u2461\u24ea"},{"id":"ref-for-content-language\u2461\u2460"},{"id":"ref-for-content-language\u2461\u2461"},{"id":"ref-for-content-language\u2461\u2462"},{"id":"ref-for-content-language\u2461\u2463"}],"title":"\nAppendix F:\nIdentifying the Content Writing System"}],"url":"#content-language"}, "content-writing-system": {"dfnID":"content-writing-system","dfnText":"content writing system","external":false,"refSections":[{"refs":[{"id":"ref-for-content-writing-system"}],"title":"2.1.1. \nMapping Rules"},{"refs":[{"id":"ref-for-content-writing-system\u2460"},{"id":"ref-for-content-writing-system\u2461"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-content-writing-system\u2462"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-content-writing-system\u2463"}],"title":"\nAppendix D:\nScripts and Spacing"},{"refs":[{"id":"ref-for-content-writing-system\u2464"},{"id":"ref-for-content-writing-system\u2465"},{"id":"ref-for-content-writing-system\u2466"},{"id":"ref-for-content-writing-system\u2467"},{"id":"ref-for-content-writing-system\u2468"},{"id":"ref-for-content-writing-system\u2460\u24ea"},{"id":"ref-for-content-writing-system\u2460\u2460"},{"id":"ref-for-content-writing-system\u2460\u2461"},{"id":"ref-for-content-writing-system\u2460\u2462"},{"id":"ref-for-content-writing-system\u2460\u2463"},{"id":"ref-for-content-writing-system\u2460\u2464"},{"id":"ref-for-content-writing-system\u2460\u2465"}],"title":"\nAppendix F:\nIdentifying the Content Writing System"}],"url":"#content-writing-system"}, "cursive-script": {"dfnID":"cursive-script","dfnText":"cursive scripts","external":false,"refSections":[{"refs":[{"id":"ref-for-cursive-script"},{"id":"ref-for-cursive-script\u2460"}],"title":"6.4.4. \nCursive Scripts"},{"refs":[{"id":"ref-for-cursive-script\u2461"},{"id":"ref-for-cursive-script\u2462"}],"title":"7.2.1. \nCursive Scripts"},{"refs":[{"id":"ref-for-cursive-script\u2463"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#cursive-script"}, "d0dc95c3": {"dfnID":"d0dc95c3","dfnText":"inherit","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-all-inherit"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit"}, "d41bfa8c": {"dfnID":"d41bfa8c","dfnText":"inline box","external":true,"refSections":[{"refs":[{"id":"ref-for-inline-box"}],"title":"1.5. \nText Processing"},{"refs":[{"id":"ref-for-inline-box\u2460"}],"title":"7.2. \nTracking: the letter-spacing property"},{"refs":[{"id":"ref-for-inline-box\u2461"}],"title":"8.2. \nHanging Glyphs"}],"url":"https://www.w3.org/TR/css-display-3/#inline-box"}, "d4441b24": {"dfnID":"d4441b24","dfnText":"?","external":true,"refSections":[{"refs":[{"id":"ref-for-mult-opt"},{"id":"ref-for-mult-opt\u2460"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"https://www.w3.org/TR/css-values-4/#mult-opt"}, "d4dbbbf0": {"dfnID":"d4dbbbf0","dfnText":"language","external":true,"refSections":[{"refs":[{"id":"ref-for-language"}],"title":"1.3. \nLanguages and Typesetting"}],"url":"https://html.spec.whatwg.org/multipage/dom.html#language"}, "de48a940": {"dfnID":"de48a940","dfnText":"inner size","external":true,"refSections":[{"refs":[{"id":"ref-for-inner-size"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"https://www.w3.org/TR/css-sizing-3/#inner-size"}, "e112902f": {"dfnID":"e112902f","dfnText":"end","external":true,"refSections":[{"refs":[{"id":"ref-for-end"},{"id":"ref-for-end\u2460"},{"id":"ref-for-end\u2461"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-end\u2462"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-writing-modes-4/#end"}, "e1674793": {"dfnID":"e1674793","dfnText":"border","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-border"}],"title":"7.3. \nShaping Across Element Boundaries"}],"url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-border"}, "e3488cd0": {"dfnID":"e3488cd0","dfnText":"scrollable overflow","external":true,"refSections":[{"refs":[{"id":"ref-for-scrollable-overflow"},{"id":"ref-for-scrollable-overflow\u2460"}],"title":"8.2. \nHanging Glyphs"}],"url":"https://www.w3.org/TR/css-overflow-3/#scrollable-overflow"}, "ea4fcd78": {"dfnID":"ea4fcd78","dfnText":"baseline","external":true,"refSections":[{"refs":[{"id":"ref-for-valdef-alignment-baseline-baseline"}],"title":"7.3. \nShaping Across Element Boundaries"}],"url":"https://www.w3.org/TR/css-inline-3/#valdef-alignment-baseline-baseline"}, "f1f51cad": {"dfnID":"f1f51cad","dfnText":"document language","external":true,"refSections":[{"refs":[{"id":"ref-for-doclanguage"},{"id":"ref-for-doclanguage\u2460"},{"id":"ref-for-doclanguage\u2461"}],"title":"1.3. \nLanguages and Typesetting"},{"refs":[{"id":"ref-for-doclanguage\u2462"}],"title":"2.1.1. \nMapping Rules"},{"refs":[{"id":"ref-for-doclanguage\u2463"}],"title":"\nAppendix F:\nIdentifying the Content Writing System"}],"url":"https://www.w3.org/TR/CSS21/conform.html#doclanguage"}, "f26fdc63": {"dfnID":"f26fdc63","dfnText":"block","external":true,"refSections":[{"refs":[{"id":"ref-for-block"}],"title":"\nAppendix B:\nConversion to Plaintext"}],"url":"https://www.w3.org/TR/css-display-3/#block"}, "f2938b9c": {"dfnID":"f2938b9c","dfnText":"atomic inline","external":true,"refSections":[{"refs":[{"id":"ref-for-atomic-inline"},{"id":"ref-for-atomic-inline\u2460"},{"id":"ref-for-atomic-inline\u2461"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-atomic-inline\u2462"}],"title":"7.2. \nTracking: the letter-spacing property"},{"refs":[{"id":"ref-for-atomic-inline\u2463"}],"title":"8.3. \nBidirectionality and Line Boxes"},{"refs":[{"id":"ref-for-atomic-inline\u2464"},{"id":"ref-for-atomic-inline\u2465"},{"id":"ref-for-atomic-inline\u2466"}],"title":"\nRecent Changes"}],"url":"https://www.w3.org/TR/css-display-3/#atomic-inline"}, "fb688f4f": {"dfnID":"fb688f4f","dfnText":"direction","external":true,"refSections":[{"refs":[{"id":"ref-for-propdef-direction"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-propdef-direction\u2460"},{"id":"ref-for-propdef-direction\u2461"},{"id":"ref-for-propdef-direction\u2462"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"https://www.w3.org/TR/css-writing-modes-3/#propdef-direction"}, "fc19454a": {"dfnID":"fc19454a","dfnText":"resolved value","external":true,"refSections":[{"refs":[{"id":"ref-for-resolved-value"}],"title":"7.2. \nTracking: the letter-spacing property"}],"url":"https://www.w3.org/TR/cssom-1/#resolved-value"}, "forced-line-break": {"dfnID":"forced-line-break","dfnText":"forced line break","external":false,"refSections":[{"refs":[{"id":"ref-for-forced-line-break"},{"id":"ref-for-forced-line-break\u2460"},{"id":"ref-for-forced-line-break\u2461"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-forced-line-break\u2462"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-forced-line-break\u2463"},{"id":"ref-for-forced-line-break\u2464"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-forced-line-break\u2465"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-forced-line-break\u2466"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"},{"refs":[{"id":"ref-for-forced-line-break\u2467"}],"title":"\nAppendix B:\nConversion to Plaintext"}],"url":"#forced-line-break"}, "full-width": {"dfnID":"full-width","dfnText":"full-width","external":false,"refSections":[{"refs":[{"id":"ref-for-full-width"},{"id":"ref-for-full-width\u2460"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-full-width\u2461"}],"title":"2.1.1. \nMapping Rules"}],"url":"#full-width"}, "grapheme-cluster": {"dfnID":"grapheme-cluster","dfnText":"grapheme cluster","external":false,"refSections":[{"refs":[{"id":"ref-for-grapheme-cluster"},{"id":"ref-for-grapheme-cluster\u2460"},{"id":"ref-for-grapheme-cluster\u2461"},{"id":"ref-for-grapheme-cluster\u2462"}],"title":"1.4. \nCharacters and Letters"},{"refs":[{"id":"ref-for-grapheme-cluster\u2463"},{"id":"ref-for-grapheme-cluster\u2464"},{"id":"ref-for-grapheme-cluster\u2465"}],"title":"\nAppendix E:\nCharacters and Properties"}],"url":"#grapheme-cluster"}, "half-width": {"dfnID":"half-width","dfnText":"half-width","external":false,"refSections":[],"url":"#half-width"}, "hang": {"dfnID":"hang","dfnText":"hangs","external":false,"refSections":[{"refs":[{"id":"ref-for-hang"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-hang\u2460"},{"id":"ref-for-hang\u2461"},{"id":"ref-for-hang\u2462"},{"id":"ref-for-hang\u2463"},{"id":"ref-for-hang\u2464"},{"id":"ref-for-hang\u2465"},{"id":"ref-for-hang\u2466"},{"id":"ref-for-hang\u2467"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-hang\u2468"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-hang\u2460\u24ea"},{"id":"ref-for-hang\u2460\u2460"},{"id":"ref-for-hang\u2460\u2461"},{"id":"ref-for-hang\u2460\u2462"},{"id":"ref-for-hang\u2460\u2463"},{"id":"ref-for-hang\u2460\u2464"},{"id":"ref-for-hang\u2460\u2465"},{"id":"ref-for-hang\u2460\u2466"}],"title":"8.2. \nHanging Glyphs"},{"refs":[{"id":"ref-for-hang\u2460\u2467"},{"id":"ref-for-hang\u2460\u2468"},{"id":"ref-for-hang\u2461\u24ea"},{"id":"ref-for-hang\u2461\u2460"},{"id":"ref-for-hang\u2461\u2461"},{"id":"ref-for-hang\u2461\u2462"},{"id":"ref-for-hang\u2461\u2463"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"},{"refs":[{"id":"ref-for-hang\u2461\u2464"}],"title":"\nRecent Changes"}],"url":"#hang"}, "hanging-glyph": {"dfnID":"hanging-glyph","dfnText":"hanging glyph","external":false,"refSections":[{"refs":[{"id":"ref-for-hanging-glyph"}],"title":"8.2. \nHanging Glyphs"}],"url":"#hanging-glyph"}, "hyphenate": {"dfnID":"hyphenate","dfnText":"Hyphenation","external":false,"refSections":[{"refs":[{"id":"ref-for-hyphenate"},{"id":"ref-for-hyphenate\u2460"},{"id":"ref-for-hyphenate\u2461"}],"title":"5.4. \nHyphenation: the hyphens property"},{"refs":[{"id":"ref-for-hyphenate\u2462"}],"title":"5.6. \nShaping Across Intra-word Breaks"}],"url":"#hyphenate"}, "hyphenation-opportunity": {"dfnID":"hyphenation-opportunity","dfnText":"hyphenation opportunity","external":false,"refSections":[{"refs":[{"id":"ref-for-hyphenation-opportunity"},{"id":"ref-for-hyphenation-opportunity\u2460"},{"id":"ref-for-hyphenation-opportunity\u2461"},{"id":"ref-for-hyphenation-opportunity\u2462"},{"id":"ref-for-hyphenation-opportunity\u2463"},{"id":"ref-for-hyphenation-opportunity\u2464"},{"id":"ref-for-hyphenation-opportunity\u2465"}],"title":"5.4. \nHyphenation: the hyphens property"},{"refs":[{"id":"ref-for-hyphenation-opportunity\u2466"},{"id":"ref-for-hyphenation-opportunity\u2467"}],"title":"\nRecent Changes"}],"url":"#hyphenation-opportunity"}, "justification-opportunity": {"dfnID":"justification-opportunity","dfnText":"justification opportunity","external":false,"refSections":[{"refs":[{"id":"ref-for-justification-opportunity"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-justification-opportunity\u2460"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-justification-opportunity\u2461"},{"id":"ref-for-justification-opportunity\u2462"},{"id":"ref-for-justification-opportunity\u2463"},{"id":"ref-for-justification-opportunity\u2464"},{"id":"ref-for-justification-opportunity\u2465"},{"id":"ref-for-justification-opportunity\u2466"},{"id":"ref-for-justification-opportunity\u2467"},{"id":"ref-for-justification-opportunity\u2468"},{"id":"ref-for-justification-opportunity\u2460\u24ea"}],"title":"6.4.1. \nExpanding and Compressing Text"},{"refs":[{"id":"ref-for-justification-opportunity\u2460\u2460"},{"id":"ref-for-justification-opportunity\u2460\u2461"},{"id":"ref-for-justification-opportunity\u2460\u2462"},{"id":"ref-for-justification-opportunity\u2460\u2463"}],"title":"6.4.2. \nHandling Symbols and Punctuation"},{"refs":[{"id":"ref-for-justification-opportunity\u2460\u2464"},{"id":"ref-for-justification-opportunity\u2460\u2465"}],"title":"6.4.4. \nCursive Scripts"},{"refs":[{"id":"ref-for-justification-opportunity\u2460\u2466"},{"id":"ref-for-justification-opportunity\u2460\u2467"},{"id":"ref-for-justification-opportunity\u2460\u2468"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"},{"refs":[{"id":"ref-for-justification-opportunity\u2461\u24ea"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#justification-opportunity"}, "kana-full-size": {"dfnID":"kana-full-size","dfnText":"Full-size","external":false,"refSections":[{"refs":[{"id":"ref-for-kana-full-size"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-kana-full-size\u2460"}],"title":"2.1.1. \nMapping Rules"}],"url":"#kana-full-size"}, "kana-small": {"dfnID":"kana-small","dfnText":"Small","external":false,"refSections":[{"refs":[{"id":"ref-for-kana-small"},{"id":"ref-for-kana-small\u2460"},{"id":"ref-for-kana-small\u2461"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-kana-small\u2462"}],"title":"2.1.1. \nMapping Rules"}],"url":"#kana-small"}, "letter": {"dfnID":"letter","dfnText":"letter","external":false,"refSections":[{"refs":[{"id":"ref-for-letter"},{"id":"ref-for-letter\u2460"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-letter\u2461"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-letter\u2462"},{"id":"ref-for-letter\u2463"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"}],"url":"#letter"}, "line-break": {"dfnID":"line-break","dfnText":"line break","external":false,"refSections":[{"refs":[{"id":"ref-for-line-break"}],"title":"5.1. \nLine Breaking Details"}],"url":"#line-break"}, "line-breaking-process": {"dfnID":"line-breaking-process","dfnText":"line breaking","external":false,"refSections":[{"refs":[{"id":"ref-for-line-breaking-process"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-line-breaking-process\u2460"}],"title":"5.1. \nLine Breaking Details"}],"url":"#line-breaking-process"}, "other-space-separators": {"dfnID":"other-space-separators","dfnText":"other space separators","external":false,"refSections":[{"refs":[{"id":"ref-for-other-space-separators"},{"id":"ref-for-other-space-separators\u2460"},{"id":"ref-for-other-space-separators\u2461"},{"id":"ref-for-other-space-separators\u2462"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-other-space-separators\u2463"},{"id":"ref-for-other-space-separators\u2464"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-other-space-separators\u2465"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"}],"url":"#other-space-separators"}, "preserved-white-space": {"dfnID":"preserved-white-space","dfnText":"preserved white space","external":false,"refSections":[{"refs":[{"id":"ref-for-preserved-white-space"}],"title":"2.1.2. \nOrder of Operations"},{"refs":[{"id":"ref-for-preserved-white-space\u2460"},{"id":"ref-for-preserved-white-space\u2461"},{"id":"ref-for-preserved-white-space\u2462"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-preserved-white-space\u2463"},{"id":"ref-for-preserved-white-space\u2464"},{"id":"ref-for-preserved-white-space\u2465"},{"id":"ref-for-preserved-white-space\u2466"},{"id":"ref-for-preserved-white-space\u2467"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-preserved-white-space\u2468"},{"id":"ref-for-preserved-white-space\u2460\u24ea"}],"title":"4.2. \nTab Character Size: the tab-size property"},{"refs":[{"id":"ref-for-preserved-white-space\u2460\u2460"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-preserved-white-space\u2460\u2461"},{"id":"ref-for-preserved-white-space\u2460\u2462"},{"id":"ref-for-preserved-white-space\u2460\u2463"},{"id":"ref-for-preserved-white-space\u2460\u2464"},{"id":"ref-for-preserved-white-space\u2460\u2465"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#preserved-white-space"}, "propdef-hanging-punctuation": {"dfnID":"propdef-hanging-punctuation","dfnText":"hanging-punctuation","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-hanging-punctuation\u2460"}],"title":"8. \nEdge Effects"},{"refs":[{"id":"ref-for-propdef-hanging-punctuation\u2461"},{"id":"ref-for-propdef-hanging-punctuation\u2462"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"},{"refs":[{"id":"ref-for-propdef-hanging-punctuation\u2463"}],"title":"8.3. \nBidirectionality and Line Boxes"},{"refs":[{"id":"ref-for-propdef-hanging-punctuation\u2464"}],"title":"\nRecent Changes"}],"url":"#propdef-hanging-punctuation"}, "propdef-hyphens": {"dfnID":"propdef-hyphens","dfnText":"hyphens","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-hyphens"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-propdef-hyphens\u2460"},{"id":"ref-for-propdef-hyphens\u2461"},{"id":"ref-for-propdef-hyphens\u2462"}],"title":"5.4. \nHyphenation: the hyphens property"}],"url":"#propdef-hyphens"}, "propdef-letter-spacing": {"dfnID":"propdef-letter-spacing","dfnText":"letter-spacing","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-letter-spacing"}],"title":"4.2. \nTab Character Size: the tab-size property"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2460"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2461"},{"id":"ref-for-propdef-letter-spacing\u2462"}],"title":"6.4.1. \nExpanding and Compressing Text"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2463"}],"title":"7. \nSpacing"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2464"},{"id":"ref-for-propdef-letter-spacing\u2465"},{"id":"ref-for-propdef-letter-spacing\u2466"},{"id":"ref-for-propdef-letter-spacing\u2467"},{"id":"ref-for-propdef-letter-spacing\u2468"},{"id":"ref-for-propdef-letter-spacing\u2460\u24ea"},{"id":"ref-for-propdef-letter-spacing\u2460\u2460"}],"title":"7.2. \nTracking: the letter-spacing property"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2460\u2461"},{"id":"ref-for-propdef-letter-spacing\u2460\u2462"},{"id":"ref-for-propdef-letter-spacing\u2460\u2463"},{"id":"ref-for-propdef-letter-spacing\u2460\u2464"}],"title":"7.2.1. \nCursive Scripts"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2460\u2465"}],"title":"\nAppendix A:\nText Processing Order of Operations"},{"refs":[{"id":"ref-for-propdef-letter-spacing\u2460\u2466"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#propdef-letter-spacing"}, "propdef-line-break": {"dfnID":"propdef-line-break","dfnText":"line-break","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-line-break"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-propdef-line-break\u2460"},{"id":"ref-for-propdef-line-break\u2461"},{"id":"ref-for-propdef-line-break\u2462"},{"id":"ref-for-propdef-line-break\u2463"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-propdef-line-break\u2464"},{"id":"ref-for-propdef-line-break\u2465"},{"id":"ref-for-propdef-line-break\u2466"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-propdef-line-break\u2467"},{"id":"ref-for-propdef-line-break\u2468"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-propdef-line-break\u2460\u24ea"}],"title":"5.6. \nShaping Across Intra-word Breaks"}],"url":"#propdef-line-break"}, "propdef-overflow-wrap": {"dfnID":"propdef-overflow-wrap","dfnText":"overflow-wrap","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-overflow-wrap"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-propdef-overflow-wrap\u2460"},{"id":"ref-for-propdef-overflow-wrap\u2461"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-propdef-overflow-wrap\u2462"},{"id":"ref-for-propdef-overflow-wrap\u2463"},{"id":"ref-for-propdef-overflow-wrap\u2464"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-propdef-overflow-wrap\u2465"},{"id":"ref-for-propdef-overflow-wrap\u2466"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"},{"refs":[{"id":"ref-for-propdef-overflow-wrap\u2467"},{"id":"ref-for-propdef-overflow-wrap\u2468"}],"title":"5.6. \nShaping Across Intra-word Breaks"}],"url":"#propdef-overflow-wrap"}, "propdef-tab-size": {"dfnID":"propdef-tab-size","dfnText":"tab-size","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-tab-size\u2460"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-propdef-tab-size\u2461"}],"title":"4.2. \nTab Character Size: the tab-size property"}],"url":"#propdef-tab-size"}, "propdef-text-align": {"dfnID":"propdef-text-align","dfnText":"text-align","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-text-align"},{"id":"ref-for-propdef-text-align\u2460"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-propdef-text-align\u2461"},{"id":"ref-for-propdef-text-align\u2462"},{"id":"ref-for-propdef-text-align\u2463"}],"title":"6.2. \nDefault Text Alignment: the text-align-all property"},{"refs":[{"id":"ref-for-propdef-text-align\u2464"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-propdef-text-align\u2465"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-propdef-text-align\u2466"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"},{"refs":[{"id":"ref-for-propdef-text-align\u2467"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"#propdef-text-align"}, "propdef-text-align-all": {"dfnID":"propdef-text-align-all","dfnText":"text-align-all","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-text-align-all"},{"id":"ref-for-propdef-text-align-all\u2460"},{"id":"ref-for-propdef-text-align-all\u2461"},{"id":"ref-for-propdef-text-align-all\u2462"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-propdef-text-align-all\u2463"}],"title":"6.2. \nDefault Text Alignment: the text-align-all property"},{"refs":[{"id":"ref-for-propdef-text-align-all\u2464"},{"id":"ref-for-propdef-text-align-all\u2465"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-propdef-text-align-all\u2466"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"#propdef-text-align-all"}, "propdef-text-align-last": {"dfnID":"propdef-text-align-last","dfnText":"text-align-last","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-text-align-last"},{"id":"ref-for-propdef-text-align-last\u2460"},{"id":"ref-for-propdef-text-align-last\u2461"},{"id":"ref-for-propdef-text-align-last\u2462"},{"id":"ref-for-propdef-text-align-last\u2463"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-propdef-text-align-last\u2464"}],"title":"6.2. \nDefault Text Alignment: the text-align-all property"},{"refs":[{"id":"ref-for-propdef-text-align-last\u2465"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-propdef-text-align-last\u2466"},{"id":"ref-for-propdef-text-align-last\u2467"}],"title":"6.4.3. \nUnexpandable Text"},{"refs":[{"id":"ref-for-propdef-text-align-last\u2468"}],"title":"8.3. \nBidirectionality and Line Boxes"},{"refs":[{"id":"ref-for-propdef-text-align-last\u2460\u24ea"}],"title":"\nRecent Changes"}],"url":"#propdef-text-align-last"}, "propdef-text-indent": {"dfnID":"propdef-text-indent","dfnText":"text-indent","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-text-indent"}],"title":"8. \nEdge Effects"},{"refs":[{"id":"ref-for-propdef-text-indent\u2460"},{"id":"ref-for-propdef-text-indent\u2461"},{"id":"ref-for-propdef-text-indent\u2462"},{"id":"ref-for-propdef-text-indent\u2463"},{"id":"ref-for-propdef-text-indent\u2464"},{"id":"ref-for-propdef-text-indent\u2465"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"},{"refs":[{"id":"ref-for-propdef-text-indent\u2466"}],"title":"8.3. \nBidirectionality and Line Boxes"}],"url":"#propdef-text-indent"}, "propdef-text-justify": {"dfnID":"propdef-text-justify","dfnText":"text-justify","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-text-justify\u2460"},{"id":"ref-for-propdef-text-justify\u2461"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-propdef-text-justify\u2462"},{"id":"ref-for-propdef-text-justify\u2463"},{"id":"ref-for-propdef-text-justify\u2464"},{"id":"ref-for-propdef-text-justify\u2465"},{"id":"ref-for-propdef-text-justify\u2466"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-propdef-text-justify\u2467"},{"id":"ref-for-propdef-text-justify\u2468"}],"title":"6.4.1. \nExpanding and Compressing Text"}],"url":"#propdef-text-justify"}, "propdef-text-transform": {"dfnID":"propdef-text-transform","dfnText":"text-transform","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-text-transform\u2461"},{"id":"ref-for-propdef-text-transform\u2462"},{"id":"ref-for-propdef-text-transform\u2463"},{"id":"ref-for-propdef-text-transform\u2464"},{"id":"ref-for-propdef-text-transform\u2465"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-propdef-text-transform\u2466"}],"title":"2.1.1. \nMapping Rules"},{"refs":[{"id":"ref-for-propdef-text-transform\u2467"}],"title":"\nAppendix B:\nConversion to Plaintext"},{"refs":[{"id":"ref-for-propdef-text-transform\u2468"},{"id":"ref-for-propdef-text-transform\u2460\u24ea"},{"id":"ref-for-propdef-text-transform\u2460\u2460"}],"title":"\nRecent Changes"}],"url":"#propdef-text-transform"}, "propdef-white-space": {"dfnID":"propdef-white-space","dfnText":"white-space","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-white-space"},{"id":"ref-for-propdef-white-space\u2460"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-propdef-white-space\u2461"},{"id":"ref-for-propdef-white-space\u2462"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-propdef-white-space\u2463"},{"id":"ref-for-propdef-white-space\u2464"},{"id":"ref-for-propdef-white-space\u2465"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-propdef-white-space\u2466"},{"id":"ref-for-propdef-white-space\u2467"},{"id":"ref-for-propdef-white-space\u2468"},{"id":"ref-for-propdef-white-space\u2460\u24ea"},{"id":"ref-for-propdef-white-space\u2460\u2460"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-propdef-white-space\u2460\u2461"},{"id":"ref-for-propdef-white-space\u2460\u2462"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-propdef-white-space\u2460\u2463"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-propdef-white-space\u2460\u2464"},{"id":"ref-for-propdef-white-space\u2460\u2465"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-propdef-white-space\u2460\u2466"},{"id":"ref-for-propdef-white-space\u2460\u2467"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-propdef-white-space\u2460\u2468"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"},{"refs":[{"id":"ref-for-propdef-white-space\u2461\u24ea"}],"title":"\nRecent Changes"}],"url":"#propdef-white-space"}, "propdef-word-break": {"dfnID":"propdef-word-break","dfnText":"word-break","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-word-break"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-propdef-word-break\u2460"},{"id":"ref-for-propdef-word-break\u2461"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-propdef-word-break\u2462"},{"id":"ref-for-propdef-word-break\u2463"},{"id":"ref-for-propdef-word-break\u2464"},{"id":"ref-for-propdef-word-break\u2465"},{"id":"ref-for-propdef-word-break\u2466"},{"id":"ref-for-propdef-word-break\u2467"},{"id":"ref-for-propdef-word-break\u2468"},{"id":"ref-for-propdef-word-break\u2460\u24ea"},{"id":"ref-for-propdef-word-break\u2460\u2460"},{"id":"ref-for-propdef-word-break\u2460\u2461"},{"id":"ref-for-propdef-word-break\u2460\u2462"},{"id":"ref-for-propdef-word-break\u2460\u2463"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-propdef-word-break\u2460\u2464"},{"id":"ref-for-propdef-word-break\u2460\u2465"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-propdef-word-break\u2460\u2466"},{"id":"ref-for-propdef-word-break\u2460\u2467"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"},{"refs":[{"id":"ref-for-propdef-word-break\u2460\u2468"}],"title":"5.6. \nShaping Across Intra-word Breaks"}],"url":"#propdef-word-break"}, "propdef-word-spacing": {"dfnID":"propdef-word-spacing","dfnText":"word-spacing","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-word-spacing"}],"title":"4.2. \nTab Character Size: the tab-size property"},{"refs":[{"id":"ref-for-propdef-word-spacing\u2460"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-propdef-word-spacing\u2461"},{"id":"ref-for-propdef-word-spacing\u2462"}],"title":"6.4.1. \nExpanding and Compressing Text"},{"refs":[{"id":"ref-for-propdef-word-spacing\u2463"}],"title":"7. \nSpacing"},{"refs":[{"id":"ref-for-propdef-word-spacing\u2464"}],"title":"7.1. \nWord Spacing: the word-spacing property"},{"refs":[{"id":"ref-for-propdef-word-spacing\u2465"}],"title":"7.2. \nTracking: the letter-spacing property"},{"refs":[{"id":"ref-for-propdef-word-spacing\u2466"}],"title":"\nAppendix A:\nText Processing Order of Operations"}],"url":"#propdef-word-spacing"}, "propdef-word-wrap": {"dfnID":"propdef-word-wrap","dfnText":"word-wrap","external":false,"refSections":[{"refs":[{"id":"ref-for-propdef-word-wrap"},{"id":"ref-for-propdef-word-wrap\u2460"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"}],"url":"#propdef-word-wrap"}, "segment-break": {"dfnID":"segment-break","dfnText":"segment break","external":false,"refSections":[{"refs":[{"id":"ref-for-segment-break"},{"id":"ref-for-segment-break\u2460"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-segment-break\u2461"},{"id":"ref-for-segment-break\u2462"},{"id":"ref-for-segment-break\u2463"},{"id":"ref-for-segment-break\u2464"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-segment-break\u2465"},{"id":"ref-for-segment-break\u2466"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-segment-break\u2467"},{"id":"ref-for-segment-break\u2468"},{"id":"ref-for-segment-break\u2460\u24ea"},{"id":"ref-for-segment-break\u2460\u2460"},{"id":"ref-for-segment-break\u2460\u2461"},{"id":"ref-for-segment-break\u2460\u2462"},{"id":"ref-for-segment-break\u2460\u2463"},{"id":"ref-for-segment-break\u2460\u2464"}],"title":"4.1.3. \nSegment Break Transformation Rules"}],"url":"#segment-break"}, "soft-wrap-break": {"dfnID":"soft-wrap-break","dfnText":"soft wrap break","external":false,"refSections":[{"refs":[{"id":"ref-for-soft-wrap-break"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"#soft-wrap-break"}, "soft-wrap-opportunity": {"dfnID":"soft-wrap-opportunity","dfnText":"soft wrap opportunity","external":false,"refSections":[{"refs":[{"id":"ref-for-soft-wrap-opportunity"},{"id":"ref-for-soft-wrap-opportunity\u2460"},{"id":"ref-for-soft-wrap-opportunity\u2461"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2462"},{"id":"ref-for-soft-wrap-opportunity\u2463"},{"id":"ref-for-soft-wrap-opportunity\u2464"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2465"},{"id":"ref-for-soft-wrap-opportunity\u2466"},{"id":"ref-for-soft-wrap-opportunity\u2467"},{"id":"ref-for-soft-wrap-opportunity\u2468"},{"id":"ref-for-soft-wrap-opportunity\u2460\u24ea"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2460"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2460\u2461"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2462"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2463"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2464"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2465"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2466"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2467"},{"id":"ref-for-soft-wrap-opportunity\u2460\u2468"},{"id":"ref-for-soft-wrap-opportunity\u2461\u24ea"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2461\u2460"},{"id":"ref-for-soft-wrap-opportunity\u2461\u2461"},{"id":"ref-for-soft-wrap-opportunity\u2461\u2462"},{"id":"ref-for-soft-wrap-opportunity\u2461\u2463"},{"id":"ref-for-soft-wrap-opportunity\u2461\u2464"},{"id":"ref-for-soft-wrap-opportunity\u2461\u2465"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2461\u2466"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2461\u2467"},{"id":"ref-for-soft-wrap-opportunity\u2461\u2468"},{"id":"ref-for-soft-wrap-opportunity\u2462\u24ea"},{"id":"ref-for-soft-wrap-opportunity\u2462\u2460"}],"title":"5.4. \nHyphenation: the hyphens property"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2462\u2461"},{"id":"ref-for-soft-wrap-opportunity\u2462\u2462"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2462\u2463"}],"title":"5.6. \nShaping Across Intra-word Breaks"},{"refs":[{"id":"ref-for-soft-wrap-opportunity\u2462\u2464"},{"id":"ref-for-soft-wrap-opportunity\u2462\u2465"},{"id":"ref-for-soft-wrap-opportunity\u2462\u2466"}],"title":"\nRecent Changes"}],"url":"#soft-wrap-opportunity"}, "spaces": {"dfnID":"spaces","dfnText":"spaces","external":false,"refSections":[{"refs":[{"id":"ref-for-spaces"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-spaces\u2460"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-spaces\u2461"},{"id":"ref-for-spaces\u2462"},{"id":"ref-for-spaces\u2463"},{"id":"ref-for-spaces\u2464"},{"id":"ref-for-spaces\u2465"},{"id":"ref-for-spaces\u2466"},{"id":"ref-for-spaces\u2467"},{"id":"ref-for-spaces\u2468"},{"id":"ref-for-spaces\u2460\u24ea"},{"id":"ref-for-spaces\u2460\u2460"},{"id":"ref-for-spaces\u2460\u2461"},{"id":"ref-for-spaces\u2460\u2462"},{"id":"ref-for-spaces\u2460\u2463"},{"id":"ref-for-spaces\u2460\u2464"},{"id":"ref-for-spaces\u2460\u2465"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-spaces\u2460\u2466"},{"id":"ref-for-spaces\u2460\u2467"},{"id":"ref-for-spaces\u2460\u2468"},{"id":"ref-for-spaces\u2461\u24ea"},{"id":"ref-for-spaces\u2461\u2460"},{"id":"ref-for-spaces\u2461\u2461"},{"id":"ref-for-spaces\u2461\u2462"},{"id":"ref-for-spaces\u2461\u2463"},{"id":"ref-for-spaces\u2461\u2464"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-spaces\u2461\u2465"},{"id":"ref-for-spaces\u2461\u2466"},{"id":"ref-for-spaces\u2461\u2467"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-spaces\u2461\u2468"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-spaces\u2462\u24ea"},{"id":"ref-for-spaces\u2462\u2460"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-spaces\u2462\u2461"}],"title":"7.2.1. \nCursive Scripts"}],"url":"#spaces"}, "stop-or-comma": {"dfnID":"stop-or-comma","dfnText":"Stops and commas","external":false,"refSections":[{"refs":[{"id":"ref-for-stop-or-comma"},{"id":"ref-for-stop-or-comma\u2460"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"}],"url":"#stop-or-comma"}, "tab-size-dfn": {"dfnID":"tab-size-dfn","dfnText":"tab size","external":false,"refSections":[{"refs":[{"id":"ref-for-tab-size-dfn"},{"id":"ref-for-tab-size-dfn\u2460"},{"id":"ref-for-tab-size-dfn\u2461"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"}],"url":"#tab-size-dfn"}, "tab-stop": {"dfnID":"tab-stop","dfnText":"Tab stops","external":false,"refSections":[{"refs":[{"id":"ref-for-tab-stop"},{"id":"ref-for-tab-stop\u2460"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-tab-stop\u2461"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"#tab-stop"}, "tabs": {"dfnID":"tabs","dfnText":"tabs","external":false,"refSections":[{"refs":[{"id":"ref-for-tabs"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-tabs\u2460"},{"id":"ref-for-tabs\u2461"},{"id":"ref-for-tabs\u2462"},{"id":"ref-for-tabs\u2463"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-tabs\u2464"},{"id":"ref-for-tabs\u2465"},{"id":"ref-for-tabs\u2466"},{"id":"ref-for-tabs\u2467"},{"id":"ref-for-tabs\u2468"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-tabs\u2460\u24ea"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-tabs\u2460\u2460"}],"title":"4.2. \nTab Character Size: the tab-size property"}],"url":"#tabs"}, "tracking": {"dfnID":"tracking","dfnText":"tracking","external":false,"refSections":[],"url":"#tracking"}, "typographic-character-unit": {"dfnID":"typographic-character-unit","dfnText":"typographic character unit","external":false,"refSections":[{"refs":[{"id":"ref-for-typographic-character-unit"},{"id":"ref-for-typographic-character-unit\u2460"},{"id":"ref-for-typographic-character-unit\u2461"},{"id":"ref-for-typographic-character-unit\u2462"},{"id":"ref-for-typographic-character-unit\u2463"},{"id":"ref-for-typographic-character-unit\u2464"},{"id":"ref-for-typographic-character-unit\u2465"},{"id":"ref-for-typographic-character-unit\u2466"},{"id":"ref-for-typographic-character-unit\u2467"},{"id":"ref-for-typographic-character-unit\u2468"},{"id":"ref-for-typographic-character-unit\u2460\u24ea"},{"id":"ref-for-typographic-character-unit\u2460\u2460"}],"title":"1.4. \nCharacters and Letters"},{"refs":[{"id":"ref-for-typographic-character-unit\u2460\u2461"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-typographic-character-unit\u2460\u2462"},{"id":"ref-for-typographic-character-unit\u2460\u2463"},{"id":"ref-for-typographic-character-unit\u2460\u2464"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-typographic-character-unit\u2460\u2465"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-typographic-character-unit\u2460\u2466"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-typographic-character-unit\u2460\u2467"},{"id":"ref-for-typographic-character-unit\u2460\u2468"},{"id":"ref-for-typographic-character-unit\u2461\u24ea"},{"id":"ref-for-typographic-character-unit\u2461\u2460"},{"id":"ref-for-typographic-character-unit\u2461\u2461"},{"id":"ref-for-typographic-character-unit\u2461\u2462"},{"id":"ref-for-typographic-character-unit\u2461\u2463"}],"title":"6.4.1. \nExpanding and Compressing Text"},{"refs":[{"id":"ref-for-typographic-character-unit\u2461\u2464"}],"title":"6.4.2. \nHandling Symbols and Punctuation"},{"refs":[{"id":"ref-for-typographic-character-unit\u2461\u2465"},{"id":"ref-for-typographic-character-unit\u2461\u2466"},{"id":"ref-for-typographic-character-unit\u2461\u2467"},{"id":"ref-for-typographic-character-unit\u2461\u2468"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"},{"refs":[{"id":"ref-for-typographic-character-unit\u2462\u24ea"}],"title":"7. \nSpacing"},{"refs":[{"id":"ref-for-typographic-character-unit\u2462\u2460"}],"title":"7.1. \nWord Spacing: the word-spacing property"},{"refs":[{"id":"ref-for-typographic-character-unit\u2462\u2461"},{"id":"ref-for-typographic-character-unit\u2462\u2462"},{"id":"ref-for-typographic-character-unit\u2462\u2463"},{"id":"ref-for-typographic-character-unit\u2462\u2464"},{"id":"ref-for-typographic-character-unit\u2462\u2465"},{"id":"ref-for-typographic-character-unit\u2462\u2466"},{"id":"ref-for-typographic-character-unit\u2462\u2467"},{"id":"ref-for-typographic-character-unit\u2462\u2468"},{"id":"ref-for-typographic-character-unit\u2463\u24ea"}],"title":"7.2. \nTracking: the letter-spacing property"},{"refs":[{"id":"ref-for-typographic-character-unit\u2463\u2460"},{"id":"ref-for-typographic-character-unit\u2463\u2461"}],"title":"7.3. \nShaping Across Element Boundaries"},{"refs":[{"id":"ref-for-typographic-character-unit\u2463\u2462"}],"title":"\nAppendix D:\nScripts and Spacing"},{"refs":[{"id":"ref-for-typographic-character-unit\u2463\u2463"},{"id":"ref-for-typographic-character-unit\u2463\u2464"}],"title":"\nAppendix E:\nCharacters and Properties"}],"url":"#typographic-character-unit"}, "typographic-letter-unit": {"dfnID":"typographic-letter-unit","dfnText":"typographic letter unit","external":false,"refSections":[{"refs":[{"id":"ref-for-typographic-letter-unit"}],"title":"2.1. \nCase Transforms: the text-transform property"},{"refs":[{"id":"ref-for-typographic-letter-unit\u2460"}],"title":"5. \nLine Breaking and Word Boundaries"},{"refs":[{"id":"ref-for-typographic-letter-unit\u2461"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-typographic-letter-unit\u2462"},{"id":"ref-for-typographic-letter-unit\u2463"},{"id":"ref-for-typographic-letter-unit\u2464"},{"id":"ref-for-typographic-letter-unit\u2465"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-typographic-letter-unit\u2466"},{"id":"ref-for-typographic-letter-unit\u2467"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-typographic-letter-unit\u2468"},{"id":"ref-for-typographic-letter-unit\u2460\u24ea"}],"title":"6.4.2. \nHandling Symbols and Punctuation"},{"refs":[{"id":"ref-for-typographic-letter-unit\u2460\u2460"},{"id":"ref-for-typographic-letter-unit\u2460\u2461"},{"id":"ref-for-typographic-letter-unit\u2460\u2462"}],"title":"6.4.4. \nCursive Scripts"},{"refs":[{"id":"ref-for-typographic-letter-unit\u2460\u2463"},{"id":"ref-for-typographic-letter-unit\u2460\u2464"}],"title":"7.2.1. \nCursive Scripts"}],"url":"#typographic-letter-unit"}, "unicode-east-asian-width": {"dfnID":"unicode-east-asian-width","dfnText":"East Asian width property","external":false,"refSections":[{"refs":[{"id":"ref-for-unicode-east-asian-width"},{"id":"ref-for-unicode-east-asian-width\u2460"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-unicode-east-asian-width\u2461"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#unicode-east-asian-width"}, "unicode-general-category": {"dfnID":"unicode-general-category","dfnText":"general category","external":false,"refSections":[{"refs":[{"id":"ref-for-unicode-general-category"}],"title":"1.4. \nCharacters and Letters"},{"refs":[{"id":"ref-for-unicode-general-category\u2460"},{"id":"ref-for-unicode-general-category\u2461"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-unicode-general-category\u2462"}],"title":"4.1. \nThe White Space Processing Rules"}],"url":"#unicode-general-category"}, "unicode-script": {"dfnID":"unicode-script","dfnText":"script property","external":false,"refSections":[{"refs":[{"id":"ref-for-unicode-script"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-unicode-script\u2460"},{"id":"ref-for-unicode-script\u2461"},{"id":"ref-for-unicode-script\u2462"},{"id":"ref-for-unicode-script\u2463"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#unicode-script"}, "unicode-vertical-orientation": {"dfnID":"unicode-vertical-orientation","dfnText":"Vertical Orientation","external":false,"refSections":[],"url":"#unicode-vertical-orientation"}, "valdef-hanging-punctuation-allow-end": {"dfnID":"valdef-hanging-punctuation-allow-end","dfnText":"allow-end","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-hanging-punctuation-allow-end"},{"id":"ref-for-valdef-hanging-punctuation-allow-end\u2460"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"}],"url":"#valdef-hanging-punctuation-allow-end"}, "valdef-hanging-punctuation-first": {"dfnID":"valdef-hanging-punctuation-first","dfnText":"first","external":false,"refSections":[],"url":"#valdef-hanging-punctuation-first"}, "valdef-hanging-punctuation-force-end": {"dfnID":"valdef-hanging-punctuation-force-end","dfnText":"force-end","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-hanging-punctuation-force-end"},{"id":"ref-for-valdef-hanging-punctuation-force-end\u2460"}],"title":"8.2.1. \nHanging Punctuation: the hanging-punctuation property"}],"url":"#valdef-hanging-punctuation-force-end"}, "valdef-hanging-punctuation-last": {"dfnID":"valdef-hanging-punctuation-last","dfnText":"last","external":false,"refSections":[],"url":"#valdef-hanging-punctuation-last"}, "valdef-hanging-punctuation-none": {"dfnID":"valdef-hanging-punctuation-none","dfnText":"none","external":false,"refSections":[],"url":"#valdef-hanging-punctuation-none"}, "valdef-hyphens-auto": {"dfnID":"valdef-hyphens-auto","dfnText":"auto","external":false,"refSections":[],"url":"#valdef-hyphens-auto"}, "valdef-hyphens-manual": {"dfnID":"valdef-hyphens-manual","dfnText":"manual","external":false,"refSections":[],"url":"#valdef-hyphens-manual"}, "valdef-hyphens-none": {"dfnID":"valdef-hyphens-none","dfnText":"none","external":false,"refSections":[],"url":"#valdef-hyphens-none"}, "valdef-letter-spacing-length": {"dfnID":"valdef-letter-spacing-length","dfnText":"<length>","external":false,"refSections":[],"url":"#valdef-letter-spacing-length"}, "valdef-letter-spacing-normal": {"dfnID":"valdef-letter-spacing-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-letter-spacing-normal"}],"title":"7.2. \nTracking: the letter-spacing property"}],"url":"#valdef-letter-spacing-normal"}, "valdef-line-break-anywhere": {"dfnID":"valdef-line-break-anywhere","dfnText":"anywhere","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-line-break-anywhere"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-valdef-line-break-anywhere\u2460"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-line-break-anywhere"}, "valdef-line-break-auto": {"dfnID":"valdef-line-break-auto","dfnText":"auto","external":false,"refSections":[],"url":"#valdef-line-break-auto"}, "valdef-line-break-loose": {"dfnID":"valdef-line-break-loose","dfnText":"loose","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-line-break-loose"},{"id":"ref-for-valdef-line-break-loose\u2460"},{"id":"ref-for-valdef-line-break-loose\u2461"},{"id":"ref-for-valdef-line-break-loose\u2462"},{"id":"ref-for-valdef-line-break-loose\u2463"},{"id":"ref-for-valdef-line-break-loose\u2464"},{"id":"ref-for-valdef-line-break-loose\u2465"},{"id":"ref-for-valdef-line-break-loose\u2466"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-line-break-loose"}, "valdef-line-break-normal": {"dfnID":"valdef-line-break-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-line-break-normal"},{"id":"ref-for-valdef-line-break-normal\u2460"},{"id":"ref-for-valdef-line-break-normal\u2461"},{"id":"ref-for-valdef-line-break-normal\u2462"},{"id":"ref-for-valdef-line-break-normal\u2463"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-line-break-normal"}, "valdef-line-break-strict": {"dfnID":"valdef-line-break-strict","dfnText":"strict","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-line-break-strict"},{"id":"ref-for-valdef-line-break-strict\u2460"},{"id":"ref-for-valdef-line-break-strict\u2461"},{"id":"ref-for-valdef-line-break-strict\u2462"},{"id":"ref-for-valdef-line-break-strict\u2463"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-line-break-strict"}, "valdef-overflow-wrap-anywhere": {"dfnID":"valdef-overflow-wrap-anywhere","dfnText":"anywhere","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-wrap-anywhere"},{"id":"ref-for-valdef-overflow-wrap-anywhere\u2460"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"}],"url":"#valdef-overflow-wrap-anywhere"}, "valdef-overflow-wrap-break-word": {"dfnID":"valdef-overflow-wrap-break-word","dfnText":"break-word","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-overflow-wrap-break-word"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"}],"url":"#valdef-overflow-wrap-break-word"}, "valdef-overflow-wrap-normal": {"dfnID":"valdef-overflow-wrap-normal","dfnText":"normal","external":false,"refSections":[],"url":"#valdef-overflow-wrap-normal"}, "valdef-text-align-center": {"dfnID":"valdef-text-align-center","dfnText":"center","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-center"}],"title":"6.4.3. \nUnexpandable Text"}],"url":"#valdef-text-align-center"}, "valdef-text-align-end": {"dfnID":"valdef-text-align-end","dfnText":"end","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-end"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"#valdef-text-align-end"}, "valdef-text-align-justify": {"dfnID":"valdef-text-align-justify","dfnText":"justify","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-justify"},{"id":"ref-for-valdef-text-align-justify\u2460"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-valdef-text-align-justify\u2461"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-valdef-text-align-justify\u2462"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-valdef-text-align-justify\u2463"}],"title":"6.4.1. \nExpanding and Compressing Text"},{"refs":[{"id":"ref-for-valdef-text-align-justify\u2464"}],"title":"6.4.3. \nUnexpandable Text"}],"url":"#valdef-text-align-justify"}, "valdef-text-align-justify-all": {"dfnID":"valdef-text-align-justify-all","dfnText":"justify-all","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-justify-all"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"#valdef-text-align-justify-all"}, "valdef-text-align-last-auto": {"dfnID":"valdef-text-align-last-auto","dfnText":"auto","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-last-auto"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-valdef-text-align-last-auto\u2460"}],"title":"6.2. \nDefault Text Alignment: the text-align-all property"}],"url":"#valdef-text-align-last-auto"}, "valdef-text-align-left": {"dfnID":"valdef-text-align-left","dfnText":"left","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-left"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"#valdef-text-align-left"}, "valdef-text-align-match-parent": {"dfnID":"valdef-text-align-match-parent","dfnText":"match-parent","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-match-parent"},{"id":"ref-for-valdef-text-align-match-parent\u2460"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-valdef-text-align-match-parent\u2461"}],"title":"6.2. \nDefault Text Alignment: the text-align-all property"},{"refs":[{"id":"ref-for-valdef-text-align-match-parent\u2462"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-valdef-text-align-match-parent\u2463"}],"title":"\nRecent Changes"}],"url":"#valdef-text-align-match-parent"}, "valdef-text-align-right": {"dfnID":"valdef-text-align-right","dfnText":"right","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-right"}],"title":"6.1. \nText Alignment: the text-align shorthand"}],"url":"#valdef-text-align-right"}, "valdef-text-align-start": {"dfnID":"valdef-text-align-start","dfnText":"start","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-align-start"},{"id":"ref-for-valdef-text-align-start\u2460"},{"id":"ref-for-valdef-text-align-start\u2461"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-valdef-text-align-start\u2462"}],"title":"6.3. \nLast Line Alignment: the text-align-last property"},{"refs":[{"id":"ref-for-valdef-text-align-start\u2463"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"},{"refs":[{"id":"ref-for-valdef-text-align-start\u2464"}],"title":"\nRecent Changes"}],"url":"#valdef-text-align-start"}, "valdef-text-indent-each-line": {"dfnID":"valdef-text-indent-each-line","dfnText":"each-line","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-indent-each-line"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"#valdef-text-indent-each-line"}, "valdef-text-indent-hanging": {"dfnID":"valdef-text-indent-hanging","dfnText":"hanging","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-indent-hanging"},{"id":"ref-for-valdef-text-indent-hanging\u2460"}],"title":"8.1. \nFirst Line Indentation: the text-indent property"}],"url":"#valdef-text-indent-hanging"}, "valdef-text-indent-length": {"dfnID":"valdef-text-indent-length","dfnText":"<length>","external":false,"refSections":[],"url":"#valdef-text-indent-length"}, "valdef-text-indent-percentage": {"dfnID":"valdef-text-indent-percentage","dfnText":"<percentage>","external":false,"refSections":[],"url":"#valdef-text-indent-percentage"}, "valdef-text-justify-auto": {"dfnID":"valdef-text-justify-auto","dfnText":"auto","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-justify-auto"},{"id":"ref-for-valdef-text-justify-auto\u2460"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"}],"url":"#valdef-text-justify-auto"}, "valdef-text-justify-distribute": {"dfnID":"valdef-text-justify-distribute","dfnText":"distribute","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-justify-distribute"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-valdef-text-justify-distribute\u2460"},{"id":"ref-for-valdef-text-justify-distribute\u2461"}],"title":"\nRecent Changes"}],"url":"#valdef-text-justify-distribute"}, "valdef-text-justify-inter-character": {"dfnID":"valdef-text-justify-inter-character","dfnText":"inter-character","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-justify-inter-character"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-valdef-text-justify-inter-character\u2460"}],"title":"6.4.1. \nExpanding and Compressing Text"},{"refs":[{"id":"ref-for-valdef-text-justify-inter-character\u2461"}],"title":"\nRecent Changes"}],"url":"#valdef-text-justify-inter-character"}, "valdef-text-justify-inter-word": {"dfnID":"valdef-text-justify-inter-word","dfnText":"inter-word","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-justify-inter-word"}],"title":"6.4. \nJustification Method: the text-justify property"}],"url":"#valdef-text-justify-inter-word"}, "valdef-text-justify-none": {"dfnID":"valdef-text-justify-none","dfnText":"none","external":false,"refSections":[],"url":"#valdef-text-justify-none"}, "valdef-text-transform-capitalize": {"dfnID":"valdef-text-transform-capitalize","dfnText":"capitalize","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-transform-capitalize"},{"id":"ref-for-valdef-text-transform-capitalize\u2460"}],"title":"2.1.1. \nMapping Rules"},{"refs":[{"id":"ref-for-valdef-text-transform-capitalize\u2461"}],"title":"2.1.2. \nOrder of Operations"}],"url":"#valdef-text-transform-capitalize"}, "valdef-text-transform-full-size-kana": {"dfnID":"valdef-text-transform-full-size-kana","dfnText":"full-size-kana","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-transform-full-size-kana\u2460"}],"title":"2.1.2. \nOrder of Operations"}],"url":"#valdef-text-transform-full-size-kana"}, "valdef-text-transform-full-width": {"dfnID":"valdef-text-transform-full-width","dfnText":"full-width","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-transform-full-width\u2460"},{"id":"ref-for-valdef-text-transform-full-width\u2461"}],"title":"2.1.2. \nOrder of Operations"}],"url":"#valdef-text-transform-full-width"}, "valdef-text-transform-lowercase": {"dfnID":"valdef-text-transform-lowercase","dfnText":"lowercase","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-transform-lowercase"}],"title":"2.1.2. \nOrder of Operations"}],"url":"#valdef-text-transform-lowercase"}, "valdef-text-transform-none": {"dfnID":"valdef-text-transform-none","dfnText":"none","external":false,"refSections":[],"url":"#valdef-text-transform-none"}, "valdef-text-transform-uppercase": {"dfnID":"valdef-text-transform-uppercase","dfnText":"uppercase","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-text-transform-uppercase"}],"title":"2.1.2. \nOrder of Operations"}],"url":"#valdef-text-transform-uppercase"}, "valdef-white-space-break-spaces": {"dfnID":"valdef-white-space-break-spaces","dfnText":"break-spaces","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-white-space-break-spaces"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-valdef-white-space-break-spaces\u2460"},{"id":"ref-for-valdef-white-space-break-spaces\u2461"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-valdef-white-space-break-spaces\u2462"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-valdef-white-space-break-spaces\u2463"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-valdef-white-space-break-spaces\u2464"},{"id":"ref-for-valdef-white-space-break-spaces\u2465"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-white-space-break-spaces"}, "valdef-white-space-normal": {"dfnID":"valdef-white-space-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-white-space-normal"},{"id":"ref-for-valdef-white-space-normal\u2460"},{"id":"ref-for-valdef-white-space-normal\u2461"},{"id":"ref-for-valdef-white-space-normal\u2462"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-valdef-white-space-normal\u2463"},{"id":"ref-for-valdef-white-space-normal\u2464"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-valdef-white-space-normal\u2465"},{"id":"ref-for-valdef-white-space-normal\u2466"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-valdef-white-space-normal\u2467"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-white-space-normal"}, "valdef-white-space-nowrap": {"dfnID":"valdef-white-space-nowrap","dfnText":"nowrap","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-white-space-nowrap"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-valdef-white-space-nowrap\u2460"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-valdef-white-space-nowrap\u2461"},{"id":"ref-for-valdef-white-space-nowrap\u2462"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-valdef-white-space-nowrap\u2463"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-white-space-nowrap"}, "valdef-white-space-pre": {"dfnID":"valdef-white-space-pre","dfnText":"pre","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-white-space-pre"},{"id":"ref-for-valdef-white-space-pre\u2460"},{"id":"ref-for-valdef-white-space-pre\u2461"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-valdef-white-space-pre\u2462"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-valdef-white-space-pre\u2463"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-valdef-white-space-pre\u2464"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-white-space-pre"}, "valdef-white-space-pre-line": {"dfnID":"valdef-white-space-pre-line","dfnText":"pre-line","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-white-space-pre-line"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-valdef-white-space-pre-line\u2460"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-valdef-white-space-pre-line\u2461"},{"id":"ref-for-valdef-white-space-pre-line\u2462"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-valdef-white-space-pre-line\u2463"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-valdef-white-space-pre-line\u2464"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-white-space-pre-line"}, "valdef-white-space-pre-wrap": {"dfnID":"valdef-white-space-pre-wrap","dfnText":"pre-wrap","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-white-space-pre-wrap"},{"id":"ref-for-valdef-white-space-pre-wrap\u2460"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-valdef-white-space-pre-wrap\u2461"},{"id":"ref-for-valdef-white-space-pre-wrap\u2462"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-valdef-white-space-pre-wrap\u2463"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-valdef-white-space-pre-wrap\u2464"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-valdef-white-space-pre-wrap\u2465"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"}],"url":"#valdef-white-space-pre-wrap"}, "valdef-word-break-break-all": {"dfnID":"valdef-word-break-break-all","dfnText":"break-all","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-word-break-break-all"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"}],"url":"#valdef-word-break-break-all"}, "valdef-word-break-break-word": {"dfnID":"valdef-word-break-break-word","dfnText":"break-word","external":false,"refSections":[],"url":"#valdef-word-break-break-word"}, "valdef-word-break-keep-all": {"dfnID":"valdef-word-break-keep-all","dfnText":"keep-all","external":false,"refSections":[],"url":"#valdef-word-break-keep-all"}, "valdef-word-break-normal": {"dfnID":"valdef-word-break-normal","dfnText":"normal","external":false,"refSections":[{"refs":[{"id":"ref-for-valdef-word-break-normal"},{"id":"ref-for-valdef-word-break-normal\u2460"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"}],"url":"#valdef-word-break-normal"}, "valdef-word-spacing-length": {"dfnID":"valdef-word-spacing-length","dfnText":"<length>","external":false,"refSections":[],"url":"#valdef-word-spacing-length"}, "valdef-word-spacing-normal": {"dfnID":"valdef-word-spacing-normal","dfnText":"normal","external":false,"refSections":[],"url":"#valdef-word-spacing-normal"}, "white-space": {"dfnID":"white-space","dfnText":"document white space characters","external":false,"refSections":[{"refs":[{"id":"ref-for-white-space"}],"title":"2.1.2. \nOrder of Operations"},{"refs":[{"id":"ref-for-white-space\u2460"},{"id":"ref-for-white-space\u2461"},{"id":"ref-for-white-space\u2462"},{"id":"ref-for-white-space\u2463"},{"id":"ref-for-white-space\u2464"},{"id":"ref-for-white-space\u2465"},{"id":"ref-for-white-space\u2466"},{"id":"ref-for-white-space\u2467"},{"id":"ref-for-white-space\u2468"},{"id":"ref-for-white-space\u2460\u24ea"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-white-space\u2460\u2460"},{"id":"ref-for-white-space\u2460\u2461"},{"id":"ref-for-white-space\u2460\u2462"},{"id":"ref-for-white-space\u2460\u2463"}],"title":"4. \nWhite Space Processing & Control Characters"},{"refs":[{"id":"ref-for-white-space\u2460\u2464"}],"title":"4.1. \nThe White Space Processing Rules"},{"refs":[{"id":"ref-for-white-space\u2460\u2465"},{"id":"ref-for-white-space\u2460\u2466"}],"title":"4.1.1. \nPhase I: Collapsing and Transformation"},{"refs":[{"id":"ref-for-white-space\u2460\u2467"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-white-space\u2460\u2468"}],"title":"4.1.3. \nSegment Break Transformation Rules"},{"refs":[{"id":"ref-for-white-space\u2461\u24ea"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-white-space\u2461\u2460"}],"title":"6.1. \nText Alignment: the text-align shorthand"},{"refs":[{"id":"ref-for-white-space\u2461\u2461"}],"title":"\nAppendix B:\nConversion to Plaintext"}],"url":"#white-space"}, "word-separator": {"dfnID":"word-separator","dfnText":"Word-separator characters","external":false,"refSections":[{"refs":[{"id":"ref-for-word-separator"},{"id":"ref-for-word-separator\u2460"},{"id":"ref-for-word-separator\u2461"},{"id":"ref-for-word-separator\u2462"}],"title":"5.1. \nLine Breaking Details"},{"refs":[{"id":"ref-for-word-separator\u2463"}],"title":"5.2. \nBreaking Rules for Letters: the word-break property"},{"refs":[{"id":"ref-for-word-separator\u2464"},{"id":"ref-for-word-separator\u2465"}],"title":"6.4. \nJustification Method: the text-justify property"},{"refs":[{"id":"ref-for-word-separator\u2466"},{"id":"ref-for-word-separator\u2467"}],"title":"6.4.1. \nExpanding and Compressing Text"},{"refs":[{"id":"ref-for-word-separator\u2468"}],"title":"6.4.5. \nMinimum Requirements for auto Justification"},{"refs":[{"id":"ref-for-word-separator\u2460\u24ea"}],"title":"7. \nSpacing"},{"refs":[{"id":"ref-for-word-separator\u2460\u2460"},{"id":"ref-for-word-separator\u2460\u2461"},{"id":"ref-for-word-separator\u2460\u2462"}],"title":"7.1. \nWord Spacing: the word-spacing property"}],"url":"#word-separator"}, "wrapping": {"dfnID":"wrapping","dfnText":"wrapping","external":false,"refSections":[{"refs":[{"id":"ref-for-wrapping"}],"title":"3. \nWhite Space and Wrapping: the white-space property"},{"refs":[{"id":"ref-for-wrapping\u2460"}],"title":"4.1.2. \nPhase II: Trimming and Positioning"},{"refs":[{"id":"ref-for-wrapping\u2461"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-wrapping\u2462"}],"title":"5.5. \nOverflow Wrapping: the overflow-wrap/word-wrap property"},{"refs":[{"id":"ref-for-wrapping\u2463"}],"title":"5.6. \nShaping Across Intra-word Breaks"},{"refs":[{"id":"ref-for-wrapping\u2464"}],"title":"\nAppendix A:\nText Processing Order of Operations"}],"url":"#wrapping"}, "writing-system-chinese": {"dfnID":"writing-system-chinese","dfnText":"Chinese","external":false,"refSections":[{"refs":[{"id":"ref-for-writing-system-chinese"},{"id":"ref-for-writing-system-chinese\u2460"},{"id":"ref-for-writing-system-chinese\u2461"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-writing-system-chinese\u2462"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#writing-system-chinese"}, "writing-system-japanese": {"dfnID":"writing-system-japanese","dfnText":"Japanese","external":false,"refSections":[{"refs":[{"id":"ref-for-writing-system-japanese"},{"id":"ref-for-writing-system-japanese\u2460"},{"id":"ref-for-writing-system-japanese\u2461"}],"title":"5.3. \nLine Breaking Strictness: the line-break property"},{"refs":[{"id":"ref-for-writing-system-japanese\u2462"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#writing-system-japanese"}, "writing-system-known": {"dfnID":"writing-system-known","dfnText":"unknown","external":false,"refSections":[],"url":"#writing-system-known"}, "writing-system-korean": {"dfnID":"writing-system-korean","dfnText":"Korean","external":false,"refSections":[{"refs":[{"id":"ref-for-writing-system-korean"}],"title":"\nAppendix D:\nScripts and Spacing"}],"url":"#writing-system-korean"}, }; document.addEventListener("DOMContentLoaded", ()=>{ genAllDfnPanels(); document.body.addEventListener("click", (e) => { // If not handled already, just hide all dfn panels. hideAllDfnPanels(); }); }); window.addEventListener("resize", () => { // Pin any visible dfn panel queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(el=>positionDfnPanel(el)); }); function genAllDfnPanels() { for(const panelData of Object.values(dfnPanelData)) { const dfnID = panelData.dfnID; const dfn = document.getElementById(dfnID); if(!dfn) { console.log(`Can't find dfn#${dfnID}.`, panelData); continue; } dfn.panelData = panelData; insertDfnPopupAction(dfn); } } function genDfnPanel(dfn, { dfnID, url, dfnText, refSections, external }) { const dfnPanel = mk.aside({ class: "dfn-panel on", id: `infopanel-for-${dfnID}`, "data-for": dfnID, "aria-labelled-by":`infopaneltitle-for-${dfnID}`, }, mk.span({id:`infopaneltitle-for-${dfnID}`, style:"display:none"}, `Info about the '${dfnText}' ${external?"external":""} reference.`), mk.a({href:url, class:"dfn-link"}, url), refSections.length == 0 ? [] : mk.b({}, "Referenced in:"), mk.ul({}, ...refSections.map(section=> mk.li({}, ...section.refs.map((ref, refI)=> [ mk.a({ href: `#${ref.id}` }, (refI == 0) ? section.title : `(${refI + 1})` ), " ", ] ), ), ), ), genLinkingSyntaxes(dfn), ); dfnPanel.addEventListener('click', (event) => { if (event.target.nodeName == 'A') { scrollToTargetAndHighlight(event); pinDfnPanel(dfnPanel); } event.stopPropagation(); refocusOnTarget(event); }); dfnPanel.addEventListener('keydown', (event) => { if(event.keyCode == 27) { // Escape key hideDfnPanel({dfnPanel}); event.stopPropagation(); event.preventDefault(); } }); dfnPanel.dfn = dfn; dfn.dfnPanel = dfnPanel; return dfnPanel; } function hideAllDfnPanels() { // Delete the currently-active dfn panel. queryAll(".dfn-panel").forEach(dfnPanel=>hideDfnPanel({dfnPanel})); } function showDfnPanel(dfn) { hideAllDfnPanels(); // Only display one at a time. dfn.setAttribute("aria-expanded", "true"); const dfnPanel = genDfnPanel(dfn, dfn.panelData); // Give the dfn a unique tabindex, and then // give all the tabbable panel bits successive indexes. let tabIndex = 100; dfn.tabIndex = tabIndex++; const tabbable = dfnPanel.querySelectorAll(":is(a, button)"); for (const el of tabbable) { el.tabIndex = tabIndex++; } append(document.body, dfnPanel); positionDfnPanel(dfnPanel); } function positionDfnPanel(dfnPanel) { const dfn = dfnPanel.dfn; const dfnPos = getBounds(dfn); dfnPanel.style.top = dfnPos.bottom + "px"; dfnPanel.style.left = dfnPos.left + "px"; const panelPos = dfnPanel.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, dfnPos.left - overflowAmount); dfnPanel.style.left = newLeft + "px"; } } function pinDfnPanel(dfnPanel) { // Switch it to "activated" state, which pins it. dfnPanel.classList.add("activated"); dfnPanel.style.position = "fixed"; dfnPanel.style.left = null; dfnPanel.style.top = null; } function hideDfnPanel({dfn, dfnPanel}) { if(!dfnPanel) dfnPanel = dfn.dfnPanel; if(!dfn) dfn = dfnPanel.dfn; dfn.dfnPanel = undefined; dfnPanel.dfn = undefined; dfn.setAttribute("aria-expanded", "false"); dfn.tabIndex = undefined; dfnPanel.remove() } function toggleDfnPanel(dfn) { if(dfn.dfnPanel) { hideDfnPanel(dfn); } else { showDfnPanel(dfn); } } function insertDfnPopupAction(dfn) { dfn.setAttribute('role', 'button'); dfn.setAttribute('aria-expanded', 'false') dfn.tabIndex = 0; dfn.classList.add('has-dfn-panel'); dfn.addEventListener('click', (event) => { toggleDfnPanel(dfn); event.stopPropagation(); }); dfn.addEventListener('keypress', (event) => { const kc = event.keyCode; // 32->Space, 13->Enter if(kc == 32 || kc == 13) { toggleDfnPanel(dfn); event.stopPropagation(); event.preventDefault(); } }); } function refocusOnTarget(event) { const target = event.target; setTimeout(() => { // Refocus on the event.target element. // This is needed after browser scrolls to the destination. target.focus(); }); } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function scrollToTargetAndHighlight(event) { let hash = event.target.hash; if (hash) { hash = decodeURIComponent(hash.substring(1)); const dest = document.getElementById(hash); if (dest) { dest.classList.add('highlighted'); setTimeout(() => dest.classList.remove('highlighted'), 1000); } } } // Functions, divided by link type, that wrap an autolink's // contents with the appropriate outer syntax. // Alternately, a string naming another type they format // the same as. function needsFor(type) { switch(type) { case "descriptor": case "value": case "element-attr": case "attr-value": case "element-state": case "method": case "constructor": case "argument": case "attribute": case "const": case "dict-member": case "event": case "enum-value": case "stringifier": case "serializer": case "iterator": case "maplike": case "setlike": case "state": case "mode": case "context": case "facet": return true; default: return false; } } function refusesFor(type) { switch(type) { case "property": case "element": case "interface": case "namespace": case "callback": case "dictionary": case "enum": case "exception": case "typedef": case "http-header": case "permission": return true; default: return false; } } function linkFormatterFromType(type) { switch(type) { case 'scheme': case 'permission': case 'dfn': return (text) => `[=${text}=]`; case 'abstract-op': return (text) => `[\$${text}\$]`; case 'function': case 'at-rule': case 'selector': case 'value': return (text) => `''${text}''`; case 'http-header': return (text) => `[:${text}:]`; case 'interface': case 'constructor': case 'method': case 'argument': case 'attribute': case 'callback': case 'dictionary': case 'dict-member': case 'enum': case 'enum-value': case 'exception': case 'const': case 'typedef': case 'stringifier': case 'serializer': case 'iterator': case 'maplike': case 'setlike': case 'extended-attribute': case 'event': case 'idl': return (text) => `{{${text}}}`; case 'element-state': case 'element-attr': case 'attr-value': case 'element': return (element) => `<{${element}}>`; case 'grammar': return (text) => `${text} (within a <pre class=prod>)`; case 'type': return (text)=> `<<${text}>>`; case 'descriptor': case 'property': return (text) => `'${text}'`; default: return; }; }; function genLinkingSyntaxes(dfn) { if(dfn.tagName != "DFN") return; const type = dfn.getAttribute('data-dfn-type'); if(!type) { console.log(`<dfn> doesn't have a data-dfn-type:`, dfn); return []; } // Return a function that wraps link text based on the type const linkFormatter = linkFormatterFromType(type); if(!linkFormatter) { console.log(`<dfn> has an unknown data-dfn-type:`, dfn); return []; } let ltAlts; if(dfn.hasAttribute('data-lt')) { ltAlts = dfn.getAttribute('data-lt') .split("|") .map(x=>x.trim()); } else { ltAlts = [dfn.textContent.trim()]; } if(type == "type") { // lt of "<foo>", but "foo" is the interior; // <<foo/bar>> is how you write it with a for, // not <foo/<bar>> or whatever. for(var i = 0; i < ltAlts.length; i++) { const lt = ltAlts[i]; const match = /<(.*)>/.exec(lt); if(match) { ltAlts[i] = match[1]; } } } let forAlts; if(dfn.hasAttribute('data-dfn-for')) { forAlts = dfn.getAttribute('data-dfn-for') .split(",") .map(x=>x.trim()); } else { forAlts = ['']; } let linkingSyntaxes = []; if(!needsFor(type)) { for(const lt of ltAlts) { linkingSyntaxes.push(linkFormatter(lt)); } } if(!refusesFor(type)) { for(const f of forAlts) { linkingSyntaxes.push(linkFormatter(`${f}/${ltAlts[0]}`)) } } return [ mk.b({}, 'Possible linking syntaxes:'), mk.ul({}, ...linkingSyntaxes.map(link => { const copyLink = async () => await navigator.clipboard.writeText(link); return mk.li({}, mk.div({ class: 'link-item' }, mk.button({ class: 'copy-icon', title: 'Copy', type: 'button', _onclick: copyLink, tabindex: 0, }, mk.span({ class: 'icon' }) ), mk.span({}, link) ) ); }) ) ]; } } </script> <script>/* Boilerplate: script-link-titles */ "use strict"; { let linkTitleData = { "https://www.w3.org/TR/css-values-4/#length-value": "Expands to: advance measure | cap | ch | cm | dvb | dvh | dvi | dvmax | dvmin | dvw | em | ex | ic | in | lh | lvb | lvh | lvi | lvmax | lvmin | lvw | mm | pc | pt | px | q | rcap | rch | rem | rex | ric | rlh | svb | svh | svi | svmax | svmin | svw | vb | vh | vi | vmax | vmin | vw", }; function setTypeTitles() { for(let el of document.querySelectorAll("a[href]")) { if(el.href in linkTitleData && !el.hasAttribute("title")) { el.setAttribute("title", linkTitleData[el.href]); } } } document.addEventListener("DOMContentLoaded", setTypeTitles); } </script> <script>/* Boilerplate: script-ref-hints */ "use strict"; { let refsData = { "#block-scripts": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"block scripts","type":"dfn","url":"#block-scripts"}, "#character": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"character","type":"dfn","url":"#character"}, "#clustered-scripts": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"clustered scripts","type":"dfn","url":"#clustered-scripts"}, "#collapsible-white-space": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"collapsible","type":"dfn","url":"#collapsible-white-space"}, "#conditionally-hang": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"conditionally hang","type":"dfn","url":"#conditionally-hang"}, "#content-language": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"content language","type":"dfn","url":"#content-language"}, "#content-writing-system": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"writing system","type":"dfn","url":"#content-writing-system"}, "#cursive-script": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"cursive script","type":"dfn","url":"#cursive-script"}, "#forced-line-break": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"forced line break","type":"dfn","url":"#forced-line-break"}, "#full-width": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"full-width","type":"dfn","url":"#full-width"}, "#grapheme-cluster": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"grapheme cluster","type":"dfn","url":"#grapheme-cluster"}, "#hang": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"hang","type":"dfn","url":"#hang"}, "#hanging-glyph": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"hanging glyph","type":"dfn","url":"#hanging-glyph"}, "#hyphenate": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"hyphenation","type":"dfn","url":"#hyphenate"}, "#hyphenation-opportunity": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"hyphenation opportunity","type":"dfn","url":"#hyphenation-opportunity"}, "#justification-opportunity": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"justification opportunity","type":"dfn","url":"#justification-opportunity"}, "#kana-full-size": {"export":true,"for_":["kana"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"full-size kana","type":"dfn","url":"#kana-full-size"}, "#kana-small": {"export":true,"for_":["kana"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"small kana","type":"dfn","url":"#kana-small"}, "#letter": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"letter","type":"dfn","url":"#letter"}, "#line-break": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"line break","type":"dfn","url":"#line-break"}, "#line-breaking-process": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"line breaking","type":"dfn","url":"#line-breaking-process"}, "#other-space-separators": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"other space separators","type":"dfn","url":"#other-space-separators"}, "#preserved-white-space": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"preserved","type":"dfn","url":"#preserved-white-space"}, "#propdef-hanging-punctuation": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"hanging-punctuation","type":"property","url":"#propdef-hanging-punctuation"}, "#propdef-hyphens": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"hyphens","type":"property","url":"#propdef-hyphens"}, "#propdef-letter-spacing": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"letter-spacing","type":"property","url":"#propdef-letter-spacing"}, "#propdef-line-break": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"line-break","type":"property","url":"#propdef-line-break"}, "#propdef-overflow-wrap": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"overflow-wrap","type":"property","url":"#propdef-overflow-wrap"}, "#propdef-tab-size": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"tab-size","type":"property","url":"#propdef-tab-size"}, "#propdef-text-align": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"text-align","type":"property","url":"#propdef-text-align"}, "#propdef-text-align-all": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"text-align-all","type":"property","url":"#propdef-text-align-all"}, "#propdef-text-align-last": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"text-align-last","type":"property","url":"#propdef-text-align-last"}, "#propdef-text-indent": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"text-indent","type":"property","url":"#propdef-text-indent"}, "#propdef-text-justify": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"text-justify","type":"property","url":"#propdef-text-justify"}, "#propdef-text-transform": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"text-transform","type":"property","url":"#propdef-text-transform"}, "#propdef-white-space": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"white-space","type":"property","url":"#propdef-white-space"}, "#propdef-word-break": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"word-break","type":"property","url":"#propdef-word-break"}, "#propdef-word-spacing": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"word-spacing","type":"property","url":"#propdef-word-spacing"}, "#propdef-word-wrap": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"word-wrap","type":"property","url":"#propdef-word-wrap"}, "#segment-break": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"segment break","type":"dfn","url":"#segment-break"}, "#soft-wrap-break": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"soft wrap break","type":"dfn","url":"#soft-wrap-break"}, "#soft-wrap-opportunity": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"soft wrap opportunity","type":"dfn","url":"#soft-wrap-opportunity"}, "#spaces": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"spaces","type":"dfn","url":"#spaces"}, "#stop-or-comma": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"stop or comma","type":"dfn","url":"#stop-or-comma"}, "#tab-size-dfn": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"tab size","type":"dfn","url":"#tab-size-dfn"}, "#tab-stop": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"tab stop","type":"dfn","url":"#tab-stop"}, "#tabs": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"tabs","type":"dfn","url":"#tabs"}, "#typographic-character-unit": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"typographic character","type":"dfn","url":"#typographic-character-unit"}, "#typographic-letter-unit": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"typographic letter unit","type":"dfn","url":"#typographic-letter-unit"}, "#unicode-east-asian-width": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"east asian width property","type":"dfn","url":"#unicode-east-asian-width"}, "#unicode-general-category": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"general category","type":"dfn","url":"#unicode-general-category"}, "#unicode-script": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"unicode script","type":"dfn","url":"#unicode-script"}, "#valdef-hanging-punctuation-allow-end": {"export":true,"for_":["hanging-punctuation"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"allow-end","type":"value","url":"#valdef-hanging-punctuation-allow-end"}, "#valdef-hanging-punctuation-force-end": {"export":true,"for_":["hanging-punctuation"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"force-end","type":"value","url":"#valdef-hanging-punctuation-force-end"}, "#valdef-letter-spacing-normal": {"export":true,"for_":["letter-spacing"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"normal","type":"value","url":"#valdef-letter-spacing-normal"}, "#valdef-line-break-anywhere": {"export":true,"for_":["line-break"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"anywhere","type":"value","url":"#valdef-line-break-anywhere"}, "#valdef-line-break-loose": {"export":true,"for_":["line-break"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"loose","type":"value","url":"#valdef-line-break-loose"}, "#valdef-line-break-normal": {"export":true,"for_":["line-break"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"normal","type":"value","url":"#valdef-line-break-normal"}, "#valdef-line-break-strict": {"export":true,"for_":["line-break"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"strict","type":"value","url":"#valdef-line-break-strict"}, "#valdef-overflow-wrap-anywhere": {"export":true,"for_":["overflow-wrap"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"anywhere","type":"value","url":"#valdef-overflow-wrap-anywhere"}, "#valdef-overflow-wrap-break-word": {"export":true,"for_":["overflow-wrap"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"break-word","type":"value","url":"#valdef-overflow-wrap-break-word"}, "#valdef-text-align-center": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"center","type":"value","url":"#valdef-text-align-center"}, "#valdef-text-align-end": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"end","type":"value","url":"#valdef-text-align-end"}, "#valdef-text-align-justify": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"justify","type":"value","url":"#valdef-text-align-justify"}, "#valdef-text-align-justify-all": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"justify-all","type":"value","url":"#valdef-text-align-justify-all"}, "#valdef-text-align-last-auto": {"export":true,"for_":["text-align-last"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"auto","type":"value","url":"#valdef-text-align-last-auto"}, "#valdef-text-align-left": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"left","type":"value","url":"#valdef-text-align-left"}, "#valdef-text-align-match-parent": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"match-parent","type":"value","url":"#valdef-text-align-match-parent"}, "#valdef-text-align-right": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"right","type":"value","url":"#valdef-text-align-right"}, "#valdef-text-align-start": {"export":true,"for_":["text-align"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"start","type":"value","url":"#valdef-text-align-start"}, "#valdef-text-indent-each-line": {"export":true,"for_":["text-indent"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"each-line","type":"value","url":"#valdef-text-indent-each-line"}, "#valdef-text-indent-hanging": {"export":true,"for_":["text-indent"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"hanging","type":"value","url":"#valdef-text-indent-hanging"}, "#valdef-text-justify-auto": {"export":true,"for_":["text-justify"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"auto","type":"value","url":"#valdef-text-justify-auto"}, "#valdef-text-justify-distribute": {"export":true,"for_":["text-justify"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"distribute","type":"value","url":"#valdef-text-justify-distribute"}, "#valdef-text-justify-inter-character": {"export":true,"for_":["text-justify"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"inter-character","type":"value","url":"#valdef-text-justify-inter-character"}, "#valdef-text-justify-inter-word": {"export":true,"for_":["text-justify"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"inter-word","type":"value","url":"#valdef-text-justify-inter-word"}, "#valdef-text-transform-capitalize": {"export":true,"for_":["text-transform"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"capitalize","type":"value","url":"#valdef-text-transform-capitalize"}, "#valdef-text-transform-full-size-kana": {"export":true,"for_":["text-transform"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"full-size-kana","type":"value","url":"#valdef-text-transform-full-size-kana"}, "#valdef-text-transform-full-width": {"export":true,"for_":["text-transform"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"full-width","type":"value","url":"#valdef-text-transform-full-width"}, "#valdef-text-transform-lowercase": {"export":true,"for_":["text-transform"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"lowercase","type":"value","url":"#valdef-text-transform-lowercase"}, "#valdef-text-transform-uppercase": {"export":true,"for_":["text-transform"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"uppercase","type":"value","url":"#valdef-text-transform-uppercase"}, "#valdef-white-space-break-spaces": {"export":true,"for_":["white-space"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"break-spaces","type":"value","url":"#valdef-white-space-break-spaces"}, "#valdef-white-space-normal": {"export":true,"for_":["white-space"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"normal","type":"value","url":"#valdef-white-space-normal"}, "#valdef-white-space-nowrap": {"export":true,"for_":["white-space"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"nowrap","type":"value","url":"#valdef-white-space-nowrap"}, "#valdef-white-space-pre": {"export":true,"for_":["white-space"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"pre","type":"value","url":"#valdef-white-space-pre"}, "#valdef-white-space-pre-line": {"export":true,"for_":["white-space"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"pre-line","type":"value","url":"#valdef-white-space-pre-line"}, "#valdef-white-space-pre-wrap": {"export":true,"for_":["white-space"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"pre-wrap","type":"value","url":"#valdef-white-space-pre-wrap"}, "#valdef-word-break-break-all": {"export":true,"for_":["word-break"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"break-all","type":"value","url":"#valdef-word-break-break-all"}, "#valdef-word-break-normal": {"export":true,"for_":["word-break"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"normal","type":"value","url":"#valdef-word-break-normal"}, "#white-space": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"white space","type":"dfn","url":"#white-space"}, "#word-separator": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"word separator","type":"dfn","url":"#word-separator"}, "#wrapping": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"wrap","type":"dfn","url":"#wrapping"}, "#writing-system-chinese": {"export":true,"for_":["writing-system"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"chinese","type":"dfn","url":"#writing-system-chinese"}, "#writing-system-japanese": {"export":true,"for_":["writing-system"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"japanese","type":"dfn","url":"#writing-system-japanese"}, "#writing-system-korean": {"export":true,"for_":["writing-system"],"level":"3","normative":true,"shortname":"css-text","spec":"css-text-3","status":"local","text":"korean","type":"dfn","url":"#writing-system-korean"}, "https://html.spec.whatwg.org/multipage/dom.html#language": {"export":true,"for_":["Node"],"level":"1","normative":true,"shortname":"html","spec":"html","status":"current","text":"language","type":"dfn","url":"https://html.spec.whatwg.org/multipage/dom.html#language"}, "https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element": {"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://infra.spec.whatwg.org/#normalize-newlines": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"infra","spec":"infra","status":"current","text":"normalize newlines","type":"dfn","url":"https://infra.spec.whatwg.org/#normalize-newlines"}, "https://www.w3.org/TR/CSS21/conform.html#doclanguage": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css","spec":"css2","status":"snapshot","text":"document language","type":"dfn","url":"https://www.w3.org/TR/CSS21/conform.html#doclanguage"}, "https://www.w3.org/TR/css-backgrounds-3/#propdef-border": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-backgrounds","spec":"css-backgrounds-3","status":"snapshot","text":"border","type":"property","url":"https://www.w3.org/TR/css-backgrounds-3/#propdef-border"}, "https://www.w3.org/TR/css-box-4/#propdef-margin": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"snapshot","text":"margin","type":"property","url":"https://www.w3.org/TR/css-box-4/#propdef-margin"}, "https://www.w3.org/TR/css-box-4/#propdef-padding": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-box","spec":"css-box-4","status":"snapshot","text":"padding","type":"property","url":"https://www.w3.org/TR/css-box-4/#propdef-padding"}, "https://www.w3.org/TR/css-cascade-5/#css-legacy-value-alias": {"export":true,"for_":["CSS"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"legacy value alias","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#css-legacy-value-alias"}, "https://www.w3.org/TR/css-cascade-5/#inherited-value": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"inherited value","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#inherited-value"}, "https://www.w3.org/TR/css-cascade-5/#legacy-name-alias": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"legacy name alias","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#legacy-name-alias"}, "https://www.w3.org/TR/css-cascade-5/#shorthand-property": {"export":true,"for_":[],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"shorthand property","type":"dfn","url":"https://www.w3.org/TR/css-cascade-5/#shorthand-property"}, "https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit": {"export":true,"for_":["all"],"level":"5","normative":true,"shortname":"css-cascade","spec":"css-cascade-5","status":"snapshot","text":"inherit","type":"value","url":"https://www.w3.org/TR/css-cascade-5/#valdef-all-inherit"}, "https://www.w3.org/TR/css-display-3/#atomic-inline": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"atomic inline","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#atomic-inline"}, "https://www.w3.org/TR/css-display-3/#block": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"block","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#block"}, "https://www.w3.org/TR/css-display-3/#block-container": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"block container","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#block-container"}, "https://www.w3.org/TR/css-display-3/#containing-block": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"containing block","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#containing-block"}, "https://www.w3.org/TR/css-display-3/#inline-box": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"inline box","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#inline-box"}, "https://www.w3.org/TR/css-display-3/#inline-formatting-context": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"inline formatting context","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#inline-formatting-context"}, "https://www.w3.org/TR/css-display-3/#out-of-flow": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"out-of-flow","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#out-of-flow"}, "https://www.w3.org/TR/css-display-3/#propdef-display": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"display","type":"property","url":"https://www.w3.org/TR/css-display-3/#propdef-display"}, "https://www.w3.org/TR/css-display-3/#root-element": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-display","spec":"css-display-3","status":"snapshot","text":"root element","type":"dfn","url":"https://www.w3.org/TR/css-display-3/#root-element"}, "https://www.w3.org/TR/css-fonts-4/#propdef-font-feature-settings": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-fonts","spec":"css-fonts-4","status":"snapshot","text":"font-feature-settings","type":"property","url":"https://www.w3.org/TR/css-fonts-4/#propdef-font-feature-settings"}, "https://www.w3.org/TR/css-inline-3/#line-box": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"snapshot","text":"line box","type":"dfn","url":"https://www.w3.org/TR/css-inline-3/#line-box"}, "https://www.w3.org/TR/css-inline-3/#propdef-vertical-align": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"snapshot","text":"vertical-align","type":"property","url":"https://www.w3.org/TR/css-inline-3/#propdef-vertical-align"}, "https://www.w3.org/TR/css-inline-3/#valdef-alignment-baseline-baseline": {"export":true,"for_":["alignment-baseline","vertical-align"],"level":"3","normative":true,"shortname":"css-inline","spec":"css-inline-3","status":"snapshot","text":"baseline","type":"value","url":"https://www.w3.org/TR/css-inline-3/#valdef-alignment-baseline-baseline"}, "https://www.w3.org/TR/css-overflow-3/#ink-overflow": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"snapshot","text":"ink overflow","type":"dfn","url":"https://www.w3.org/TR/css-overflow-3/#ink-overflow"}, "https://www.w3.org/TR/css-overflow-3/#scrollable-overflow": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-overflow","spec":"css-overflow-3","status":"snapshot","text":"scrollable overflow","type":"dfn","url":"https://www.w3.org/TR/css-overflow-3/#scrollable-overflow"}, "https://www.w3.org/TR/css-pseudo-4/#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-ruby-1/#ruby": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"css-ruby","spec":"css-ruby-1","status":"snapshot","text":"ruby","type":"dfn","url":"https://www.w3.org/TR/css-ruby-1/#ruby"}, "https://www.w3.org/TR/css-sizing-3/#inner-size": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"inner size","type":"dfn","url":"https://www.w3.org/TR/css-sizing-3/#inner-size"}, "https://www.w3.org/TR/css-sizing-3/#intrinsic-size": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"intrinsic size","type":"dfn","url":"https://www.w3.org/TR/css-sizing-3/#intrinsic-size"}, "https://www.w3.org/TR/css-sizing-3/#intrinsic-size-contribution": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"intrinsic size contribution","type":"dfn","url":"https://www.w3.org/TR/css-sizing-3/#intrinsic-size-contribution"}, "https://www.w3.org/TR/css-sizing-3/#intrinsic-sizing": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"intrinsic sizing","type":"dfn","url":"https://www.w3.org/TR/css-sizing-3/#intrinsic-sizing"}, "https://www.w3.org/TR/css-sizing-3/#max-content": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"max-content size","type":"dfn","url":"https://www.w3.org/TR/css-sizing-3/#max-content"}, "https://www.w3.org/TR/css-sizing-3/#min-content": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-sizing","spec":"css-sizing-3","status":"snapshot","text":"min-content size","type":"dfn","url":"https://www.w3.org/TR/css-sizing-3/#min-content"}, "https://www.w3.org/TR/css-values-4/#comb-all": {"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": {"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": {"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": {"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/#length-value": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"<length>","type":"type","url":"https://www.w3.org/TR/css-values-4/#length-value"}, "https://www.w3.org/TR/css-values-4/#mult-opt": {"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/#number-value": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"<number>","type":"type","url":"https://www.w3.org/TR/css-values-4/#number-value"}, "https://www.w3.org/TR/css-values-4/#typedef-length-percentage": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-values","spec":"css-values-4","status":"snapshot","text":"<length-percentage>","type":"type","url":"https://www.w3.org/TR/css-values-4/#typedef-length-percentage"}, "https://www.w3.org/TR/css-writing-modes-3/#propdef-direction": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-3","status":"snapshot","text":"direction","type":"property","url":"https://www.w3.org/TR/css-writing-modes-3/#propdef-direction"}, "https://www.w3.org/TR/css-writing-modes-3/#propdef-unicode-bidi": {"export":true,"for_":[],"level":"3","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-3","status":"snapshot","text":"unicode-bidi","type":"property","url":"https://www.w3.org/TR/css-writing-modes-3/#propdef-unicode-bidi"}, "https://www.w3.org/TR/css-writing-modes-4/#bidi-isolate": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"bidi-isolate","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#bidi-isolate"}, "https://www.w3.org/TR/css-writing-modes-4/#bidi-paragraph": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"bidi paragraph","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#bidi-paragraph"}, "https://www.w3.org/TR/css-writing-modes-4/#end": {"export":true,"for_":["CSS"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"end","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#end"}, "https://www.w3.org/TR/css-writing-modes-4/#inline-axis": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"inline-axis","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#inline-axis"}, "https://www.w3.org/TR/css-writing-modes-4/#inline-base-direction": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"inline base direction","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#inline-base-direction"}, "https://www.w3.org/TR/css-writing-modes-4/#line-left": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"line-left","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#line-left"}, "https://www.w3.org/TR/css-writing-modes-4/#line-right": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"line-right","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#line-right"}, "https://www.w3.org/TR/css-writing-modes-4/#logical-width": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"logical width","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#logical-width"}, "https://www.w3.org/TR/css-writing-modes-4/#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/#propdef-writing-mode": {"export":true,"for_":[],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"writing-mode","type":"property","url":"https://www.w3.org/TR/css-writing-modes-4/#propdef-writing-mode"}, "https://www.w3.org/TR/css-writing-modes-4/#start": {"export":true,"for_":["CSS"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"start","type":"dfn","url":"https://www.w3.org/TR/css-writing-modes-4/#start"}, "https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright": {"export":true,"for_":["text-orientation"],"level":"4","normative":true,"shortname":"css-writing-modes","spec":"css-writing-modes-4","status":"snapshot","text":"upright","type":"value","url":"https://www.w3.org/TR/css-writing-modes-4/#valdef-text-orientation-upright"}, "https://www.w3.org/TR/cssom-1/#dom-window-getcomputedstyle": {"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/cssom-1/#resolved-value": {"export":true,"for_":[],"level":"1","normative":true,"shortname":"cssom","spec":"cssom-1","status":"snapshot","text":"resolved value","type":"dfn","url":"https://www.w3.org/TR/cssom-1/#resolved-value"}, }; function mkRefHint(link, ref) { const linkText = link.textContent; let dfnTextElements = ''; if (ref.text != linkText) { dfnTextElements = mk.li({}, mk.b({}, "Term: "), mk.span({}, ref.text) ); } const forList = ref.for_; let forListElements; if(forList.length == 0) { forListElements = []; } else if(forList.length == 1) { forListElements = mk.li({}, mk.b({}, "For: "), mk.span({}, forList[0]), ); } else { forListElements = mk.li({}, mk.b({}, "For: "), mk.ul({}, ...forList.map(forItem => mk.li({}, mk.span({}, forItem) ), ), ), ); } const url = ref.url; const safeUrl = encodeURIComponent(url); const hintPanel = mk.aside({ class: "ref-hint", id: `ref-hint-for-${safeUrl}`, "data-for": url, "aria-labelled-by": `ref-hint-for-${safeUrl}`, }, mk.ul({}, dfnTextElements, mk.li({}, mk.b({}, "URL: "), mk.a({ href: url, class: "ref" }, url), ), mk.li({}, mk.b({}, "Type: "), mk.span({}, `${ref.type}`), ), mk.li({}, mk.b({}, "Spec: "), mk.span({}, `${ref.spec ? ref.spec : ''}`), ), forListElements ), ); hintPanel.forLink = link; setupRefHintEventListeners(link, hintPanel); return hintPanel; } function hideAllRefHints() { queryAll(".ref-hint").forEach(el=>hideRefHint(el)); } function hideRefHint(refHint) { const link = refHint.forLink; link.setAttribute("aria-expanded", "false"); if(refHint.teardownEventListeners) { refHint.teardownEventListeners(); } refHint.remove(); } function showRefHint(link) { if(link.classList.contains("dfn-link")) return; const url = link.getAttribute("href"); const ref = refsData[url]; if(!ref) return; hideAllRefHints(); // Only display one at this time. const refHint = mkRefHint(link, ref); append(document.body, refHint); link.setAttribute("aria-expanded", "true"); positionRefHint(refHint); } function setupRefHintEventListeners(link, refHint) { if (refHint.teardownEventListeners) return; // Add event handlers to hide the refHint after the user moves away // from both the link and refHint, if not hovering either within one second. let timeout = null; const startHidingRefHint = (event) => { if (timeout) { clearTimeout(timeout); } timeout = setTimeout(() => { hideRefHint(refHint); }, 1000); } const resetHidingRefHint = (event) => { if (timeout) clearTimeout(timeout); timeout = null; }; link.addEventListener("mouseleave", startHidingRefHint); link.addEventListener("mouseenter", resetHidingRefHint); link.addEventListener("blur", startHidingRefHint); link.addEventListener("focus", resetHidingRefHint); refHint.addEventListener("mouseleave", startHidingRefHint); refHint.addEventListener("mouseenter", resetHidingRefHint); refHint.addEventListener("blur", startHidingRefHint); refHint.addEventListener("focus", resetHidingRefHint); refHint.teardownEventListeners = () => { // remove event listeners resetHidingRefHint(); link.removeEventListener("mouseleave", startHidingRefHint); link.removeEventListener("mouseenter", resetHidingRefHint); link.removeEventListener("blur", startHidingRefHint); link.removeEventListener("focus", resetHidingRefHint); refHint.removeEventListener("mouseleave", startHidingRefHint); refHint.removeEventListener("mouseenter", resetHidingRefHint); refHint.removeEventListener("blur", startHidingRefHint); refHint.removeEventListener("focus", resetHidingRefHint); }; } function positionRefHint(refHint) { const link = refHint.forLink; const linkPos = getBounds(link); refHint.style.top = linkPos.bottom + "px"; refHint.style.left = linkPos.left + "px"; const panelPos = refHint.getBoundingClientRect(); const panelMargin = 8; const maxRight = document.body.parentNode.clientWidth - panelMargin; if (panelPos.right > maxRight) { const overflowAmount = panelPos.right - maxRight; const newLeft = Math.max(panelMargin, linkPos.left - overflowAmount); refHint.style.left = newLeft + "px"; } } // TODO: shared util // Returns the root-level absolute position {left and top} of element. function getBounds(el, relativeTo=document.body) { const relativeRect = relativeTo.getBoundingClientRect(); const elRect = el.getBoundingClientRect(); const top = elRect.top - relativeRect.top; const left = elRect.left - relativeRect.left; return { top, left, bottom: top + elRect.height, right: left + elRect.width, } } function showRefHintListener(e) { // If the target isn't in a link (or is a link), // just ignore it. let link = e.target.closest("a"); if(!link) return; // If the target is in a ref-hint panel // (aka a link in the already-open one), // also just ignore it. if(link.closest(".ref-hint")) return; // Otherwise, show the panel for the link. showRefHint(link); } function hideAllHintsListener(e) { // If the click is inside a ref-hint panel, ignore it. if(e.target.closest(".ref-hint")) return; // Otherwise, close all the current panels. hideAllRefHints(); } document.addEventListener("DOMContentLoaded", () => { document.body.addEventListener("mousedown", showRefHintListener); document.body.addEventListener("focus", showRefHintListener); document.body.addEventListener("click", hideAllHintsListener); }); window.addEventListener("resize", () => { // Hide any open ref hint. hideAllRefHints(); }); } </script>