<pre class='metadata'>
Title: CSS Text Module Level 4
Shortname: css-text
Level: 4
Status: ED
Work Status: Refining
Group: csswg
ED: https://drafts.csswg.org/css-text-4/
TR: https://www.w3.org/TR/css-text-4/
Previous Version: https://www.w3.org/TR/2026/WD-css-text-4-20260608/
Editor: Elika J. Etemad / fantasai, Apple, http://fantasai.inkedblade.net/contact, w3cid 35400
Editor: Koji Ishii, Invited Expert, kojiishi@gluesoft.co.jp, w3cid 45369
Editor: Alan Stearns, Adobe Systems, stearns@adobe.com, w3cid 46659
Editor: Florian Rivoal, Invited Expert, https://florian.rivoal.net, w3cid 43241
Abstract: 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.
Ignored Vars: letter-spacing
WPT Path Prefix: /css/css-text/
</pre>

<pre class=link-defaults>
spec:css-display-3; type:property; text:display
spec:css-fonts-4; type:property; text:font-feature-settings
spec:selectors-4; type:selector; text::lang()
spec:css2; type:dfn; text:document language
spec:css-ruby-1; type:dfn; text:ruby
spec:selectors-4; type:dfn; text:selector
</pre>

<pre class=biblio>
{
	"L2-22-080R": {
		"authors": [
			"Norbert Lindenberg",
			"Elika Etemad",
			"Vaishnavi Murthy Yerkadithaya"
		],
		"href": "https://www.unicode.org/L2/L2022/22080r-line-break-ortho-bnd.pdf",
		"title": "Line breaking at orthographic syllable boundaries",
		"status": "Proposal",
		"publisher": "Unicode Consortium"
	}
}
</pre>

<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>

<h2 id="intro">
Introduction</h2>

	<wpt title="
		The test coverage information in this specification
		covers <a href='https://github.com/web-platform-tests/wpt/tree/master/css/css-text/'>wpt/css/css-text/</a> and subdirectories,
		as well as those tests in <a href='https://github.com/web-platform-tests/wpt/tree/master/css/CSS2/'>wpt/css/CSS2/</a> and subdirectories
		that relate to this specification."></wpt>

	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
	[[#transforming|case transformation]],
	[[#white-space-processing|white space collapsing]],
	[[#white-space-property|text wrapping]],
	[[#line-breaking|line breaking rules]]
	and [[#hyphenation|hyphenation]],
	[[#justification|alignment and justification]],
	[[#spacing|spacing]],
	and [[#edge-effects|indentation]].
	See [[#changes-L3]] for additions since [[CSS-TEXT-3|Level 3]].

	<div class="note">
		Note: Font selection is covered in the <a href="https://www.w3.org/TR/css-fonts-3/"><cite>CSS Fonts Module</cite></a>.
		[[CSS-FONTS-3]]

		<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 [[css-text-decor-3#line-decoration|underlines]],
		[[css-text-decor-3#emphasis-marks|emphasis marks]],
		and [[css-text-decor-3#text-shadow-property|shadows]],
		(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>.
		[[CSS-TEXT-DECOR-3]]

		[[css-writing-modes-4#text-direction|Bidirectional]] and
		[[css-writing-modes-4#vertical-intro|vertical]] text
		are addressed in the
		<a href="https://www.w3.org/TR/css-writing-modes-4/"><cite>CSS Writing Modes Module</cite></a>.
		[[CSS-WRITING-MODES-4]].
	</div>

	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>.
	[[TYPOGRAPHY]]

	<wpt title="
		The following tests are crash tests
		that relate to general usage
		of the features described in this specification
		but are not tied to any particular normative statement.">
	removing-collapsible-crash.html
	removing-collapsible-spaces-before-float-crash.html
	crashtests/line-break-float-crash.html
	crashtests/trailing-space-with-cr-crash.html
	ellisize-rtl-text-crash.html
	altering-dom-crash.html
	whitespace-followed-by-cham-symbol-crash.html
	white-space/append-whitespace-only-node-crash-001.html
	crashtests/rendering-rtl-bidi-override-crash.html
	crashtests/rendering-table-caption-with-list-item-and-svg-crash.html
	crashtests/rendering-table-caption-with-negative-margins-crash.html
	crashtests/white-space-pre-wrap-chash.html
	crashtests/word-spacing-large-value.html
	crashtests/eol-spaces-bidi-min-content-crash.html
	crashtests/overflow-wrap-anywhere-crash.html
	crashtests/text-indent-each-line-crash.html
	overflow-wrap/crashtests/overflow-wrap-leading-floats-crash.html
	text-autospace/crashtests/text-autospace-shape-cache-crash.html
	text-indent/text-indent-ruby-crash.html
	hyphens/hyphens-auto-wordbreak-breakall-crash.html
	</wpt>

<h3 id="placement">
Module Interactions</h3>

	<wpt title="Tests not needed for this section."></wpt>

	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>.
	[[CSS-TEXT-DECOR-3]]
	[[!CSS2]]

	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>.
	[[!CSS2]] and [[!CSS-WRITING-MODES-4]].

<h3 id="values">
Value Definitions</h3>

	<wpt title="
		Tests not really needed for this section;
		could possibly test that css-wide keywords apply to every property."></wpt>

	This specification follows the [[CSS2/about#property-defs|CSS property definition conventions]] from [[!CSS2]]
	using the [[css-values-3#value-defs|value definition syntax]] from [[!CSS-VALUES-3]].
	Value types not defined in this specification are defined in CSS Values &amp; Units [[!CSS-VALUES-3]].
	Combination with other CSS modules may expand the definitions of these value types.

	In addition to the property-specific values listed in their definitions,
	all properties defined in this specification
	also accept the [=CSS-wide keywords=] as their property value.
	For readability they have not been repeated explicitly.

<h3 id="languages">
Languages and Typesetting</h3>

	<wpt title="
		Tests not needed for this section:
		these are definitions,
		they get tested through their application,
		not by themselves."></wpt>

	<p class="advisement">
	<strong>Authors should accurately language-tag their content
	for the best typographic behavior.</strong>

	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 [=content language=] 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.

	The <dfn export>content language</dfn> of an element is the (human) language
	the element is declared to be in, according to the rules of the
	[=document language=].
	Note that it is possible for the [=content language=] of an element
	to be unknown--
	e.g. untagged content,
	or content in a [=document language=] that does not have a language-tagging facility,
	is considered to have an unknown [=content language=].

	Note: Authors can declare the [=content language=]
	using the global <code>lang</code> attribute in HTML
	or the universal <code>xml:lang</code> attribute in XML.
	See the <a spec=html lt=language for=Node>rules for determining the content language of an HTML element</a>
	in <cite>HTML</cite>,
	and the [[XML#sec-lang-tag|rules for determining the content language of an XML element]] in <cite>XML 1.0</cite>.
	[[HTML]]
	[[XML10]]

	The [=content language=] an element is declared to be in
	also identifies the specific written form of that language used in that element,
	known as the <dfn export local-lt="writing system">content writing system</dfn>.
	Depending on the [=document language=]’s facilities for identifying the [=content language=],
	this information can be explicit or implied.
	See the normative [[#script-tagging]].

	Note: Some languages have more than one writing system tradition;
	in other cases a language can be transliterated into a foreign writing system.
	Authors should [[#script-tagging|subtag]] such cases
	so that the UA can adapt appropriately.

	<div class=example>
		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>).

		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.

		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.
	</div>

<h3 id="characters">
Characters and Letters</h3>

	<wpt title="
		For the most part, tests not really needed for this section:
		these are definitions,
		they get tested through their applications,
		by themselves.
		The few testable assertions that are made have coverage.

		Possible additions:
		* turning the content of example 1 into tests (first, check that it’s not already done)."></wpt>

	The basic unit of typesetting is the <dfn export>character</dfn>.
	However, because writing systems are not always as simple as the basic English alphabet,
	what a [=character=] 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 <a>character</a>.
	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 <a>character</a>.

	A basic unit of computer text encoding, for any given encoding,
	is also called a [=character=],
	and depending on the encoding,
	a single encoding [=character=] might correspond
	to the entire pre-composed syllabic [=character=] (e.g. <span lang=ko-hang title="Hangul syllable HAN">한</span>),
	to the individual phonemic [=character=] (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).

	In turn, a single encoding [=character=] can be represented in the data stream as one or more bytes;
	and in programming environments one byte is sometimes also called a [=character=].

	Therefore the term [=character=] is fairly ambiguous where technical precision is required.

	For text layout, we will refer to the <dfn export lt="typographic character unit|typographic character">typographic character unit</dfn>
	as the basic unit of text.
	Even within the realm of text layout,
	the relevant [=character=] unit depends on the operation.
	For example, line-breaking and letter-spacing will segment
	a sequence of Thai characters that include U+0E33 &nbsp;ำ 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 [=typographic character=] 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.).

	<wpt>
	word-break/word-break-break-all-007.html
	word-break/word-break-break-all-008.html
	</wpt>

	<a href="http://www.unicode.org/reports/tr29/"><cite>Unicode Standard Annex #29: Text Segmentation</cite></a>
	defines a unit called the <dfn>grapheme cluster</dfn>
	which approximates the [=typographic character=].
	[[!UAX29]]
	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 [=typographic character unit=].
	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.

	<wpt>
	line-breaking/line-breaking-013.html
	line-breaking/line-breaking-014.html
	</wpt>

	Note: The rules for such tailorings are out of scope for CSS.

	<div class="example">
		The following are some examples of [=typographic character unit=] tailorings
		required by standard typesetting practice:

		<ul>
			<li>
				In some scripts such as Myanmar or Devanagari,
				the [=typographic character unit=] for both justification and line-breaking
				is an entire syllable,
				which can include more than one Unicode [=grapheme cluster=].
				[[!UAX29]]

			<li>
				In other scripts such as Thai or Lao,
				even though for line-breaking the [=typographic character=]
				matches Unicode’s default [=grapheme clusters=],
				for letter-spacing the relevant unit
				is <em>less</em> than a Unicode [=grapheme cluster=],
				and may require decomposition or other substitutions
				before spacing can be inserted.
				[[!UAX29]]

				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: คํ า.

				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: นํ้ า.

			<li>
				Vertical typesetting can also require tailoring.
				For example, when typesetting ''text-orientation/upright'' text,
				Tibetan tsek and shad marks are kept with the preceding grapheme cluster,
				rather than treated as an independent [=typographic character unit=].
				[[!CSS-WRITING-MODES-4]]
		</ul>
	</div>

	A <dfn export>typographic letter unit</dfn>
	(or <dfn noexport>letter</dfn> for the purpose of this specification)
	is a [=typographic character unit=] belonging to one of the Letter or Number
	[=general categories=].
	See [[#character-properties]]
	for how to determine the Unicode properties of a [=typographic character unit=].

	The rendering characteristics of a [=typographic character unit=] 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 [=typographic character unit=] 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 [=typographic character unit=]
	may be rendered as belonging to either side of the boundary,
	or as some approximation of belonging to both.
	Authors are forewarned that dividing [=grapheme clusters=]
	or ligatures
	by element boundaries may give inconsistent or undesired results.

<h3 id="text-encoding">
Text Processing</h3>

	<wpt title="
		This section has adequate coverage.
		Exhaustive coverage unrealistic,
		since this section is effectively a dependency on all of Unicode.
		Some tests nonetheless provided for key functionality
		(such as the effect of certain control characters on Arabic shaping)."></wpt>

	CSS is built on <a href="https://www.unicode.org/versions/latest/">Unicode</a>.
	[[UNICODE]]
	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.

	<wpt>
	text-encoding/shaping-join-001.html
	text-encoding/shaping-join-002.html
	text-encoding/shaping-join-003.html
	text-encoding/shaping-no-join-001.html
	text-encoding/shaping-no-join-002.html
	text-encoding/shaping-no-join-003.html
	text-encoding/shaping-tatweel-001.html
	text-encoding/shaping-tatweel-002.html
	text-encoding/shaping-tatweel-003.html
	shaping/shaping-arabic-diacritics-001.html
	shaping/shaping-arabic-diacritics-002.html
	white-space/full-width-leading-spaces-005.html
	white-space/object-replacement-1.html
	white-space/object-replacement-2.html
	white-space/white-space-vs-joiners-001.html
	white-space/white-space-vs-joiners-002.html
	</wpt>

	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 [=inline box=] boundaries and [=out-of-flow=] elements
	must be ignored.
	With respect to text shaping, however, see [[#boundary-shaping]].

	<wpt>
	line-breaking/line-breaking-002.html
	line-breaking/line-breaking-003.html
	line-breaking/line-breaking-004.html
	line-breaking/line-breaking-005.html
	line-breaking/line-breaking-006.html
	line-breaking/line-breaking-007.html
	line-breaking/line-breaking-008.html
	<!-- to be moved/removed together with the segment break transformation text
	white-space/seg-break-transformation-018.html
	white-space/seg-break-transformation-019.html
	-->
	word-break/word-break-min-content-002.html
	word-break/word-break-min-content-003.html
	word-break/word-break-min-content-004.html
	word-break/word-break-min-content-005.html
	overflow-wrap/overflow-wrap-anywhere-010.html
	</wpt>

	<wpt pathprefix="/css/CSS2/text/">
	white-space-processing-048.xht
	white-space-processing-049.xht
	</wpt>

<h2 id="transforming">
Transforming Text</h2>

<h3 id="text-transform-property" oldids="text-transform,caps-prop">
Case Transforms: the 'text-transform' property</h3>

	<wpt title="
		This section has good test coverage overall,
		and very good i18n coverage in particular.

		Missing tests:
		* no test of Animation type.
		* Applies to text

		Possible additions:
		* An automated test for plain text copy&amp;paste not applying transforms. Not clear such an <em>automated</em> test is possible, but it would be nice to have one if it were."></wpt>

	<pre class="propdef">
	Name: text-transform
	Value: none | [capitalize | uppercase | lowercase ] || full-width || full-size-kana | math-auto
	Initial: none
	Applies to: text
	Inherited: yes
	Canonical order: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/text-transform-valid.html
	parsing/text-transform-invalid.html
	parsing/text-transform-computed.html
	text-transform/text-transform-multiple-001.html
	</wpt>

	<wpt pathprefix="/css/CSS2/css1">
	c545-txttrans-000.xht
	</wpt>

	<wpt pathprefix="/css/CSS2/text/">
	text-transform-005.xht
	text-transform-applies-to-001.xht
	text-transform-applies-to-002.xht
	text-transform-applies-to-003.xht
	text-transform-applies-to-005.xht
	text-transform-applies-to-006.xht
	text-transform-applies-to-007.xht
	text-transform-applies-to-008.xht
	text-transform-applies-to-009.xht
	text-transform-applies-to-010.xht
	text-transform-applies-to-011.xht
	text-transform-applies-to-012.xht
	text-transform-applies-to-013.xht
	text-transform-applies-to-014.xht
	text-transform-applies-to-015.xht
	</wpt>

	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 &amp; paste operation.

	<wpt>
	text-transform/text-transform-upperlower-105.html
	</wpt>

	Advisement: Authors must not rely on 'text-transform' for semantic purposes;
	rather the correct casing and semantics should be encoded
	in the source document text and markup.

	<wpt>
	text-transform/text-transform-copy-paste-001-manual.html
	</wpt>

	Values have the following meanings:

	<dl dfn-for=text-transform dfn-type=value>
		<dt><dfn>none</dfn>
		<dd>
			No effects.

			<wpt>
			text-transform/text-transform-none-001.xht
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			text-transform-004.xht
			</wpt>

		<dt><dfn>capitalize</dfn>
		<dd>
			Puts the first [=typographic letter unit=] of each word, if lowercase, in titlecase;
			other characters are unaffected.

			<wpt>
			text-transform/text-transform-capitalize-001.html
			text-transform/text-transform-capitalize-003.html
			text-transform/text-transform-capitalize-005.html
			text-transform/text-transform-capitalize-007.html
			text-transform/text-transform-capitalize-009.html
			text-transform/text-transform-capitalize-010.html
			text-transform/text-transform-capitalize-011.html
			text-transform/text-transform-capitalize-014.html
			text-transform/text-transform-capitalize-016.html
			text-transform/text-transform-capitalize-018.html
			text-transform/text-transform-capitalize-020.html
			text-transform/text-transform-capitalize-022.html
			text-transform/text-transform-capitalize-024.html
			text-transform/text-transform-capitalize-026.html
			text-transform/text-transform-capitalize-028.html
			text-transform/text-transform-capitalize-030.html
			text-transform/text-transform-capitalize-031.html
			text-transform/text-transform-capitalize-032.xht
			text-transform/text-transform-capitalize-034.html
			text-transform/text-transform-capitalize-035.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			text-transform-001.xht
			text-transform-cap-001.xht
			text-transform-cap-002.xht
			text-transform-cap-003.xht
			</wpt>

		<dt><dfn>uppercase</dfn>
		<dd>
			Puts all [=letters=] in uppercase.

			<wpt>
			text-transform/text-transform-uppercase-101.xht
			text-transform/text-transform-upperlower-001.html
			text-transform/text-transform-upperlower-003.html
			text-transform/text-transform-upperlower-005.html
			text-transform/text-transform-upperlower-007.html
			text-transform/text-transform-upperlower-009.html
			text-transform/text-transform-upperlower-011.html
			text-transform/text-transform-upperlower-015.html
			text-transform/text-transform-upperlower-017.html
			text-transform/text-transform-upperlower-019.html
			text-transform/text-transform-upperlower-021.html
			text-transform/text-transform-upperlower-023.html
			text-transform/text-transform-upperlower-025.html
			text-transform/text-transform-upperlower-027.html
			text-transform/text-transform-upperlower-029.html
			text-transform/text-transform-upperlower-031.html
			text-transform/text-transform-upperlower-044.html
			text-transform/text-transform-upperlower-101.html
			text-transform/text-transform-upperlower-103.html
			text-transform/text-transform-upperlower-106.html
			text-transform/text-transform-uppercase-dynamic.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			text-transform-003.xht
			text-transform-bicameral-001.xht
			text-transform-bicameral-003.xht
			text-transform-bicameral-005.xht
			text-transform-bicameral-007.xht
			text-transform-bicameral-009.xht
			text-transform-bicameral-011.xht
			text-transform-bicameral-013.xht
			text-transform-bicameral-015.xht
			text-transform-bicameral-017.xht
			text-transform-bicameral-019.xht
			text-transform-bicameral-021.xht
			text-transform-unicase-001.xht
			text-transform-uppercase-001.xht
			text-transform-uppercase-002.xht
			</wpt>

		<dt><dfn>lowercase</dfn>
		<dd>
			Puts all [=letters=] in lowercase.

			<wpt>
			text-transform/text-transform-lowercase-101.xht
			text-transform/text-transform-lowercase-102.xht
			text-transform/text-transform-upperlower-002.html
			text-transform/text-transform-upperlower-004.html
			text-transform/text-transform-upperlower-006.html
			text-transform/text-transform-upperlower-008.html
			text-transform/text-transform-upperlower-010.html
			text-transform/text-transform-upperlower-012.html
			text-transform/text-transform-upperlower-014.html
			text-transform/text-transform-upperlower-016.html
			text-transform/text-transform-upperlower-018.html
			text-transform/text-transform-upperlower-020.html
			text-transform/text-transform-upperlower-022.html
			text-transform/text-transform-upperlower-024.html
			text-transform/text-transform-upperlower-026.html
			text-transform/text-transform-upperlower-028.html
			text-transform/text-transform-upperlower-030.html
			text-transform/text-transform-upperlower-102.html
			text-transform/text-transform-upperlower-104.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			text-transform-002.xht
			text-transform-bicameral-002.xht
			text-transform-bicameral-004.xht
			text-transform-bicameral-006.xht
			text-transform-bicameral-008.xht
			text-transform-bicameral-010.xht
			text-transform-bicameral-012.xht
			text-transform-bicameral-014.xht
			text-transform-bicameral-016.xht
			text-transform-bicameral-018.xht
			text-transform-bicameral-020.xht
			text-transform-bicameral-022.xht
			text-transform-lowercase-001.xht
			</wpt>

		<dt><dfn>full-width</dfn>
		<dd>
			Puts all [=typographic character units=] in [=full-width=] form.
			If a character does not have a corresponding [=full-width=] form,
			it is left as is.
			This value is typically used to typeset Latin letters and digits
			as if they were ideographic characters.

			<wpt>
			text-transform/text-transform-fullwidth-001.xht
			text-transform/text-transform-fullwidth-002.xht
			text-transform/text-transform-fullwidth-004.xht
			text-transform/text-transform-fullwidth-005.xht
			</wpt>

		<dt><dfn>full-size-kana</dfn>
		<dd>
			Converts all [=small Kana=] characters to the equivalent [=full-size Kana=].
			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.

			<wpt>
			text-transform/text-transform-full-size-kana-001.html
			text-transform/text-transform-full-size-kana-002.html
			text-transform/text-transform-full-size-kana-003.html
			text-transform/text-transform-full-size-kana-004.html
			text-transform/text-transform-full-size-kana-005.html
			text-transform/text-transform-full-size-kana-006.html
			text-transform/text-transform-full-size-kana-007.html
			text-transform/text-transform-full-size-kana-008.html
			</wpt>

		<dt><dfn>math-auto</dfn>
		<dd>
			See [[mathml-core#math-auto-transform]].

			<wpt>
			text-transform/math/text-transform-math-auto-001.html
			text-transform/math/text-transform-math-auto-002.html
			text-transform/math/text-transform-math-auto-003.html
			</wpt>
	</dl>

	<div class="example">
		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 highlight=css>abbr:lang(ja) { text-transform: full-width; }</pre>
	</div>

	Note: The purpose of 'text-transform' is
	to allow for presentational casing transformations
	without affecting the semantics of the document.
	Note in particular that 'text-transform' 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.

	<div class="example">
		In this example,
		the first line of text is capitalized as a visual effect.

		<pre highlight=css>
			section > p:first-of-type::first-line {
				text-transform: uppercase;
			}
		</pre>

		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.
	</div>

	<div class="example">
		In this example,
		the [=ruby=] annotations,
		which are half the size of the main paragraph text,
		are transformed to use regular-size kana
		in place of [=small kana=].

		<pre highlight=css>
			rt { font-size: 50%; text-transform: full-size-kana; }
			:is(h1, h2, h3, h4) rt { text-transform: none; /* unset for large text*/ }
		</pre>

		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 [=small kana=]
		in the appropriate places--
		not unlike reading a Latin inscription
		where all “U”s look like “V”s.

		For example, if ''text-transform: full-size-kana'' 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 “十”.
		<xmp highlight=html>
			<ruby>十<rt>じゅう</ruby>
		</xmp>
	</div>

<h4 id="text-transform-mapping">
Mapping Rules</h4>

	<wpt title="
		This section has adequate test coverage."></wpt>

	For ''capitalize'', what constitutes a “word“ is UA-dependent;
	[[!UAX29]] is suggested (but not required)
	for determining such word boundaries.
	[=Out-of-flow boxes=] and [=inline box=] boundaries
	must not introduce a 'text-transform' word boundary
	and must be ignored when determining such word boundaries.

	<wpt>
	text-transform/text-transform-capitalize-033.html
	text-transform/text-transform-capitalize-034.html
	text-transform/text-transform-capitalize-035.html
	</wpt>

	Note: Authors cannot depend on ''capitalize'' to follow
	language-specific titlecasing conventions
	(such as skipping articles in English).

	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>.
	[[!UNICODE]]
	If (and only if) the [=content language=] of the element is,
	according to the rules of the [=document language=],
	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>.

	<wpt>
	writing-system/writing-system-text-transform-001.html
	text-transform/text-transform-tailoring-001.html
	text-transform/text-transform-tailoring-002.html
	text-transform/text-transform-tailoring-002a.html
	text-transform/text-transform-tailoring-003.html
	text-transform/text-transform-tailoring-004.html
	text-transform/text-transform-tailoring-005.html
	text-transform/text-transform-upperlower-032.html
	text-transform/text-transform-upperlower-033.html
	text-transform/text-transform-upperlower-034.html
	text-transform/text-transform-upperlower-035.html
	text-transform/text-transform-upperlower-038.html
	text-transform/text-transform-upperlower-039.html
	text-transform/text-transform-upperlower-040.html
	text-transform/text-transform-upperlower-041.html
	text-transform/text-transform-upperlower-042.html
	text-transform/text-transform-upperlower-043.html
	</wpt>

	<div class="example">
		For example, in Turkish there are two &ldquo;i&rdquo;s,
		one with a dot--
		&ldquo;İ&rdquo; and &ldquo;i&rdquo;--
		and one without--
		&ldquo;I&rdquo; and &ldquo;ı&rdquo;.
		Thus the usual case mappings between &ldquo;I&rdquo; and &ldquo;i&rdquo;
		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 [=content language=] is Turkish
		written in its modern Latin-based [=writing system=]
		(or another Turkic language that uses Turkish casing rules);
		in other languages,
		the usual mapping of &ldquo;I&rdquo; and &ldquo;i&rdquo; is required.
		This rule is thus conditionally defined in Unicode’s SpecialCasing.txt file.
	</div>

	<wpt pathprefix="/css/CSS2/text/">
	text-transform-bicameral-005.xht
	text-transform-bicameral-006.xht
	</wpt>

	The definition of <dfn>full-width</dfn> and <dfn noexport>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>.
	[[!UAX11]]
	The mapping to [=full-width=] form is defined
	by taking code points with the <code>&lt;wide&gt;</code>
	or the <code>&lt;narrow&gt;</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>.
	[[!UAX44]]
	For the <code>&lt;narrow&gt;</code> tag,
	the mapping is from the code point to the decomposition
	(minus <code>&lt;narrow&gt;</code> tag),
	and for the <code>&lt;wide&gt;</code> tag,
	the mapping is from the decomposition
	(minus the <code>&lt;wide&gt;</code> tag)
	back to the original code point.

	<wpt>
	text-transform/text-transform-fullwidth-001.xht
	text-transform/text-transform-fullwidth-002.xht
	text-transform/text-transform-fullwidth-004.xht
	text-transform/text-transform-fullwidth-005.xht
	text-transform/text-transform-fullwidth-006.html
	text-transform/text-transform-fullwidth-007.html
	</wpt>

	The mappings for [=small Kana=] to [=full-size Kana=] are defined in [[#small-kana]].


<h3 id=word-space-transform oldids="word-boundary-expansion">
Expanding Between Words: the 'word-space-transform' property</h3>

	<wpt title="
		This section has generally good coverage.

		Missing tests:
		* no test of Animation type
	"></wpt>

	<pre class="propdef">
	Name: word-space-transform
	Value: none | [ space | ideographic-space ] && auto-phrase?
	Initial: none
	Applies to: text
	Inherited: yes
	Percentages: N/A
	Computed value: as specified
	Animation type: discrete
	</pre>

	<wpt>
		parsing/word-space-transform-computed.html
		parsing/word-space-transform-invalid.html
		parsing/word-space-transform-valid.html
		word-space-transform/word-space-transform-003.html
		word-space-transform/word-space-transform-004.html
		word-space-transform/word-space-transform-005.html
		word-space-transform/word-space-transform-006.html
	</wpt>


	Some languages and writing systems have alternative ways
	of delimiting words,
	either using different separating characters,
	or sometimes no visible character at all.
	This property allows authors to change the rendering
	from one style to another
	without needing to change the markup.

	<dl dfn-for="word-space-transform" dfn-type="value">
		<dt><dfn>none</dfn>
		<dd>This property has no effect.

			<wpt>
				word-space-transform/word-space-transform-004.html
				word-space-transform/word-space-transform-005.html
			</wpt>

		<dt><dfn>space</dfn>
		<dd>
			[=Expandable separators=]
			within the child [=text sequence|text=] of this element
			are replaced by U+0020 SPACE.

			<wpt>
				word-space-transform/word-space-transform-002.html
				word-space-transform/word-space-transform-004.html
				word-space-transform/word-space-transform-005.html
				word-space-transform/word-space-transform-006.html
				word-space-transform/word-space-transform-007.html
				word-space-transform/word-space-transform-008.html
				word-space-transform/word-space-transform-009.html
				word-space-transform/word-space-transform-014.html
				word-space-transform/word-space-transform-015-manual.html
				word-space-transform/word-space-transform-017.html
				word-space-transform/word-space-transform-018.html
			</wpt>

		<dt><dfn>ideographic-space</dfn>
		<dd>
			[=Expandable separators=]
			within the child [=text sequence|text=] of this element
			are replaced by U+3000 IDEOGRAPHIC SPACE.

			<wpt>
				word-space-transform/word-space-transform-001.html
				word-space-transform/word-space-transform-003.html
				word-space-transform/word-space-transform-010.html
				word-space-transform/word-space-transform-011.html
				word-space-transform/word-space-transform-012.html
				word-space-transform/word-space-transform-013.html
				word-space-transform/word-space-transform-016.html
				word-space-transform/word-space-transform-019.html
				word-space-transform/word-space-transform-020.html
				word-space-transform/word-space-transform-021.html
				word-space-transform/word-space-transform-022.html
				word-space-transform/word-space-transform-023.html
				word-space-transform/word-space-transform-024.html
				word-space-transform/word-space-transform-025.html
				word-space-transform/word-space-transform-026.html
			</wpt>

		<dt><dfn>auto-phrase</dfn>
		<dd>
			If the [=content language=] is known
			and the user agent supports linguistic analysis for this language,
			the user agent must [=detect phrase boundaries=].
			If a [=word-separator character=],
			[=other space separator=],
			or U+200B ZERO WIDTH SPACE character
			does not already occur at that boundary,
			then the UA must insert a [=virtual expandable separator=].

			<wpt>
				word-space-transform/word-space-transform-016.html
				word-space-transform/word-space-transform-017.html
				word-space-transform/word-space-transform-018.html
				word-space-transform/word-space-transform-019.html
				word-space-transform/word-space-transform-020.html
				word-space-transform/word-space-transform-021.html
				word-space-transform/word-space-transform-022.html
				word-space-transform/word-space-transform-023.html
				word-space-transform/word-space-transform-024.html
				word-space-transform/word-space-transform-025.html
				word-space-transform/word-space-transform-026.html
			</wpt>

			If this value is omitted,
			or if the [=content language=] is unknown,
			or if the user agent does not support
			[=detecting phrase boundaries=] for that language,
			there are no [=virtual expandable separator=].
			<wpt>
				word-space-transform/word-space-transform-027.html
				word-space-transform/word-space-transform-028.html
				word-space-transform/word-space-transform-029.html
			</wpt>
	</dl>

	For the purpose of this property,
	<dfn>expandable separators</dfn> are any of:
	* U+200B ZERO WIDTH SPACE characters
		<wpt>
			word-space-transform/word-space-transform-001.html
			word-space-transform/word-space-transform-002.html
			word-space-transform/word-space-transform-003.html
			word-space-transform/word-space-transform-004.html
			word-space-transform/word-space-transform-005.html
			word-space-transform/word-space-transform-006.html
			word-space-transform/word-space-transform-007.html
			word-space-transform/word-space-transform-008.html
			word-space-transform/word-space-transform-009.html
			word-space-transform/word-space-transform-010.html
			word-space-transform/word-space-transform-011.html
			word-space-transform/word-space-transform-012.html
			word-space-transform/word-space-transform-015-manual.html
		</wpt>
	* <{wbr}> elements
		<wpt>
			word-space-transform/word-space-transform-001.html
			word-space-transform/word-space-transform-002.html
			word-space-transform/word-space-transform-003.html
			word-space-transform/word-space-transform-004.html
			word-space-transform/word-space-transform-006.html
			word-space-transform/word-space-transform-007.html
			word-space-transform/word-space-transform-008.html
			word-space-transform/word-space-transform-009.html
			word-space-transform/word-space-transform-010.html
			word-space-transform/word-space-transform-011.html
			word-space-transform/word-space-transform-012.html
			word-space-transform/word-space-transform-013.html
			word-space-transform/word-space-transform-014.html
			word-space-transform/word-space-transform-015-manual.html
		</wpt>
	* [=virtual expandable separators=]
		<wpt>
				word-space-transform/word-space-transform-016.html
				word-space-transform/word-space-transform-017.html
				word-space-transform/word-space-transform-018.html
				word-space-transform/word-space-transform-019.html
				word-space-transform/word-space-transform-020.html
		</wpt>

	A <dfn>virtual expandable separator</dfn> is
	a UA-detected syntactic boundary in the text
	that represents an [=expandable separator=]
	not otherwise occuring in the source document.
	It has no effect other than for this property.

	The user agent must not replace
	[=expandable separators=]
	immediately preceding or following
	a [=forced line break=]
	(ignoring any intervening inline box boundaries,
	and associated 'margin'/'border'/'padding').

	<wpt>
		word-space-transform/word-space-transform-010.html
		word-space-transform/word-space-transform-011.html
		word-space-transform/word-space-transform-012.html
	</wpt>

	Note: Because [=virtual expandable separators=]
	<a href="#boundary-outermost">are placed in the outermost element that participates in an inline box boundary</a>,
	if one would coincide with boundary of an inline box
	whose parent box has a [=used value=]
	of ''word-space-transform: none'',
	that particular [=virtual expandable separator=] is not expanded,
	since it would be placed in the parent box.

	<wpt>
		word-space-transform/word-space-transform-020.html
	</wpt>

	Like 'text-transform', this property transforms text for styling purposes only.
	It has no effect on the underlying content,
	and must not affect the content of a plain text copy &amp; paste operation.

	<wpt>
		word-space-transform/word-space-transform-015-manual.html
	</wpt>

	<div class=example id=wakachigaki>
		<style>
		#wakachigaki samp
		{
			max-width: 18em;
			line-height: 2;
			padding: 1em;
			display: block;
			margin: auto;
			border: solid gray 1px;
			color: black;
			background: white;
		}
		</style>

		Unlike books for adults, Japanese books for young children often feature spaces between sentence segments,
		to facilitate reading.
		People with dyslexia also tend to find this style easier to read.

		Absent any particular styling, the following sentence would be rendered as depicted below.

		<pre><code highlight=markup>
		&lt;p>むかしむかし、&lt;wbr>あるところに、&lt;wbr>おじいさんと&lt;wbr>おばあさんが&lt;wbr>すんでいました。
		</code></pre>

		<samp lang=ja>
		むかしむかし、あるところに、おじいさんとおばあさんがすんでいました。
		</samp>

		<hr>

		Phrase-based spacing can be achieved with the following css:

		<pre><code highlight=css>
		p {
			word-space-transform: ideographic-space;
		}
		</code></pre>

		<samp lang=ja>
		むかしむかし、　あるところに、　おじいさんと　おばあさんが　すんでいました。
		</samp>

		<hr>

		Another common variant additionally restricts the allowable line breaks to these phrase boundaries.
		Using the same markup, this is easily achieved with the following css:

		<pre><code highlight=css>
		p {
			word-break: keep-all;
			word-space-transform: ideographic-space;
		}
		</code></pre>

		<samp style="word-break:keep-all" lang=ja>
		むかしむかし、　<wbr>あるところに、　<wbr>おじいさんと　<wbr>おばあさんが　<wbr>すんでいました。
		</samp>

	</div>

	<wpt>
		word-space-transform/word-space-transform-013.html
		word-space-transform/word-space-transform-014.html
	</wpt>

	<div class=example id=classes>
		<style>
		#classes samp
		{
			max-width: 18em;
			line-height: 2;
			padding: 1em;
			display: block;
			margin: auto;
			border: solid gray 1px;
			color: black;
			background: white;
			text-align: left;
		}
		</style>

		In addition to making the source code more readable,
		using <{wbr}> rather than U+200B in the markup
		also allow authors to classify the delimiters into different groups.

		In the following example,
		<{wbr}> elements are either
		unmarked when they delimit a word,
		or marked with class <code>p</code> when they also delimit a phrase.

		<pre><code highlight=markup>
		&lt;p>らいしゅう&lt;wbr>の&lt;wbr>じゅぎょう&lt;wbr>に&lt;wbr class=p>たいこ&lt;wbr>と&lt;wbr>ばち&lt;wbr>を&lt;wbr class=p>もって&lt;wbr>きて&lt;wbr>ください。
		</code></pre>

		Using this, it is possible not only to enable the rather common phrase-based spacing,
		but also word-by-word spacing
		that is likely to be preferred
		by people with dyslexia to reduce ambiguities,
		or other variants
		such as a combination of phrase-based spacing and of word-based wrapping.

		<figure>
			<figcaption>Usual rendering</figcaption>

			<samp>
			らいしゅう<wbr>の<wbr>じゅぎょう<wbr>に<wbr class=p>たいこ<wbr>と<wbr>ばち<wbr>を<wbr class=p>もって<wbr>きて<wbr>ください。
			</samp>
		</figure>
		<hr>
		<figure>
			<figcaption>Phrase spacing</figcaption>

			<pre><code highlight=css>
			p wbr.p {
				word-space-transform: ideographic-space;
			}
			</code></pre>

			<samp>
			らいしゅう<wbr>の<wbr>じゅぎょう<wbr>に　<wbr class=p>たいこ<wbr>と<wbr>ばち<wbr>を　<wbr class=p>もって<wbr>きて<wbr>ください。
			</samp>
		</figure>
		<hr>
		<figure>
			<figcaption>Word spacing</figcaption>

			<pre><code highlight=css>
			p wbr {
				word-space-transform: ideographic-space;
			}
			</code></pre>

			<samp>
			らいしゅう　<wbr>の　<wbr>じゅぎょう　<wbr>に　<wbr class=p>たいこ　<wbr>と　<wbr>ばち　<wbr>を　<wbr class=p>もって　<wbr>きて　<wbr>ください。
			</samp>
		</figure>
		<hr>
		<figure>
			<figcaption>Phrase spacing, word wrapping</figcaption>

			<pre><code highlight=css>
			p {
				word-break: keep-all;
			}
			p wbr.p {
				word-space-transform: ideographic-space;
			}
			</code></pre>

			<samp style="word-break: keep-all">
			らいしゅう<wbr>の<wbr>じゅぎょう<wbr>に　<wbr class=p>たいこ<wbr>と<wbr>ばち<wbr>を　<wbr class=p>もって<wbr>きて<wbr>ください。
			</samp>
		</figure>
		<hr>
		<figure>
			<figcaption>Word spacing and wrapping</figcaption>

			<pre><code highlight=css>
			p {
				word-break: keep-all;
			}
			p wbr {
				word-space-transform: ideographic-space;
			}
			</code></pre>

			<samp style="word-break: keep-all">
			らいしゅう　<wbr>の　<wbr>じゅぎょう　<wbr>に　<wbr class=p>たいこ　<wbr>と　<wbr>ばち　<wbr>を　<wbr class=p>もって　<wbr>きて　<wbr>ください。
			</samp>
		</figure>
	</div>


<h3 id="text-transform-order">
Order of Operations</h3>

	<wpt title="
		This section has adequate test coverage."></wpt>

	When multiple transformations need to be applied,
	they are applied in the following order:

	<ol>
		<li>'word-space-transform'
		<li>''capitalize'', ''uppercase'', and ''lowercase''
		<li>''full-width''
		<li>''full-size-kana''
	</ol>

	<wpt>
	text-transform/text-transform-multiple-001.html
	</wpt>

	Word space transformation and
	text transformation happen after [[#white-space-phase-1]]
	but before [[#white-space-phase-2]].
	This means for instance that ''full-width'' only transforms
	spaces (U+0020) to U+3000 IDEOGRAPHIC SPACE within [=preserved=] [=white space=].

	<wpt>
	text-transform/text-transform-fullwidth-006.html
	text-transform/text-transform-fullwidth-007.html
	text-transform/text-transform-fullwidth-008.html
	text-transform/text-transform-fullwidth-009.html
	word-space-transform/word-space-transform-007.html
	word-space-transform/word-space-transform-008.html
	word-space-transform/word-space-transform-009.html
	</wpt>

	Note: As defined in [[#order]],
	transforming affects line-breaking and other formatting operations.

	<wpt>
		word-space-transform/word-space-transform-030.html
	</wpt>


<h2 id="white-space-property">
White Space and Wrapping: the 'white-space' property</h2>

	<wpt title="
		This section has good overall test coverage,
		particularly through tests for [[#white-space-processing]] and subsections,
		and longhand properties.

		Missing tests:
		* No test of Animation type
		* Intrinsic (min and max) sizing tests for normal and nowrap.
		* shorthand to longhand expansion involving white-space-trim values and preserve-spaces"></wpt>

	<pre class="propdef">
	Name: white-space
	Value: normal | pre | pre-wrap | pre-line | <<'white-space-collapse'>> || <<'text-wrap-mode'>> || <<'white-space-trim'>>
	Initial: normal
	Applies to: text
	Inherited: see individual properties
	Canonical order: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/white-space-valid.html
	parsing/white-space-invalid.html
	parsing/white-space-computed.html
	parsing/white-space-shorthand.html
	white-space/ws-break-spaces-applies-to-001.html
	white-space/ws-break-spaces-applies-to-002.html
	white-space/ws-break-spaces-applies-to-003.html
	white-space/ws-break-spaces-applies-to-005.html
	white-space/ws-break-spaces-applies-to-006.html
	white-space/ws-break-spaces-applies-to-007.html
	white-space/ws-break-spaces-applies-to-008.html
	white-space/ws-break-spaces-applies-to-009.html
	white-space/ws-break-spaces-applies-to-010.html
	white-space/ws-break-spaces-applies-to-011.html
	white-space/ws-break-spaces-applies-to-012.html
	white-space/ws-break-spaces-applies-to-013.html
	white-space/ws-break-spaces-applies-to-014.html
	white-space/ws-break-spaces-applies-to-015.html
	white-space/white-space-applies-to-text-001.html
	white-space/white-space-pre-031.html
	white-space/white-space-pre-032.html
	white-space/white-space-pre-034.html
	white-space/white-space-pre-035.html
	</wpt>

	<wpt pathprefix="/css/CSS2/css1/">
	c562-white-sp-000.xht
	</wpt>

	<wpt pathprefix="/css/CSS2/text/">
	white-space-006.xht
	white-space-007.xht
	white-space-applies-to-001.xht
	white-space-applies-to-002.xht
	white-space-applies-to-002.xht
	white-space-applies-to-003.xht
	white-space-applies-to-005.xht
	white-space-applies-to-006.xht
	white-space-applies-to-007.xht
	white-space-applies-to-008.xht
	white-space-applies-to-009.xht
	white-space-applies-to-010.xht
	white-space-applies-to-011.xht
	white-space-applies-to-012.xht
	white-space-applies-to-013.xht
	white-space-applies-to-014.xht
	white-space-applies-to-015.xht
	white-space-mixed-001.xht
	white-space-mixed-002.xht
	white-space-mixed-003.xht
	white-space-mixed-004.xht
	</wpt>

	This property is a shorthand for 'white-space-collapse', 'text-wrap-mode', and 'white-space-trim'.
	It specifies two things:

	<ul>
		<li>whether and how [=white space=] is collapsed;
			see [[#white-space-processing|White Space Processing]]
		<li>whether lines may [=wrap=] at unforced [=soft wrap opportunities=];
			see [[#text-wrapping]] and [[#line-breaking|Line Breaking]]
	</ul>

	Note: This shorthand combines both inheritable and non-inheritable properties.
	If this is a problem, please inform the CSSWG.

	Unless otherwise specified, any omitted [=longhand=]
	is set to its [=initial value=].

	The following table gives the normative mapping
	of the values of the [=shorthand=]’s special keywords
	to their equivalent [=longhand=] values.

	<table class="data" dfn-for="white-space" dfn-type="value">
		<colgroup class="header"></colgroup>
		<colgroup span=3></colgroup>
		<thead>
			<tr>
				<th>'white-space'
				<th>'white-space-collapse'
				<th>'text-wrap-mode'
				<th>'white-space-trim'
		</thead>
		<tbody>
		<tr>
			<th><dfn>normal</dfn>
			<td>''white-space-collapse/collapse''
			<td>''text-wrap-mode/wrap''
			<td>''white-space-trim/none''
		<tr>
			<th><dfn>pre</dfn>
			<td>''white-space-collapse/preserve''
			<td>''text-wrap-mode/nowrap''
			<td>''white-space-trim/none''
		<tr>
			<th><dfn>pre-wrap</dfn>
			<td>''white-space-collapse/preserve''
			<td>''text-wrap-mode/wrap''
			<td>''white-space-trim/none''
		<tr>
			<th><dfn>pre-line</dfn>
			<td>''white-space-collapse/preserve-breaks''
			<td>''text-wrap-mode/wrap''
			<td>''white-space-trim/none''
		</tbody>
	</table>

	Note: In some cases,
	[=preserved white space=] and [=other space separators=]
	can [=hang=] when at the end of the line;
	this can affect whether they are measured for [=intrinsic sizing=].

	The following informative table summarizes the behavior
	of various 'white-space' values:

	<table class="data">
		<colgroup class="header"></colgroup>
		<colgroup span=5></colgroup>
		<thead>
			<tr>
				<th>
				<th>New Lines
				<th>Spaces and Tabs
				<th>Text Wrapping
				<th>End-of-line [=spaces=]
				<th>End-of-line [=other space separators=]

		<tbody>
			<tr>
				<th>''white-space/normal''
				<td>Collapse
				<td>Collapse
				<td>Wrap
				<td>Remove
				<td>Hang

			<tr>
				<th>''pre''
				<td>Preserve
				<td>Preserve
				<td>No wrap
				<td>Preserve
				<td>No wrap

			<tr>
				<th>''white-space/nowrap''
				<td>Collapse
				<td>Collapse
				<td>No wrap
				<td>Remove
				<td>Hang

			<tr>
				<th>''pre-wrap''
				<td>Preserve
				<td>Preserve
				<td>Wrap
				<td>Hang
				<td>Hang

			<tr>
				<th>''break-spaces''
				<td>Preserve
				<td>Preserve
				<td>Wrap
				<td>Wrap
				<td>Wrap

			<tr>
				<th>''pre-line''
				<td>Preserve
				<td>Collapse
				<td>Wrap
				<td>Remove
				<td>Hang
	</table>

<!-- This is part of segment break transformation
	An informative summary of collapsing (''white-space/normal'' and ''white-space/nowrap'') is presented below:
	<ul class=non-normative>
		<li>
			A sequence of segment breaks and other [=white space=]
			between two Chinese, Japanese, or Yi characters
			collapses into nothing.

		<li>
			A zero width space before or after a [=white space=] sequence
			containing a segment break
			causes the entire sequence of [=white space=]
			to collapse into a zero width space.

		<li>
			Otherwise,
			consecutive [=white space=] collapses into a single [=space=].
	</ul>
-->


<h2 id="white-space-processing">
White Space Processing &amp; Control Characters</h2>

	<wpt title="
		This section has reasonably good test coverage.

		Missing tests:
		* “As required by Unicode, unsupported Default_ignorable characters must be ignored for text rendering”"></wpt>

	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 [=white space characters=] such as [=tabs=] and [=spaces=]
	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 'white-space-collapse' and 'white-space-trim' properties)
	interprets [=white space characters=] only for rendering:
	it has no effect on the underlying document data.

	Note: 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 id="segment-normalization">
	For CSS processing,
	each document language&ndash;defined “segment break” or “newline sequence”--
	or if none are defined,  each line feed (U+000A)--
	in the text is treated as a <dfn export>segment break</dfn>,
	which is then interpreted for rendering as specified by the 'white-space' property.

	In the case of HTML,
	[[html#newlines|newlines]] are [=normalize newlines|normalized=] 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 [=segment break=].
	[[HTML]]
	[[DOM]]

	Note: 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 [=segment breaks=].
	If carriage returns (U+000D) are inserted into the DOM
	by means other than HTML parsing,
	they then get treated as defined below.

	<wpt pathprefix="/css/CSS2/text">
	white-space-processing-005.xht
	white-space-processing-006.xht
	white-space-processing-007.xht
	</wpt>

	Note: A document parser might
	not only normalize any [=segment breaks=],
	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.

	Note: Anonymous blocks consisting entirely of [=collapsible=] [=white space=]
	are removed from the rendering tree.
	Thus any such [=white space=] surrounding a block-level element is collapsed away.
	See [[CSS2/visuren#anonymous]].
	[[CSS2]]

	Control characters ([=Unicode category=] <code>Cc</code>)--
	other than tabs (U+0009),
	line feeds (U+000A),
	carriage returns (U+000D)
	and sequences that form a [=segment break=]--
	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>) [=general category=] and Common [=Unicode Script|script=].
	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.
	[[!UNICODE]]

	<wpt>
	white-space/control-chars-000.html
	white-space/control-chars-001.html
	white-space/control-chars-002.html
	white-space/control-chars-003.html
	white-space/control-chars-004.html
	white-space/control-chars-005.html
	white-space/control-chars-006.html
	white-space/control-chars-007.html
	white-space/control-chars-008.html
	white-space/control-chars-00B.html
	white-space/control-chars-00C.html
	white-space/control-chars-00D.html
	white-space/control-chars-00E.html
	white-space/control-chars-00F.html
	white-space/control-chars-010.html
	white-space/control-chars-011.html
	white-space/control-chars-012.html
	white-space/control-chars-013.html
	white-space/control-chars-014.html
	white-space/control-chars-015.html
	white-space/control-chars-016.html
	white-space/control-chars-017.html
	white-space/control-chars-018.html
	white-space/control-chars-019.html
	white-space/control-chars-01A.html
	white-space/control-chars-01B.html
	white-space/control-chars-01C.html
	white-space/control-chars-01D.html
	white-space/control-chars-01E.html
	white-space/control-chars-01F.html
	white-space/control-chars-07F.html
	white-space/control-chars-080.html
	white-space/control-chars-081.html
	white-space/control-chars-082.html
	white-space/control-chars-083.html
	white-space/control-chars-084.html
	white-space/control-chars-085.html
	white-space/control-chars-086.html
	white-space/control-chars-087.html
	white-space/control-chars-088.html
	white-space/control-chars-089.html
	white-space/control-chars-08A.html
	white-space/control-chars-08B.html
	white-space/control-chars-08C.html
	white-space/control-chars-08D.html
	white-space/control-chars-08E.html
	white-space/control-chars-08F.html
	white-space/control-chars-090.html
	white-space/control-chars-091.html
	white-space/control-chars-092.html
	white-space/control-chars-093.html
	white-space/control-chars-094.html
	white-space/control-chars-095.html
	white-space/control-chars-096.html
	white-space/control-chars-097.html
	white-space/control-chars-098.html
	white-space/control-chars-099.html
	white-space/control-chars-09A.html
	white-space/control-chars-09B.html
	white-space/control-chars-09C.html
	white-space/control-chars-09D.html
	white-space/control-chars-09E.html
	white-space/control-chars-09F.html
	</wpt>

	<wpt pathprefix="/css/CSS2/other-formats">
	control-characters-001.html
	</wpt>

	<wpt pathprefix="/css/CSS2/text">
	control-characters-002.xht
	white-space-control-characters-001.xht
	</wpt>

	Carriage returns (U+000D) are treated identically to spaces (U+0020) in all respects.

	<wpt>
	white-space/control-chars-00D.html
	</wpt>

	<wpt pathprefix="/css/CSS2/text">
	white-space-processing-005.xht
	white-space-processing-006.xht
	white-space-processing-007.xht
	</wpt>

	Note: For HTML documents,
	carriage returns present in the source code
	are converted to line feeds at the parsing stage
	(see [[HTML#preprocessing-the-input-stream]]
	and the definition of [=normalize newlines=] in <a href="https://infra.spec.whatwg.org/"><cite>Infra</cite></a>
	and therefore do no appear as U+000D CARRIAGE RETURN to CSS.
	[[HTML]]
	[[INFRA]])
	However, the character <em>is</em> preserved--
	and the above rule observable--
	when encoded using an escape sequence (<code highlight=html>&amp;#x0d;</code>).

<h3 id="white-space-collapsing">
White Space Collapsing: the 'white-space-collapse' property</h3>

	<wpt title="
		 This section has limited direct coverage,
		 but extensive coverage through the 'white-space' shorthand.

		Missing tests:
		* any direct tests as a longhand (other than syntax and inheritance)
		* tests of the preserve-spaces value (direct or indirect)
		* tests of the discard value (direct or indirect)"></wpt>

	ISSUE: This section is still under discussion and may change in future drafts.

	<pre class="propdef">
	Name: white-space-collapse
	Value: collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces
	Initial: collapse
	Applies to: text
	Inherited: yes
	Percentages: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
		inheritance.html
		parsing/white-space-collapse-valid.html
		parsing/white-space-collapse-computed.html
		parsing/white-space-collapse-invalid.html
	</wpt>

	This property specifies whether and how
	<a href="#white-space-processing">white space</a>
	is collapsed.
	Values have the following meanings,
	which must be interpreted according to
	the [[#white-space-rules|White Space Processing Rules]]:

	<dl dfn-for=white-space-collapse dfn-type=value>
		<dt><dfn>collapse</dfn>
		<dd>
			This value directs user agents to collapse sequences of [=white space=]
			into a single character
			(or <a href="#line-break-transform">in some cases</a>, no character).

			<wpt title="Direct tests as a longhand:">
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: normal':" pathprefix="/css/CSS2/text/">
				white-space-normal-002.xht
				white-space-normal-003.xht
				white-space-normal-004.xht
				white-space-normal-005.xht
				white-space-normal-006.xht
				white-space-normal-007.xht
				white-space-normal-008.xht
				white-space-normal-009.xht
				white-space-p-element-001.xht
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: nowrap':" pathprefix="/css/CSS2/text/">
				white-space-nowrap-001.xht
				white-space-nowrap-005.xht
				white-space-nowrap-006.xht
				text-align-white-space-004.xht
				text-align-white-space-008.xht
				white-space-nowrap-attribute-001.xht
				white-space-processing-006.xht
			</wpt>
			<wpt title="Indirect tests via 'white-space: normal':">
				hyphens/hyphens-auto-003.html
				line-break/line-break-anywhere-and-white-space-004.html
				line-break/line-break-anywhere-and-white-space-005.html
				line-breaking/line-breaking-001.html
				line-breaking/line-breaking-002.html
				line-breaking/line-breaking-003.html
				line-breaking/line-breaking-004.html
				line-breaking/line-breaking-005.html
				line-breaking/line-breaking-006.html
				line-breaking/line-breaking-007.html
				line-breaking/line-breaking-008.html
				line-breaking/line-breaking-009.html
				line-breaking/line-breaking-010.html
				line-breaking/line-breaking-011.html
				line-breaking/line-breaking-ic-001.html
				line-breaking/line-breaking-ic-002.html
				line-breaking/line-breaking-ic-003.html
				overflow-wrap/overflow-wrap-anywhere-011.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash.html
				white-space/trailing-ideographic-space-005.html
				white-space/trailing-ideographic-space-006.html
				white-space/trailing-space-and-text-alignment-001.html
				white-space/trailing-space-and-text-alignment-rtl-001.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-normal-011.html
				white-space/white-space-nowrap-011.html
				white-space/white-space-pre-031.html
				white-space/white-space-wrap-after-nowrap-001.html
				word-break/break-boundary-2-chars-001.html
				word-break/word-break-break-all-062.html
				word-break/word-break-keep-all-063.html
				white-space/white-space-intrinsic-size-021.html
			</wpt>
			<wpt title="Indirect tests via 'white-space: nowrap':">
				hanging-punctuation/hanging-punctuation-allow-end-001.xht
				hanging-punctuation/hanging-punctuation-first-001.xht
				hanging-punctuation/hanging-punctuation-force-end-001.xht
				hanging-punctuation/hanging-punctuation-last-001.xht
				letter-spacing/letter-spacing-206.html
				line-break/line-break-anywhere-and-white-space-002.html
				line-breaking/line-breaking-012.html
				line-breaking/line-breaking-atomic-nowrap-001.html
				overflow-wrap/overflow-wrap-002.html
				overflow-wrap/overflow-wrap-anywhere-008.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash-002.html
				overflow-wrap/word-wrap-002.html
				text-transform/text-transform-capitalize-001.html
				text-transform/text-transform-capitalize-003.html
				text-transform/text-transform-capitalize-005.html
				text-transform/text-transform-capitalize-007.html
				text-transform/text-transform-capitalize-009.html
				text-transform/text-transform-capitalize-010.html
				text-transform/text-transform-capitalize-011.html
				text-transform/text-transform-capitalize-014.html
				text-transform/text-transform-capitalize-016.html
				text-transform/text-transform-capitalize-018.html
				text-transform/text-transform-capitalize-020.html
				text-transform/text-transform-capitalize-022.html
				text-transform/text-transform-capitalize-024.html
				text-transform/text-transform-capitalize-026.html
				text-transform/text-transform-capitalize-028.html
				text-transform/text-transform-capitalize-030.html
				text-transform/text-transform-full-size-kana-005.html
				text-transform/text-transform-full-size-kana-006.html
				text-transform/text-transform-full-size-kana-007.html
				text-transform/text-transform-fullwidth-001.xht
				text-transform/text-transform-upperlower-001.html
				text-transform/text-transform-upperlower-002.html
				text-transform/text-transform-upperlower-003.html
				text-transform/text-transform-upperlower-004.html
				text-transform/text-transform-upperlower-005.html
				text-transform/text-transform-upperlower-006.html
				text-transform/text-transform-upperlower-007.html
				text-transform/text-transform-upperlower-008.html
				text-transform/text-transform-upperlower-009.html
				text-transform/text-transform-upperlower-010.html
				text-transform/text-transform-upperlower-011.html
				text-transform/text-transform-upperlower-012.html
				text-transform/text-transform-upperlower-014.html
				text-transform/text-transform-upperlower-015.html
				text-transform/text-transform-upperlower-016.html
				text-transform/text-transform-upperlower-017.html
				text-transform/text-transform-upperlower-018.html
				text-transform/text-transform-upperlower-019.html
				text-transform/text-transform-upperlower-020.html
				text-transform/text-transform-upperlower-021.html
				text-transform/text-transform-upperlower-022.html
				text-transform/text-transform-upperlower-023.html
				text-transform/text-transform-upperlower-024.html
				text-transform/text-transform-upperlower-025.html
				text-transform/text-transform-upperlower-026.html
				text-transform/text-transform-upperlower-027.html
				text-transform/text-transform-upperlower-028.html
				text-transform/text-transform-upperlower-029.html
				text-transform/text-transform-upperlower-030.html
				text-transform/text-transform-upperlower-031.html
				text-transform/text-transform-upperlower-032.html
				text-transform/text-transform-upperlower-033.html
				text-transform/text-transform-upperlower-034.html
				text-transform/text-transform-upperlower-035.html
				text-transform/text-transform-upperlower-039.html
				text-transform/text-transform-upperlower-040.html
				text-transform/text-transform-upperlower-041.html
				text-transform/text-transform-upperlower-042.html
				text-transform/text-transform-upperlower-043.html
				text-transform/text-transform-upperlower-044.html
				text-transform/text-transform-upperlower-101.html
				text-transform/text-transform-upperlower-102.html
				text-transform/text-transform-upperlower-103.html
				text-transform/text-transform-upperlower-104.html
				white-space/control-chars-00D.html
				white-space/nowrap-wbr-and-space-crash.html
				white-space/trailing-ideographic-space-007.html
				white-space/trailing-ideographic-space-009.html
				white-space/trailing-ogham-003.html
				white-space/trailing-other-space-separators-004.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-nowrap-011.html
				white-space/white-space-wrap-after-nowrap-001.html
				word-break/auto-phrase/word-break-auto-phrase-wbr-nobr-002.html
				word-break/break-boundary-2-chars-002.html
				word-break/word-break-break-word-crash-001.html
				white-space/white-space-intrinsic-size-021.html
			</wpt>

		<dt><dfn>preserve</dfn>
		<dd>
			This value prevents user agents from collapsing sequences of [=white space=].
			<a>Segment breaks</a> such as line feeds
			are preserved as [=forced line breaks=].

			<wpt title="Direct tests as a longhand:">
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: pre':" pathprefix="/css/CSS2/text/">
				white-space-pre-001.xht
				white-space-pre-002.xht
				white-space-pre-005.xht
				white-space-pre-006.xht
				white-space-pre-007.xht
				white-space-pre-element-001.xht
			</wpt>
			<wpt title="Indirect tests via 'white-space: pre':">
				white-space/white-space-zero-fontsize-001.html
				white-space/white-space-zero-fontsize-002.html
				bidi/bidi-lines-001.html
				bidi/bidi-tab-001.html
				letter-spacing/letter-spacing-206.html
				letter-spacing/letter-spacing-bidi-003.xht
				letter-spacing/letter-spacing-bidi-004.xht
				letter-spacing/letter-spacing-bidi-005.xht
				letter-spacing/letter-spacing-nesting-003.xht
				line-break/line-break-anywhere-005.html
				line-break/line-break-anywhere-and-white-space-001.html
				line-break/line-break-anywhere-and-white-space-003.html
				line-breaking/line-breaking-009.html
				line-breaking/line-breaking-010.html
				line-breaking/line-breaking-011.html
				line-breaking/line-breaking-023.html
				line-breaking/line-breaking-024.html
				line-breaking/line-breaking-025.html
				line-breaking/line-breaking-026.html
				line-breaking/line-breaking-027.html
				line-breaking/line-breaking-ic-001.html
				line-breaking/line-breaking-ic-002.html
				line-breaking/line-breaking-ic-003.html
				line-breaking/line-breaking-replaced-006.html
				overflow-wrap/overflow-wrap-break-word-007.html
				overflow-wrap/overflow-wrap-break-word-008.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash.html
				tab-size/tab-size-block-ancestor.html
				tab-size/tab-size-inheritance-001.html
				tab-size/tab-size-inline-001.html
				tab-size/tab-size-inline-002.html
				tab-size/tab-size-integer-004.html
				tab-size/tab-size-spacing-001.html
				tab-size/tab-size-spacing-002.html
				tab-size/tab-size-spacing-003.html
				text-indent/text-indent-length-002.html
				text-indent/text-indent-tab-positions-001.html
				text-justify/text-justify-006.html
				text-transform/text-transform-capitalize-035.html
				text-transform/text-transform-fullwidth-008.html
				text-transform/text-transform-fullwidth-009.html
				white-space/break-spaces-009.html
				white-space/break-spaces-newline-011.html
				white-space/break-spaces-newline-012.html
				white-space/break-spaces-newline-013.html
				white-space/break-spaces-newline-014.html
				white-space/break-spaces-newline-015.html
				white-space/break-spaces-newline-016.html
				white-space/break-spaces-tab-005.html
				white-space/break-spaces-tab-006.html
				white-space/break-spaces-with-ideographic-space-009.html
				white-space/break-spaces-with-overflow-wrap-009.html
				white-space/break-spaces-with-overflow-wrap-010.html
				white-space/control-chars-00D.html
				white-space/eol-spaces-bidi-001.html
				white-space/eol-spaces-bidi-002.html
				white-space/pre-float-001.html
				white-space/pre-with-whitespace-crash.html
				white-space/pre-wrap-008.html
				white-space/pre-wrap-009.html
				white-space/pre-wrap-010.html
				white-space/pre-wrap-016.html
				white-space/pre-wrap-018.html
				white-space/pre-wrap-019.html
				white-space/pre-wrap-020.html
				white-space/tab-bidi-001.html
				white-space/tab-stop-threshold-001.html
				white-space/tab-stop-threshold-002.html
				white-space/trailing-other-space-separators-001.html
				white-space/trailing-other-space-separators-003.html
				white-space/trailing-other-space-separators-004.html
				white-space/trailing-other-space-separators-break-spaces-001.html
				white-space/trailing-other-space-separators-break-spaces-002.html
				white-space/trailing-other-space-separators-break-spaces-003.html
				white-space/trailing-other-space-separators-break-spaces-004.html
				white-space/trailing-other-space-separators-break-spaces-005.html
				white-space/trailing-other-space-separators-break-spaces-006.html
				white-space/trailing-other-space-separators-break-spaces-007.html
				white-space/trailing-other-space-separators-break-spaces-008.html
				white-space/trailing-other-space-separators-break-spaces-009.html
				white-space/trailing-other-space-separators-break-spaces-010.html
				white-space/trailing-other-space-separators-break-spaces-011.html
				white-space/trailing-other-space-separators-break-spaces-012.html
				white-space/trailing-other-space-separators-break-spaces-013.html
				white-space/trailing-other-space-separators-break-spaces-014.html
				white-space/trailing-other-space-separators-break-spaces-015.html
				white-space/trailing-space-align-start.tentative.html
				white-space/trailing-space-and-text-alignment-002.html
				white-space/trailing-space-and-text-alignment-rtl-002.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-intrinsic-size-015.html
				white-space/white-space-intrinsic-size-016.html
				white-space/white-space-intrinsic-size-018.html
				white-space/white-space-intrinsic-size-021.html
				white-space/white-space-letter-spacing-001.html
				white-space/white-space-normal-011.html
				white-space/white-space-pre-011.html
				white-space/white-space-pre-031.html
				white-space/white-space-pre-032.html
				white-space/white-space-pre-034.html
				white-space/white-space-pre-035.html
				white-space/white-space-pre-051.html
				white-space/white-space-pre-052.html
				white-space/ws-break-spaces-applies-to-001.html
				white-space/ws-break-spaces-applies-to-002.html
				white-space/ws-break-spaces-applies-to-003.html
				white-space/ws-break-spaces-applies-to-005.html
				white-space/ws-break-spaces-applies-to-006.html
				white-space/ws-break-spaces-applies-to-007.html
				white-space/ws-break-spaces-applies-to-008.html
				white-space/ws-break-spaces-applies-to-009.html
				white-space/ws-break-spaces-applies-to-010.html
				white-space/ws-break-spaces-applies-to-011.html
				white-space/ws-break-spaces-applies-to-014.html
				white-space/ws-break-spaces-applies-to-015.html
				word-break/break-boundary-2-chars-001.html
				word-break/break-boundary-2-chars-002.html
				word-break/word-break-break-all-010.html
				word-break/word-break-break-all-011.html
				word-break/word-break-break-all-012.html
				word-break/word-break-break-all-013.html
				word-break/word-break-break-all-015.html
				word-break/word-break-break-all-017.html
				word-break/word-break-break-all-ethiopic.html
				word-break/word-break-normal-ethiopic.html
				word-space-transform/word-space-transform-008.html
				word-space-transform/word-space-transform-011.html
			</wpt>
			<wpt title="Indirect tests via 'white-space: pre-wrap':">
				crashtests/trailing-space-with-cr-crash.html
				crashtests/white-space-pre-wrap-chash.html
				hyphens/hyphens-auto-002.html
				i18n/css3-text-line-break-baspglwj-001.html
				i18n/css3-text-line-break-baspglwj-002.html
				i18n/css3-text-line-break-baspglwj-003.html
				i18n/css3-text-line-break-baspglwj-004.html
				i18n/css3-text-line-break-baspglwj-005.html
				i18n/css3-text-line-break-baspglwj-006.html
				i18n/css3-text-line-break-baspglwj-007.html
				i18n/css3-text-line-break-baspglwj-008.html
				i18n/css3-text-line-break-baspglwj-009.html
				i18n/css3-text-line-break-baspglwj-010.html
				i18n/css3-text-line-break-baspglwj-011.html
				i18n/css3-text-line-break-baspglwj-012.html
				i18n/css3-text-line-break-baspglwj-014.html
				i18n/css3-text-line-break-baspglwj-015.html
				i18n/css3-text-line-break-baspglwj-016.html
				i18n/css3-text-line-break-baspglwj-017.html
				i18n/css3-text-line-break-baspglwj-018.html
				i18n/css3-text-line-break-baspglwj-019.html
				i18n/css3-text-line-break-baspglwj-020.html
				i18n/css3-text-line-break-baspglwj-021.html
				i18n/css3-text-line-break-baspglwj-022.html
				i18n/css3-text-line-break-baspglwj-023.html
				i18n/css3-text-line-break-baspglwj-024.html
				i18n/css3-text-line-break-baspglwj-025.html
				i18n/css3-text-line-break-baspglwj-026.html
				i18n/css3-text-line-break-baspglwj-030.html
				i18n/css3-text-line-break-baspglwj-031.html
				i18n/css3-text-line-break-baspglwj-032.html
				i18n/css3-text-line-break-baspglwj-033.html
				i18n/css3-text-line-break-baspglwj-034.html
				i18n/css3-text-line-break-baspglwj-035.html
				i18n/css3-text-line-break-baspglwj-036.html
				i18n/css3-text-line-break-baspglwj-037.html
				i18n/css3-text-line-break-baspglwj-038.html
				i18n/css3-text-line-break-baspglwj-039.html
				i18n/css3-text-line-break-baspglwj-040.html
				i18n/css3-text-line-break-baspglwj-041.html
				i18n/css3-text-line-break-baspglwj-042.html
				i18n/css3-text-line-break-baspglwj-043.html
				i18n/css3-text-line-break-baspglwj-044.html
				i18n/css3-text-line-break-baspglwj-045.html
				i18n/css3-text-line-break-baspglwj-046.html
				i18n/css3-text-line-break-baspglwj-047.html
				i18n/css3-text-line-break-baspglwj-048.html
				i18n/css3-text-line-break-baspglwj-049.html
				i18n/css3-text-line-break-baspglwj-050.html
				i18n/css3-text-line-break-baspglwj-051.html
				i18n/css3-text-line-break-baspglwj-052.html
				i18n/css3-text-line-break-baspglwj-060.html
				i18n/css3-text-line-break-baspglwj-061.html
				i18n/css3-text-line-break-baspglwj-062.html
				i18n/css3-text-line-break-baspglwj-063.html
				i18n/css3-text-line-break-baspglwj-064.html
				i18n/css3-text-line-break-baspglwj-065.html
				i18n/css3-text-line-break-baspglwj-066.html
				i18n/css3-text-line-break-baspglwj-067.html
				i18n/css3-text-line-break-baspglwj-068.html
				i18n/css3-text-line-break-baspglwj-069.html
				i18n/css3-text-line-break-baspglwj-070.html
				i18n/css3-text-line-break-baspglwj-071.html
				i18n/css3-text-line-break-baspglwj-072.html
				i18n/css3-text-line-break-baspglwj-073.html
				i18n/css3-text-line-break-baspglwj-074.html
				i18n/css3-text-line-break-baspglwj-075.html
				i18n/css3-text-line-break-baspglwj-076.html
				i18n/css3-text-line-break-baspglwj-077.html
				i18n/css3-text-line-break-baspglwj-078.html
				i18n/css3-text-line-break-baspglwj-080.html
				i18n/css3-text-line-break-baspglwj-081.html
				i18n/css3-text-line-break-baspglwj-082.html
				i18n/css3-text-line-break-baspglwj-083.html
				i18n/css3-text-line-break-baspglwj-084.html
				i18n/css3-text-line-break-baspglwj-085.html
				i18n/css3-text-line-break-baspglwj-086.html
				i18n/css3-text-line-break-baspglwj-090.html
				i18n/css3-text-line-break-baspglwj-091.html
				i18n/css3-text-line-break-baspglwj-092.html
				i18n/css3-text-line-break-baspglwj-093.html
				i18n/css3-text-line-break-baspglwj-095.html
				i18n/css3-text-line-break-baspglwj-096.html
				i18n/css3-text-line-break-baspglwj-097.html
				i18n/css3-text-line-break-baspglwj-098.html
				i18n/css3-text-line-break-baspglwj-099.html
				i18n/css3-text-line-break-baspglwj-100.html
				i18n/css3-text-line-break-baspglwj-101.html
				i18n/css3-text-line-break-baspglwj-102.html
				i18n/css3-text-line-break-baspglwj-103.html
				i18n/css3-text-line-break-baspglwj-104.html
				i18n/css3-text-line-break-baspglwj-105.html
				i18n/css3-text-line-break-baspglwj-106.html
				i18n/css3-text-line-break-baspglwj-107.html
				i18n/css3-text-line-break-baspglwj-108.html
				i18n/css3-text-line-break-baspglwj-109.html
				i18n/css3-text-line-break-baspglwj-110.html
				i18n/css3-text-line-break-baspglwj-111.html
				i18n/css3-text-line-break-baspglwj-112.html
				i18n/css3-text-line-break-baspglwj-113.html
				i18n/css3-text-line-break-baspglwj-114.html
				i18n/css3-text-line-break-baspglwj-115.html
				i18n/css3-text-line-break-baspglwj-116.html
				i18n/css3-text-line-break-baspglwj-117.html
				i18n/css3-text-line-break-baspglwj-118.html
				i18n/css3-text-line-break-baspglwj-120.html
				i18n/css3-text-line-break-baspglwj-121.html
				i18n/css3-text-line-break-baspglwj-122.html
				i18n/css3-text-line-break-baspglwj-123.html
				i18n/css3-text-line-break-baspglwj-124.html
				i18n/css3-text-line-break-baspglwj-125.html
				i18n/css3-text-line-break-baspglwj-126.html
				i18n/css3-text-line-break-baspglwj-127.html
				i18n/css3-text-line-break-baspglwj-128.html
				i18n/css3-text-line-break-baspglwj-130.html
				i18n/css3-text-line-break-baspglwj-131.html
				letter-spacing/letter-spacing-200.html
				letter-spacing/letter-spacing-201.html
				letter-spacing/letter-spacing-203.html
				letter-spacing/letter-spacing-204.html
				letter-spacing/letter-spacing-205.html
				letter-spacing/letter-spacing-211.html
				letter-spacing/letter-spacing-212.html
				line-break/line-break-anywhere-008.html
				line-break/line-break-anywhere-010.html
				line-break/line-break-anywhere-and-white-space-006.html
				line-break/line-break-anywhere-and-white-space-007.html
				overflow-wrap/overflow-wrap-anywhere-004.html
				overflow-wrap/overflow-wrap-anywhere-005.html
				overflow-wrap/overflow-wrap-break-word-004.html
				overflow-wrap/overflow-wrap-break-word-005.html
				overflow-wrap/overflow-wrap-break-word-007.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash-002.html
				overflow-wrap/overflow-wrap-min-content-size-009.html
				text-justify/text-justify-and-trailing-spaces-001.html
				text-justify/text-justify-and-trailing-spaces-002.html
				text-justify/text-justify-and-trailing-spaces-003.html
				text-justify/text-justify-and-trailing-spaces-004.html
				text-justify/text-justify-and-trailing-spaces-005.html
				text-justify/text-justify-and-trailing-spaces-006.html
				text-transform/text-transform-fullwidth-007.html
				text-transform/text-transform-fullwidth-009.html
				white-space/break-spaces-newline-011.html
				white-space/break-spaces-newline-012.html
				white-space/break-spaces-newline-013.html
				white-space/break-spaces-newline-014.html
				white-space/break-spaces-newline-015.html
				white-space/break-spaces-newline-016.html
				white-space/control-chars-00D.html
				white-space/eol-spaces-bidi-002.html
				white-space/eol-spaces-bidi-003.html
				white-space/pre-wrap-001.html
				white-space/pre-wrap-002.html
				white-space/pre-wrap-003.html
				white-space/pre-wrap-004.html
				white-space/pre-wrap-005.html
				white-space/pre-wrap-006.html
				white-space/pre-wrap-007.html
				white-space/pre-wrap-008.html
				white-space/pre-wrap-009.html
				white-space/pre-wrap-010.html
				white-space/pre-wrap-011.html
				white-space/pre-wrap-012.html
				white-space/pre-wrap-013.html
				white-space/pre-wrap-014.html
				white-space/pre-wrap-015.html
				white-space/pre-wrap-016.html
				white-space/pre-wrap-017.html
				white-space/pre-wrap-018.html
				white-space/pre-wrap-019.html
				white-space/pre-wrap-020.html
				white-space/pre-wrap-051.html
				white-space/pre-wrap-052.html
				white-space/pre-wrap-align-center-001.html
				white-space/pre-wrap-align-center-002.html
				white-space/pre-wrap-align-center-003.html
				white-space/pre-wrap-align-end-001.html
				white-space/pre-wrap-align-end-002.html
				white-space/pre-wrap-align-end-003.html
				white-space/pre-wrap-align-left-001.html
				white-space/pre-wrap-align-left-002.html
				white-space/pre-wrap-align-left-003.html
				white-space/pre-wrap-align-right-001.html
				white-space/pre-wrap-align-right-002.html
				white-space/pre-wrap-align-right-003.html
				white-space/pre-wrap-align-start-001.html
				white-space/pre-wrap-align-start-002.html
				white-space/pre-wrap-align-start-003.html
				white-space/pre-wrap-float-001.html
				white-space/pre-wrap-leading-spaces-001.html
				white-space/pre-wrap-leading-spaces-002.html
				white-space/pre-wrap-leading-spaces-003.html
				white-space/pre-wrap-leading-spaces-004.html
				white-space/pre-wrap-leading-spaces-005.html
				white-space/pre-wrap-leading-spaces-006.html
				white-space/pre-wrap-leading-spaces-007.html
				white-space/pre-wrap-leading-spaces-008.html
				white-space/pre-wrap-leading-spaces-009.html
				white-space/pre-wrap-leading-spaces-010.html
				white-space/pre-wrap-leading-spaces-011.html
				white-space/pre-wrap-leading-spaces-012.html
				white-space/pre-wrap-leading-spaces-013.html
				white-space/pre-wrap-leading-spaces-014.html
				white-space/pre-wrap-leading-spaces-015.html
				white-space/pre-wrap-leading-spaces-016.html
				white-space/pre-wrap-leading-spaces-017.html
				white-space/pre-wrap-tab-001.html
				white-space/pre-wrap-tab-002.html
				white-space/pre-wrap-tab-003.html
				white-space/pre-wrap-tab-004.html
				white-space/pre-wrap-tab-005.html
				white-space/pre-wrap-tab-006.html
				white-space/tab-stop-threshold-003.html
				white-space/tab-stop-threshold-004.html
				white-space/textarea-pre-wrap-001.html
				white-space/textarea-pre-wrap-002.html
				white-space/textarea-pre-wrap-003.html
				white-space/textarea-pre-wrap-004.html
				white-space/textarea-pre-wrap-005.html
				white-space/textarea-pre-wrap-006.html
				white-space/textarea-pre-wrap-007.html
				white-space/textarea-pre-wrap-011.html
				white-space/textarea-pre-wrap-012.html
				white-space/textarea-pre-wrap-013.html
				white-space/textarea-pre-wrap-014.html
				white-space/trailing-ideographic-space-003.html
				white-space/trailing-ideographic-space-004.html
				white-space/trailing-other-space-separators-002.html
				white-space/trailing-space-align-start.tentative.html
				white-space/trailing-space-and-text-alignment-003.html
				white-space/trailing-space-and-text-alignment-rtl-003.html
				white-space/trailing-space-in-inline-box.html
				white-space/trailing-space-position-001.html
				white-space/trailing-space-rtl-001.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-intrinsic-size-003.html
				white-space/white-space-intrinsic-size-004.html
				white-space/white-space-intrinsic-size-005.html
				white-space/white-space-intrinsic-size-006.html
				white-space/white-space-intrinsic-size-013.html
				white-space/white-space-intrinsic-size-014.html
				white-space/white-space-intrinsic-size-017.html
				white-space/white-space-intrinsic-size-021.html
				white-space/white-space-letter-spacing-001.html
				white-space/white-space-pre-032.html
				white-space/white-space-pre-wrap-justify-001.html
				white-space/white-space-pre-wrap-justify-002.html
				white-space/white-space-pre-wrap-justify-003.html
				white-space/white-space-pre-wrap-justify-004.html
				white-space/white-space-pre-wrap-trailing-spaces-001.html
				white-space/white-space-pre-wrap-trailing-spaces-002.html
				white-space/white-space-pre-wrap-trailing-spaces-003.html
				white-space/white-space-pre-wrap-trailing-spaces-004.html
				white-space/white-space-pre-wrap-trailing-spaces-005.html
				white-space/white-space-pre-wrap-trailing-spaces-006.html
				white-space/white-space-pre-wrap-trailing-spaces-007.html
				white-space/white-space-pre-wrap-trailing-spaces-008.html
				white-space/white-space-pre-wrap-trailing-spaces-010.html
				white-space/white-space-pre-wrap-trailing-spaces-011.html
				white-space/white-space-pre-wrap-trailing-spaces-012.html
				white-space/white-space-pre-wrap-trailing-spaces-013.html
				white-space/white-space-pre-wrap-trailing-spaces-014.html
				white-space/white-space-pre-wrap-trailing-spaces-015.html
				white-space/white-space-pre-wrap-trailing-spaces-021.html
				white-space/white-space-pre-wrap-trailing-spaces-022.html
				white-space/white-space-pre-wrap-trailing-spaces-023.html
				word-break/break-boundary-2-chars-001.html
				word-break/word-break-break-all-010.html
				word-break/word-break-break-all-011.html
				word-break/word-break-break-all-015.html
				word-break/word-break-break-all-019.html
				word-break/word-break-break-all-021.html
				word-break/word-break-break-all-062.html
				word-break/word-break-keep-all-007.html
				word-break/word-break-keep-all-063.html
				word-break/word-break-min-content-007.html
			</wpt>

		<dt><dfn>preserve-breaks</dfn>
		<dd>
			Like ''white-space-collapse/collapse'',
			this value collapses consecutive [=white space characters=],
			but preserves [=segment breaks=] in the source as [=forced line breaks=].

			<wpt title="Direct tests as a longhand:">
				white-space/white-space-collapse-preserve-breaks-001.xht
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: pre-line':" pathprefix="/css/CSS2/text/">
				white-space-005.xht
				white-space-generated-content-before-001.xht
				white-space-processing-004.xht
				white-space-processing-007.xht
				white-space-processing-010.xht
				white-space-processing-021.xht
				white-space-processing-024.xht
				white-space-processing-027.xht
				white-space-processing-028.xht
				white-space-processing-029.xht
				white-space-processing-030.xht
				white-space-processing-035.xht
				white-space-processing-036.xht
				white-space-processing-045.xht
				white-space-processing-053.xht
				text-align-white-space-002.xht
				text-align-white-space-006.xht
			</wpt>

			<wpt title="Indirect tests via 'white-space: pre-line':">
				i18n/css3-text-line-break-baspglwj-001.html
				i18n/css3-text-line-break-baspglwj-002.html
				i18n/css3-text-line-break-baspglwj-003.html
				i18n/css3-text-line-break-baspglwj-004.html
				i18n/css3-text-line-break-baspglwj-005.html
				i18n/css3-text-line-break-baspglwj-006.html
				i18n/css3-text-line-break-baspglwj-007.html
				i18n/css3-text-line-break-baspglwj-008.html
				i18n/css3-text-line-break-baspglwj-009.html
				i18n/css3-text-line-break-baspglwj-010.html
				i18n/css3-text-line-break-baspglwj-011.html
				i18n/css3-text-line-break-baspglwj-012.html
				i18n/css3-text-line-break-baspglwj-014.html
				i18n/css3-text-line-break-baspglwj-015.html
				i18n/css3-text-line-break-baspglwj-016.html
				i18n/css3-text-line-break-baspglwj-017.html
				i18n/css3-text-line-break-baspglwj-018.html
				i18n/css3-text-line-break-baspglwj-019.html
				i18n/css3-text-line-break-baspglwj-020.html
				i18n/css3-text-line-break-baspglwj-021.html
				i18n/css3-text-line-break-baspglwj-022.html
				i18n/css3-text-line-break-baspglwj-023.html
				i18n/css3-text-line-break-baspglwj-024.html
				i18n/css3-text-line-break-baspglwj-025.html
				i18n/css3-text-line-break-baspglwj-026.html
				i18n/css3-text-line-break-baspglwj-030.html
				i18n/css3-text-line-break-baspglwj-031.html
				i18n/css3-text-line-break-baspglwj-032.html
				i18n/css3-text-line-break-baspglwj-033.html
				i18n/css3-text-line-break-baspglwj-034.html
				i18n/css3-text-line-break-baspglwj-035.html
				i18n/css3-text-line-break-baspglwj-036.html
				i18n/css3-text-line-break-baspglwj-037.html
				i18n/css3-text-line-break-baspglwj-038.html
				i18n/css3-text-line-break-baspglwj-039.html
				i18n/css3-text-line-break-baspglwj-040.html
				i18n/css3-text-line-break-baspglwj-041.html
				i18n/css3-text-line-break-baspglwj-042.html
				i18n/css3-text-line-break-baspglwj-043.html
				i18n/css3-text-line-break-baspglwj-044.html
				i18n/css3-text-line-break-baspglwj-045.html
				i18n/css3-text-line-break-baspglwj-046.html
				i18n/css3-text-line-break-baspglwj-047.html
				i18n/css3-text-line-break-baspglwj-048.html
				i18n/css3-text-line-break-baspglwj-049.html
				i18n/css3-text-line-break-baspglwj-050.html
				i18n/css3-text-line-break-baspglwj-051.html
				i18n/css3-text-line-break-baspglwj-052.html
				i18n/css3-text-line-break-baspglwj-060.html
				i18n/css3-text-line-break-baspglwj-061.html
				i18n/css3-text-line-break-baspglwj-062.html
				i18n/css3-text-line-break-baspglwj-063.html
				i18n/css3-text-line-break-baspglwj-064.html
				i18n/css3-text-line-break-baspglwj-065.html
				i18n/css3-text-line-break-baspglwj-066.html
				i18n/css3-text-line-break-baspglwj-067.html
				i18n/css3-text-line-break-baspglwj-068.html
				i18n/css3-text-line-break-baspglwj-069.html
				i18n/css3-text-line-break-baspglwj-070.html
				i18n/css3-text-line-break-baspglwj-071.html
				i18n/css3-text-line-break-baspglwj-072.html
				i18n/css3-text-line-break-baspglwj-073.html
				i18n/css3-text-line-break-baspglwj-074.html
				i18n/css3-text-line-break-baspglwj-075.html
				i18n/css3-text-line-break-baspglwj-076.html
				i18n/css3-text-line-break-baspglwj-077.html
				i18n/css3-text-line-break-baspglwj-078.html
				i18n/css3-text-line-break-baspglwj-080.html
				i18n/css3-text-line-break-baspglwj-081.html
				i18n/css3-text-line-break-baspglwj-082.html
				i18n/css3-text-line-break-baspglwj-083.html
				i18n/css3-text-line-break-baspglwj-084.html
				i18n/css3-text-line-break-baspglwj-085.html
				i18n/css3-text-line-break-baspglwj-086.html
				i18n/css3-text-line-break-baspglwj-090.html
				i18n/css3-text-line-break-baspglwj-091.html
				i18n/css3-text-line-break-baspglwj-092.html
				i18n/css3-text-line-break-baspglwj-093.html
				i18n/css3-text-line-break-baspglwj-095.html
				i18n/css3-text-line-break-baspglwj-096.html
				i18n/css3-text-line-break-baspglwj-097.html
				i18n/css3-text-line-break-baspglwj-098.html
				i18n/css3-text-line-break-baspglwj-099.html
				i18n/css3-text-line-break-baspglwj-100.html
				i18n/css3-text-line-break-baspglwj-101.html
				i18n/css3-text-line-break-baspglwj-102.html
				i18n/css3-text-line-break-baspglwj-103.html
				i18n/css3-text-line-break-baspglwj-104.html
				i18n/css3-text-line-break-baspglwj-105.html
				i18n/css3-text-line-break-baspglwj-106.html
				i18n/css3-text-line-break-baspglwj-107.html
				i18n/css3-text-line-break-baspglwj-108.html
				i18n/css3-text-line-break-baspglwj-109.html
				i18n/css3-text-line-break-baspglwj-110.html
				i18n/css3-text-line-break-baspglwj-111.html
				i18n/css3-text-line-break-baspglwj-112.html
				i18n/css3-text-line-break-baspglwj-113.html
				i18n/css3-text-line-break-baspglwj-114.html
				i18n/css3-text-line-break-baspglwj-115.html
				i18n/css3-text-line-break-baspglwj-116.html
				i18n/css3-text-line-break-baspglwj-117.html
				i18n/css3-text-line-break-baspglwj-118.html
				i18n/css3-text-line-break-baspglwj-120.html
				i18n/css3-text-line-break-baspglwj-121.html
				i18n/css3-text-line-break-baspglwj-122.html
				i18n/css3-text-line-break-baspglwj-123.html
				i18n/css3-text-line-break-baspglwj-124.html
				i18n/css3-text-line-break-baspglwj-125.html
				i18n/css3-text-line-break-baspglwj-126.html
				i18n/css3-text-line-break-baspglwj-127.html
				i18n/css3-text-line-break-baspglwj-128.html
				i18n/css3-text-line-break-baspglwj-130.html
				i18n/css3-text-line-break-baspglwj-131.html
				white-space/control-chars-00D.html
				white-space/pre-line-051.html
				white-space/pre-line-052.html
				white-space/pre-line-br-with-whitespace-child-crash.html
				white-space/pre-line-with-space-and-newline.html
				white-space/trailing-ideographic-space-008.html
				white-space/trailing-ideographic-space-010.html
				white-space/trailing-ogham-002.html
				white-space/trailing-other-space-separators-003.html
				white-space/trailing-space-and-text-alignment-005.html
				white-space/trailing-space-and-text-alignment-rtl-005.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-intrinsic-size-019.html
				white-space/white-space-intrinsic-size-020.html
				white-space/white-space-intrinsic-size-021.html
				white-space/white-space-letter-spacing-001.html
				white-space/white-space-pre-035.html
				word-break/break-boundary-2-chars-001.html
				word-break/word-break-break-all-062.html
				word-break/word-break-keep-all-063.html
			</wpt>

		<dt><dfn>preserve-spaces</dfn>
		<dd>
			This value prevents user agents
			from collapsing sequences of [=white space=],
			and converts [=tabs=] and [=segment breaks=] to [=spaces=].
			(This value is intended to represent the behavior
			of <code>xml:space="preserve"</code> in SVG.)

		<dt><dfn>break-spaces</dfn>
		<dd>
			The behavior is identical to that of ''preserve'',
			except that:

			<ul>
				<li>
					Any sequence of [=preserved=] [=white space=]
					or [=other space separators=]
					always takes up space,
					including at the end of the line.

					<wpt>
					white-space/white-space-intrinsic-size-001.html
					white-space/white-space-intrinsic-size-002.html
					white-space/white-space-intrinsic-size-021.html
					</wpt>

				<li>
					A [=soft wrap opportunity=] exists
					after every [=preserved=] [=white space=] character
					and after every [=other space separator=]
					(including between adjacent spaces).

					<wpt>
					overflow-wrap/overflow-wrap-break-word-002.html
					overflow-wrap/overflow-wrap-anywhere-002.html
					white-space/break-spaces-001.html
					white-space/break-spaces-002.html
					white-space/break-spaces-003.html
					white-space/break-spaces-004.html
					white-space/break-spaces-005.html
					white-space/break-spaces-006.html
					white-space/break-spaces-007.html
					white-space/break-spaces-008.html
					white-space/break-spaces-009.html
					white-space/break-spaces-010.html
					white-space/break-spaces-051.html
					white-space/break-spaces-052.html
					white-space/break-spaces-with-word-break-001.html
					white-space/white-space-pre-034.html
					white-space/textarea-break-spaces-001.html
					white-space/textarea-break-spaces-002.html
					white-space/break-spaces-before-first-char-001.html
					white-space/break-spaces-before-first-char-002.html
					white-space/break-spaces-before-first-char-003.html
					white-space/break-spaces-before-first-char-004.html
					white-space/break-spaces-before-first-char-005.html
					white-space/break-spaces-before-first-char-006.html
					white-space/break-spaces-before-first-char-007.html
					white-space/break-spaces-before-first-char-008.html
					white-space/break-spaces-before-first-char-009.html
					white-space/break-spaces-before-first-char-010.html
					white-space/break-spaces-before-first-char-011.html
					white-space/break-spaces-before-first-char-012.html
					white-space/break-spaces-before-first-char-013.html
					white-space/break-spaces-before-first-char-014.html
					white-space/break-spaces-before-first-char-015.html
					white-space/break-spaces-before-first-char-016.html
					white-space/break-spaces-before-first-char-017.html
					white-space/break-spaces-before-first-char-018.html
					white-space/break-spaces-before-first-ideographic-char-001.html
					white-space/break-spaces-before-first-ideographic-char-002.html
					white-space/break-spaces-before-first-ideographic-char-003.html
					white-space/break-spaces-before-first-ideographic-char-004.html
					white-space/break-spaces-before-first-ideographic-char-005.html
					white-space/break-spaces-before-first-ideographic-char-006.html
					white-space/break-spaces-before-first-ideographic-char-007.html
					white-space/break-spaces-before-first-ideographic-char-008.html
					white-space/break-spaces-before-first-ideographic-char-009.html
					white-space/break-spaces-before-first-ideographic-char-010.html
					white-space/break-spaces-before-first-ideographic-char-011.html
					white-space/break-spaces-before-first-ideographic-char-012.html
					white-space/break-spaces-before-first-ideographic-char-013.html
					white-space/break-spaces-before-first-ideographic-char-014.html
					white-space/break-spaces-before-first-ideographic-char-015.html
					white-space/break-spaces-before-first-ideographic-char-016.html
					white-space/break-spaces-before-first-ideographic-char-017.html
					white-space/break-spaces-before-first-ideographic-char-018.html
					white-space/tab-stop-threshold-005.html
					white-space/tab-stop-threshold-006.html
					word-break/word-break-break-all-017.html
					white-space/break-spaces-tab-001.html
					white-space/break-spaces-tab-002.html
					white-space/break-spaces-tab-003.html
					white-space/break-spaces-tab-004.html
					white-space/break-spaces-tab-005.html
					white-space/break-spaces-tab-006.html
					white-space/break-spaces-with-overflow-wrap-001.html
					white-space/break-spaces-with-overflow-wrap-002.html
					white-space/break-spaces-with-overflow-wrap-003.html
					white-space/break-spaces-with-overflow-wrap-004.html
					white-space/break-spaces-with-overflow-wrap-005.html
					white-space/break-spaces-with-overflow-wrap-006.html
					white-space/break-spaces-with-overflow-wrap-007.html
					white-space/break-spaces-with-overflow-wrap-008.html
					white-space/break-spaces-with-overflow-wrap-009.html
					white-space/break-spaces-with-overflow-wrap-010.html
					white-space/break-spaces-with-ideographic-space-001.html
					white-space/break-spaces-with-ideographic-space-002.html
					white-space/break-spaces-with-ideographic-space-003.html
					white-space/break-spaces-with-ideographic-space-004.html
					white-space/break-spaces-with-ideographic-space-005.html
					white-space/break-spaces-with-ideographic-space-006.html
					white-space/break-spaces-with-ideographic-space-007.html
					white-space/break-spaces-with-ideographic-space-008.html
					white-space/break-spaces-with-ideographic-space-009.html
					white-space/break-spaces-with-ideographic-space-010.html
					line-break/line-break-anywhere-and-white-space-008.html
					line-break/line-break-anywhere-and-white-space-009.html
					white-space/ws-break-spaces-applies-to-001.html
					white-space/ws-break-spaces-applies-to-002.html
					white-space/ws-break-spaces-applies-to-003.html
					white-space/ws-break-spaces-applies-to-005.html
					white-space/ws-break-spaces-applies-to-006.html
					white-space/ws-break-spaces-applies-to-007.html
					white-space/ws-break-spaces-applies-to-008.html
					white-space/ws-break-spaces-applies-to-009.html
					white-space/ws-break-spaces-applies-to-010.html
					white-space/ws-break-spaces-applies-to-011.html
					white-space/ws-break-spaces-applies-to-012.html
					white-space/ws-break-spaces-applies-to-013.html
					white-space/ws-break-spaces-applies-to-014.html
					white-space/ws-break-spaces-applies-to-015.html
					white-space/break-spaces-newline-011.html
					white-space/break-spaces-newline-012.html
					white-space/break-spaces-newline-013.html
					white-space/break-spaces-newline-014.html
					white-space/break-spaces-newline-015.html
					white-space/break-spaces-newline-016.html
					white-space/trailing-ideographic-space-break-spaces-001.html
					white-space/trailing-ideographic-space-break-spaces-002.html
					white-space/trailing-ideographic-space-break-spaces-003.html
					white-space/trailing-ideographic-space-break-spaces-004.html
					white-space/trailing-ideographic-space-break-spaces-005.html
					white-space/trailing-ideographic-space-break-spaces-006.html
					white-space/trailing-ideographic-space-break-spaces-007.html
					white-space/trailing-ideographic-space-break-spaces-008.html
					</wpt>

			</ul>

			Note: 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.

		<dt><dfn>discard</dfn>
		<dd>
			This value directs user agents to “discard”
			all white space in the element.

			<wpt>
			white-space/white-space-collapse-discard-001.xht
			</wpt>

			Issue: Does this preserve line break opportunities or no? Do we need a distinct "hide" value?
			If it preserves line break opportunities,
			maybe it should be replaced with a 'word-space-transform' value?
	</dl>

	[=White space=] that was not removed or collapsed due to white space processing
	is called <dfn export local-lt="preserved">preserved white space</dfn>.

	<div class="example">

		The following style rules implement MathML's white space processing:

		<pre>
			@namespace m "http://www.w3.org/1998/Math/MathML";
			m|* {
				white-space-collapse: discard;
			}
			m|mi, m|mn, m|mo, m|ms, m|mtext {
				white-space-trim: discard-inner;
			}
		</pre>
	</div>

<h3 id="white-space-trim" oldids="text-space-trim">
White Space Trimming: the 'white-space-trim' property</h3>

	<wpt title="This section mostly lacks tests"></wpt>

	<pre class="propdef">
	Name: white-space-trim
	Value: none | discard-before || discard-after || discard-inner
	Initial: none
	Applies to: [=inline boxes=] and [=block containers=]
	Inherited: no
	Percentages: n/a
	Computed value: specified keyword(s)
	Animation type: discrete
	</pre>

	This property allows authors to specify trimming behavior
	at the beginning and end of a box.
	Values have the following meanings:

	<dl dfn-for=white-space-trim dfn-type=value>
		<dt><dfn>discard-before</dfn>
		<dd>
			This value directs the UA to collapse all collapsible whitespace
			immediately before the start of the element.

		<dt><dfn>discard-after</dfn>
		<dd>
			This value directs the UA to collapse all collapsible whitespace
			immediately after the end of the element.

		<dt><dfn>discard-inner</dfn>
		<dd>
			For block containers this value directs UAs to discard
			all whitespace at the beginning of the element up to and including
			the last <a>segment break</a> before the first non-white-space character in the element
			as well as to discard all white space at the end of the element
			starting with the first <a>segment break</a> after the last non-white-space character in the element.
			For other elements this value directs UAs to discard
			all whitespace at the beginning and end of the element.

			<wpt>
				white-space/white-space-trim-discard-inner-001.xht
			</wpt>
	</dl>


	Note: Discarding [=document white space=] using 'white-space-trim'
	can change where [=soft wrap opportunities=] occur in the text.

	<div class="example">
		<p>The following style rules render DT elements as a comma-separated list,
		even if they are coded on separate lines of the source document:
		<pre>
			dt { display: inline; }
			dt + dt:before { content: ", "; white-space-trim: discard-before; }
		</pre>
	</div>

	<div class="example">
		<p>The following style rule removes source-formatting white space
		adjacent to the opening/closing tags of a preformatted block,
		but not any indentation or interleaved white space
		applied to the actual contents of the element:
		<pre>
			pre { white-space: pre; white-space-trim: discard-inner; }
		</pre>
		This results in the following two source-code snippets:
		<div style="display: flex; flex-flow: wrap; justify-content: space-around">
		<xmp highlight="html">
			<pre>

			  some
			preformatted

			  text

			</pre>
		</xmp>
		<xmp highlight="html">
			<pre>  some
			preformatted

			  text</pre>
		</xmp>
		</div>
		rendering identically as:
		<pre class="output" style="margin-inline: auto">
		  some
		preformatted

		  text</pre>

		If instead we apply it to an inline element:
		<pre>
			span { white-space: normal; white-space-trim: discard-inner; }
		</pre>
		<div style="display: flex; flex-flow: wrap; justify-content: space-around">
		<xmp highlight="html">
			start[<span>

			  some
			inline
			  text

			</span>]end
		</xmp>
		<xmp highlight="html">
			start[<span>  some
			inline
			  text</span>]end
		</xmp>
		</div>
		this directs the UA to discard <em>all</em> of the leading/trailing white space
		before the actual contents of the element:
		<pre class="output" style="margin-inline: auto">
			start[some inline text]end
		</pre>
	</div>

	White space processing for 'white-space-trim'
	takes place before [[#white-space-phase-1]].

<h3 id="white-space-rules">
The White Space Processing Rules</h3>

	<wpt title="
		This section has good test coverage.
		Most tests to be found in subsections."></wpt>

	Except where specified otherwise,
	white space processing in CSS affects only
	the <dfn export lt="white space|white space characters| document white space|document white space characters">document white space characters</dfn>:
	<dfn>spaces</dfn> (U+0020), <dfn>tabs</dfn> (U+0009), and [[#white-space-processing|segment breaks]].

	<wpt pathprefix="/css/CSS2/text/">
	white-space-normal-003.xht
	white-space-normal-004.xht
	white-space-normal-005.xht
	white-space-normal-006.xht
	white-space-normal-007.xht
	white-space-normal-008.xht
	white-space-nowrap-005.xht
	white-space-nowrap-006.xht
	white-space-pre-005.xht
	white-space-pre-006.xht
	white-space-processing-054.xht
	white-space-processing-055.xht
	white-space-processing-056.xht
	</wpt>

	<wpt>
	white-space/display-contents-remove-whitespace-change.html
	white-space/remove-slotted-with-whitespace-sibling.html
	</wpt>

	Note: The set of characters considered [=document white space=]
	(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.

	Besides space (U+0020)
	and no-break space (U+00A0),
	Unicode defines a number of additional space separator characters.
	[[UNICODE]]
	In this specification
	all characters in the Unicode [=general category=] Zs
	except space (U+0020)
	and no-break space (U+00A0)
	are collectively referred to as
	<dfn>other space separators</dfn>.

	<wpt>
	white-space/trailing-other-space-separators-001.html
	white-space/trailing-other-space-separators-002.html
	white-space/trailing-other-space-separators-003.html
	white-space/trailing-other-space-separators-004.html
	white-space/trailing-other-space-separators-break-spaces-001.html
	white-space/trailing-other-space-separators-break-spaces-002.html
	white-space/trailing-other-space-separators-break-spaces-003.html
	white-space/trailing-other-space-separators-break-spaces-004.html
	white-space/trailing-other-space-separators-break-spaces-005.html
	white-space/trailing-other-space-separators-break-spaces-006.html
	white-space/trailing-other-space-separators-break-spaces-007.html
	white-space/trailing-other-space-separators-break-spaces-008.html
	white-space/trailing-other-space-separators-break-spaces-009.html
	white-space/trailing-other-space-separators-break-spaces-010.html
	white-space/trailing-other-space-separators-break-spaces-011.html
	white-space/trailing-other-space-separators-break-spaces-012.html
	white-space/trailing-other-space-separators-break-spaces-013.html
	white-space/trailing-other-space-separators-break-spaces-014.html
	white-space/trailing-other-space-separators-break-spaces-015.html
	</wpt>

<h4 id="white-space-phase-1">
Phase I: Collapsing and Transformation</h4>

	<wpt title="
		This section has good test coverage,
		most parts are well exercised.

		Missing tests:
		* If white-space-collapse is set to preserve-spaces, each tab and segment break is converted to a space.

		"></wpt>

	Note: 'white-space-trim' is taken into account prior to this phase.

	For each inline
	(including anonymous inlines;
	see [[CSS2/visuren#anonymous]] [[CSS2]])
	within an [=inline formatting context=],
	[=white space characters=] are processed as follows
	prior to [=line breaking=] and [[css-writing-modes-4#text-direction|bidi reordering]],
	ignoring <dfn noexport>bidi formatting characters</dfn>
	(characters with the <code>Bidi_Control</code> property [[!UAX9]])
	as if they were not there:

	<wpt>
	white-space/white-space-collapse-002.html
	white-space/white-space-normal-011.html
	white-space/white-space-nowrap-011.html
	</wpt>

	<ul>
		<li id="collapse">
			If 'white-space-collapse' is set to ''white-space-collapse/collapse'' or ''preserve-breaks'',
			[=white space characters=] are considered <dfn export lt="collapsible white space" local-lt="collapsible">collapsible</dfn>
			and are processed by performing the following steps:

			<ol>
				<li>
					Any sequence of collapsible [=spaces=] and [=tabs=]
					immediately preceding or following a [=segment break=]
					is removed.

					<wpt>
<!-- to be moved/removed together with the segment break transformation text
					white-space/seg-break-transformation-000.html
-->
					white-space/white-space-normal-011.html
					white-space/white-space-nowrap-011.html
					line-breaking/segment-break-transformation-unremovable-3.html
					line-breaking/segment-break-transformation-unremovable-4.html
					</wpt>

					<wpt pathprefix="/css/CSS2/text/">
					white-space-processing-002.xht
					white-space-processing-003.xht
					white-space-processing-004.xht
					white-space-processing-008.xht
					white-space-processing-009.xht
					white-space-processing-010.xht
					white-space-processing-005.xht
					white-space-processing-006.xht
					white-space-processing-007.xht
					</wpt>

				<li>
					Collapsible [=segment breaks=] are transformed for rendering
					according to the [[#line-break-transform|segment break transformation rules]].

				<li>
					Every [=collapsible=] [=tab=] is converted to a collapsible space (U+0020).

					<wpt>
					white-space/white-space-collapse-000.html
					white-space/white-space-normal-011.html
					white-space/white-space-nowrap-011.html
					</wpt>

					<wpt pathprefix="/css/CSS2/text/">
					white-space-processing-019.xht
					white-space-processing-020.xht
					white-space-processing-021.xht
					</wpt>

				<li>
					Any [=collapsible=] [=space=] immediately following another [=collapsible=] [=space=]--
					even one outside the boundary of the inline containing that [=space=],
					provided both [=spaces=] are within the same inline formatting context--
					is collapsed to have zero advance width.
					(It is invisible,
					but retains its [=soft wrap opportunity=],
					if any.)

					<wpt>
					white-space/white-space-collapse-001.html
					white-space/white-space-empty-text-sibling.html
					white-space/white-space-normal-011.html
					white-space/white-space-nowrap-011.html
					</wpt>

					<wpt pathprefix="/css/CSS2/text/">
					white-space-001.xht
					white-space-003.xht
					white-space-005.xht
					white-space-collapsing-001.xht
					white-space-collapsing-002.xht
					white-space-collapsing-004.xht
					white-space-collapsing-005.xht
					white-space-collapsing-breaks-001.xht
					white-space-mixed-001.xht
					white-space-mixed-002.xht
					white-space-normal-001.xht
					white-space-processing-001.xht
					white-space-processing-022.xht
					white-space-processing-023.xht
					white-space-processing-024.xht
					white-space-processing-025.xht
					white-space-processing-026.xht
					white-space-processing-027.xht
					white-space-processing-028.xht
					white-space-processing-029.xht
					white-space-processing-030.xht
					white-space-processing-031.xht
					white-space-processing-032.xht
					white-space-processing-033.xht
					white-space-processing-034.xht
					white-space-processing-035.xht
					white-space-processing-036.xht
					white-space-processing-050.xht
					white-space-processing-051.xht
					white-space-processing-053.xht
					</wpt>
			</ol>

		<li>
			If 'white-space-collapse' is set to ''preserve-spaces'',
			each [=tab=] and [=segment break=] is converted to a [=space=].

		<li>
			If 'white-space-collapse' is set to ''preserve'' or ''preserve-spaces'',
			any sequence of spaces is treated as a sequence of non-breaking spaces
			except that
			a [=soft wrap opportunity=] exists at the end of each maximal sequence of [=spaces=] and/or [=tabs=].
			For ''break-spaces'',
			a [=soft wrap opportunity=] exists after every [=space=] and every [=tab=].

			<wpt>
			white-space/white-space-pre-011.html
			overflow-wrap/overflow-wrap-break-word-004.html
			overflow-wrap/overflow-wrap-break-word-005.html
			overflow-wrap/overflow-wrap-break-word-006.html
			overflow-wrap/overflow-wrap-break-word-007.html
			overflow-wrap/overflow-wrap-anywhere-004.html
			overflow-wrap/overflow-wrap-anywhere-005.html
			word-break/word-break-break-all-011.html
			word-break/word-break-break-all-012.html
			word-break/word-break-break-all-013.html
			word-break/word-break-break-all-015.html
			white-space/break-spaces-006.html
			white-space/break-spaces-007.html
			white-space/break-spaces-008.html
			white-space/break-spaces-009.html
			white-space/break-spaces-010.html
			white-space/break-spaces-before-first-char-001.html
			white-space/break-spaces-before-first-char-002.html
			white-space/break-spaces-before-first-char-003.html
			white-space/break-spaces-before-first-char-004.html
			white-space/break-spaces-before-first-char-005.html
			white-space/break-spaces-before-first-char-006.html
			white-space/break-spaces-before-first-char-011.html
			white-space/break-spaces-before-first-ideographic-char-001.html
			white-space/break-spaces-before-first-ideographic-char-002.html
			white-space/break-spaces-before-first-ideographic-char-003.html
			white-space/break-spaces-before-first-ideographic-char-004.html
			white-space/break-spaces-before-first-ideographic-char-005.html
			white-space/break-spaces-before-first-ideographic-char-006.html
			white-space/break-spaces-before-first-ideographic-char-011.html
			white-space/pre-wrap-008.html
			white-space/pre-wrap-015.html
			white-space/pre-wrap-016.html
			white-space/pre-wrap-leading-spaces-001.html
			white-space/pre-wrap-leading-spaces-002.html
			white-space/pre-wrap-leading-spaces-003.html
			white-space/pre-wrap-leading-spaces-004.html
			white-space/pre-wrap-leading-spaces-005.html
			white-space/pre-wrap-leading-spaces-006.html
			white-space/pre-wrap-leading-spaces-007.html
			white-space/pre-wrap-leading-spaces-008.html
			white-space/pre-wrap-leading-spaces-009.html
			white-space/pre-wrap-leading-spaces-010.html
			white-space/pre-wrap-leading-spaces-011.html
			white-space/pre-wrap-leading-spaces-012.html
			white-space/pre-wrap-leading-spaces-013.html
			white-space/pre-wrap-leading-spaces-014.html
			white-space/break-spaces-tab-001.html
			white-space/break-spaces-tab-002.html
			white-space/break-spaces-tab-003.html
			white-space/break-spaces-tab-004.html
			white-space/pre-wrap-tab-001.html
			white-space/pre-wrap-tab-002.html
			white-space/pre-wrap-tab-003.html
			white-space/pre-wrap-tab-004.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			white-space-002.xht
			white-space-004.xht
			white-space-processing-011.xht
			white-space-processing-012.xht
			white-space-processing-013.xht
			white-space-processing-052.xht
			</wpt>
	</ul>

	<wpt pathprefix="/css/CSS2/">
	bidi-text/bidi-002.xht
	bidi-text/bidi-004.xht
	bidi-text/line-breaking-bidi-001.xht
	bidi-text/line-breaking-bidi-002.xht
	bidi-text/line-breaking-bidi-003.xht
	</wpt>

	<wpt pathprefix="/css/CSS2/text/">
	white-space-collapsing-bidi-001.xht
	white-space-collapsing-bidi-002.xht
	</wpt>

	<div class="example" id="egbidiwscollapse">
		The following example illustrates
		the interaction of white-space collapsing and bidirectionality.
		Consider the following markup fragment, taking special note of [=spaces=]
		(with varied backgrounds and borders for emphasis and identification):

		<pre><code>&lt;ltr&gt;A<span class="egbidiwsaA">&#160;</span>&lt;rtl&gt;<span class="egbidiwsbB">&#160;</span>B<span class="egbidiwsaB">&#160;</span>&lt;/rtl&gt;<span class="egbidiwsbC">&#160;</span>C&lt;/ltr&gt;</code></pre>

		where the <code>&lt;ltr&gt;</code> element represents a left-to-right embedding
		and the <code>&lt;rtl&gt;</code> element represents a right-to-left embedding.
		If the 'white-space' property is set to ''white-space/normal'',
		the white-space processing model will result in the following:

		<ul style="line-height:1.3">
			<li>
				The [=space=] before the B (<span class="egbidiwsbB">&#160;</span>)
				will collapse with the [=space=] after the A (<span class="egbidiwsaA">&#160;</span>).
			<li>
				The [=space=] before the C (<span class="egbidiwsbC">&#160;</span>)
				will collapse with the [=space=] after the B (<span class="egbidiwsaB">&#160;</span>).
		</ul>

		This will leave two [=spaces=],
		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:

		<pre>A<span class="egbidiwsaA">&#160;</span><span class="egbidiwsaB">&#160;</span>BC</pre>

		Note that there will be two [=spaces=] between A and B,
		and none between B and C.
		This is best avoided by putting [=spaces=] 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.
	</div>

	<wpt pathprefix="/css/CSS2/text/">
	white-space-bidirectionality-001.xht
	</wpt>

<h4 id="white-space-phase-2">
Phase II: Trimming and Positioning</h4>

	<wpt title="
		This section has good test coverage,
		all parts are well exercised."></wpt>

	Then, the entire block is rendered.
	Inlines are laid out,
	taking [[css-writing-modes-4#text-direction|bidi reordering]] into account,
	and [=wrapping=] as specified by the 'text-wrap-mode' and 'text-wrap-style' property.
	As each line is laid out,

	<ol>
		<li>
			A sequence of [=collapsible=] [=spaces=] at the beginning of a line
			is removed.

			<wpt>
			white-space/line-edge-white-space-collapse-002.html
			white-space/break-spaces-051.html
			white-space/break-spaces-052.html
			white-space/pre-line-051.html
			white-space/pre-line-052.html
			white-space/pre-wrap-051.html
			white-space/pre-wrap-052.html
			white-space/white-space-pre-051.html
			white-space/white-space-pre-052.html
			white-space/full-width-leading-spaces-001.html
			white-space/full-width-leading-spaces-002.html
			white-space/full-width-leading-spaces-003.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			white-space-collapsing-003.xht
			white-space-collapsing-bidi-003.xht
			white-space-normal-001.xht
			white-space-normal-002.xht
			white-space-processing-037.xht
			white-space-processing-038.xht
			white-space-processing-039.xht
			white-space-processing-040.xht
			white-space-processing-041.xht
			</wpt>

		<li>
			If the [=tab size=] is zero,
			[=preserved=] [=tabs=] are not rendered.
			Otherwise, each [=preserved=] [=tab=] is rendered
			as a horizontal shift that lines up
			the start edge of the next glyph with the next [=tab stop=].
			If this distance is less than ''0.5ch'',
			then the subsequent [=tab stop=] is used instead.
			<dfn lt="tab stop">Tab stops</dfn> occur at points
			that are multiples of the [=tab size=]
			from the starting content edge
			of the [=preserved=] [=tab=]’s nearest [=block container=] ancestor.
			The [=tab size=] is given by the 'tab-size' property.

			<wpt>
			white-space/tab-stop-threshold-001.html
			white-space/tab-stop-threshold-002.html
			white-space/tab-stop-threshold-003.html
			white-space/tab-stop-threshold-004.html
			white-space/tab-stop-threshold-005.html
			white-space/tab-stop-threshold-006.html
			white-space/white-space-pre-011.html
			tab-size/tab-min-rendered-width-1.html
			tab-size/tab-size-integer-003.html
			text-indent/text-indent-tab-positions-001.html
			tab-size/tab-size-inline-002.html
			white-space/white-space-zero-fontsize-002.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			white-space-processing-042.xht
			</wpt>

			Note: See the Unicode <a href="http://unicode.org/reports/tr9/#L1">rules on how tabulation (U+0009) interacts with bidi</a>. [[UAX9]]

			<wpt>
			bidi/bidi-tab-001.html
			</wpt>

			<wpt>
			white-space/tab-bidi-001.html
			</wpt>

		<li>
			A sequence of [=collapsible=] [=spaces=]
			at the end of a line is removed,
			as well as any trailing U+1680 &#x1680; OGHAM SPACE MARK
			whose 'white-space-collapse' property is ''white-space-collapse/collapse'' or ''white-space-collapse/preserve-breaks''.

			<wpt>
			white-space/line-edge-white-space-collapse-001.html
			white-space/pre-float-001.html
			white-space/pre-wrap-float-001.html
			white-space/trailing-space-before-br-001.html
			white-space/trailing-ogham-001.html
			white-space/trailing-ogham-002.html
			white-space/trailing-ogham-003.html
			overflow-wrap/overflow-wrap-anywhere-011.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text/">
			white-space-collapsing-003.xht
			white-space-collapsing-bidi-003.xht
			white-space-normal-001.xht
			white-space-normal-002.xht
			white-space-processing-005.xht
			white-space-processing-043.xht
			white-space-processing-044.xht
			white-space-processing-045.xht
			white-space-processing-046.xht
			white-space-processing-047.xht
			</wpt>

			Note: Due to <cite>Unicode Bidirectional Algorithm</cite> rule <a href="http://unicode.org/reports/tr9/#L1">L1</a>,
			a sequence of [=collapsible=] [=spaces=] located at the end of the line
			prior to [[css-writing-modes-4#text-direction|bidi reordering]]
			will also be at the end of the line after reordering.
			[[UAX9]]
			[[CSS-WRITING-MODES-4]]

			<wpt>
			white-space/eol-spaces-bidi-001.html
			white-space/eol-spaces-bidi-003.html
			white-space/trailing-space-rtl-001.html
			</wpt>

		<li>
			If there remains any sequence of [=white space=],
			[=other space separators=],
			and/or [=preserved=] [=tabs=]
			at the end of a line
			(after [[css-writing-modes-4#text-direction|bidi reordering]] [[CSS-WRITING-MODES-4]]):

			<ul>
				<li>
					If 'white-space-collapse' is ''white-space-collapse/collapse'' or ''white-space-collapse/preserve-breaks'',
					the UA must [=hang=] this sequence (unconditionally).

					<wpt>
					white-space/trailing-ideographic-space-001.html
					white-space/trailing-ideographic-space-002.html
					white-space/trailing-ideographic-space-005.html
					white-space/trailing-ideographic-space-006.html
					white-space/trailing-ideographic-space-007.html
					white-space/trailing-ideographic-space-008.html
					white-space/trailing-ideographic-space-009.html
					white-space/trailing-ideographic-space-010.html
					white-space/trailing-ideographic-space-011.html
					white-space/trailing-ideographic-space-012.html
					white-space/trailing-ideographic-space-013.html
					white-space/trailing-ideographic-space-014.html
					white-space/trailing-ideographic-space-015.html
					white-space/trailing-ideographic-space-016.html
					white-space/trailing-ideographic-space-017.html
					white-space/trailing-ideographic-space-018.html
					white-space/trailing-ideographic-space-019.html
					white-space/trailing-ideographic-space-020.html
					white-space/trailing-ideographic-space-021.html
					white-space/trailing-ideographic-space-022.html
					white-space/trailing-ideographic-space-023.html
					white-space/trailing-ideographic-space-024.html
					white-space/trailing-ideographic-space-025.html
					white-space/trailing-other-space-separators-001.html
					white-space/trailing-other-space-separators-003.html
					white-space/trailing-other-space-separators-004.html
					text-transform/text-transform-fullwidth-008.html
					white-space/white-space-intrinsic-size-019.html
					white-space/white-space-intrinsic-size-020.html
					white-space/trailing-space-and-text-alignment-001.html
					white-space/trailing-space-and-text-alignment-005.html
					white-space/trailing-space-and-text-alignment-rtl-001.html
					white-space/trailing-space-and-text-alignment-rtl-005.html
					</wpt>

				<li>
					If 'white-space-collapse' is ''white-space-collapse/preserve''
					and 'text-wrap-mode' is not ''text-wrap-mode/nowrap'',
					the UA must (unconditionally) [=hang=] this sequence,
					unless the sequence is followed by a [=forced line break=],
					in which case it must [=conditionally hang=] the sequence instead.
					It may also visually collapse the character advance widths
					of any that would otherwise overflow.

					<wpt>
					white-space/pre-wrap-001.html
					white-space/pre-wrap-002.html
					white-space/pre-wrap-003.html
					white-space/pre-wrap-004.html
					white-space/pre-wrap-005.html
					white-space/pre-wrap-006.html
					white-space/pre-wrap-007.html
					white-space/pre-wrap-011.html
					white-space/pre-wrap-012.html
					white-space/pre-wrap-013.html
					white-space/pre-wrap-014.html
					white-space/pre-wrap-017.html
					white-space/pre-wrap-018.html
					white-space/pre-wrap-019.html
					white-space/pre-wrap-020.html
					white-space/textarea-pre-wrap-001.html
					white-space/textarea-pre-wrap-002.html
					white-space/textarea-pre-wrap-003.html
					white-space/textarea-pre-wrap-004.html
					white-space/textarea-pre-wrap-005.html
					white-space/textarea-pre-wrap-006.html
					white-space/textarea-pre-wrap-007.html
					white-space/textarea-pre-wrap-011.html
					white-space/textarea-pre-wrap-012.html
					white-space/textarea-pre-wrap-013.html
					white-space/textarea-pre-wrap-014.html
					white-space/trailing-ideographic-space-003.html
					white-space/trailing-ideographic-space-004.html
					white-space/white-space-pre-wrap-trailing-spaces-001.html
					white-space/white-space-pre-wrap-trailing-spaces-002.html
					white-space/white-space-pre-wrap-trailing-spaces-003.html
					white-space/white-space-pre-wrap-trailing-spaces-004.html
					white-space/white-space-pre-wrap-trailing-spaces-005.html
					white-space/white-space-pre-wrap-trailing-spaces-006.html
					white-space/white-space-pre-wrap-trailing-spaces-007.html
					white-space/white-space-pre-wrap-trailing-spaces-008.html
					white-space/white-space-pre-wrap-trailing-spaces-010.html
					white-space/white-space-pre-wrap-trailing-spaces-011.html
					white-space/white-space-pre-wrap-trailing-spaces-012.html
					white-space/white-space-pre-wrap-trailing-spaces-013.html
					white-space/white-space-pre-wrap-trailing-spaces-014.html
					white-space/white-space-pre-wrap-trailing-spaces-015.html
					white-space/white-space-intrinsic-size-003.html
					white-space/white-space-intrinsic-size-004.html
					white-space/white-space-intrinsic-size-005.html
					white-space/white-space-intrinsic-size-006.html
					white-space/pre-wrap-tab-005.html
					white-space/pre-wrap-tab-006.html
					white-space/trailing-other-space-separators-002.html
					text-transform/text-transform-fullwidth-009.html
					white-space/trailing-space-position-001.html
					line-break/line-break-anywhere-and-white-space-006.html
					line-break/line-break-anywhere-and-white-space-007.html
					white-space/white-space-intrinsic-size-013.html
					white-space/white-space-intrinsic-size-014.html
					white-space/white-space-intrinsic-size-017.html
					white-space/eol-spaces-bidi-002.html
					white-space/trailing-space-in-inline-box.html
					white-space/trailing-space-and-text-alignment-003.html
					white-space/trailing-space-and-text-alignment-rtl-003.html
					white-space/white-space-pre-wrap-trailing-spaces-021.html
					white-space/white-space-pre-wrap-trailing-spaces-022.html
					white-space/white-space-pre-wrap-trailing-spaces-023.html
					overflow-wrap/overflow-wrap-min-content-size-009.html
					text-justify/text-justify-and-trailing-spaces-001.html
					text-justify/text-justify-and-trailing-spaces-002.html
					text-justify/text-justify-and-trailing-spaces-003.html
					text-justify/text-justify-and-trailing-spaces-004.html
					text-justify/text-justify-and-trailing-spaces-005.html
					text-justify/text-justify-and-trailing-spaces-006.html
					white-space/pre-wrap-align-center-001.html
					white-space/pre-wrap-align-center-002.html
					white-space/pre-wrap-align-center-003.html
					white-space/pre-wrap-align-end-001.html
					white-space/pre-wrap-align-end-002.html
					white-space/pre-wrap-align-end-003.html
					white-space/pre-wrap-align-left-001.html
					white-space/pre-wrap-align-left-002.html
					white-space/pre-wrap-align-left-003.html
					white-space/pre-wrap-align-right-001.html
					white-space/pre-wrap-align-right-002.html
					white-space/pre-wrap-align-right-003.html
					white-space/pre-wrap-align-start-001.html
					white-space/pre-wrap-align-start-002.html
					white-space/pre-wrap-align-start-003.html
					white-space/white-space-pre-wrap-justify-001.html
					white-space/white-space-pre-wrap-justify-002.html
					white-space/white-space-pre-wrap-justify-003.html
					white-space/white-space-pre-wrap-justify-004.html
					white-space/eol-spaces-bidi-004.html
					</wpt>

					Note: [=Hanging=] the white space rather than collapsing it
					allows users to see the space when selecting or editing text.

				<li>
					If 'white-space-collapse' is set to ''break-spaces'',
					[=spaces=], [=tabs=], and [=other space separators=]
					are treated the same as other visible characters:
					they cannot [=hang=] nor have their advance width collapsed.

					<wpt>
					white-space/break-spaces-001.html
					white-space/break-spaces-005.html
					white-space/textarea-break-spaces-001.html
					white-space/break-spaces-tab-005.html
					white-space/break-spaces-tab-006.html
					white-space/trailing-other-space-separators-break-spaces-001.html
					white-space/trailing-other-space-separators-break-spaces-002.html
					white-space/trailing-other-space-separators-break-spaces-003.html
					white-space/trailing-other-space-separators-break-spaces-004.html
					white-space/trailing-other-space-separators-break-spaces-005.html
					white-space/trailing-other-space-separators-break-spaces-006.html
					white-space/trailing-other-space-separators-break-spaces-007.html
					white-space/trailing-other-space-separators-break-spaces-008.html
					white-space/trailing-other-space-separators-break-spaces-009.html
					white-space/trailing-other-space-separators-break-spaces-010.html
					white-space/trailing-other-space-separators-break-spaces-011.html
					white-space/trailing-other-space-separators-break-spaces-012.html
					white-space/trailing-other-space-separators-break-spaces-013.html
					white-space/trailing-other-space-separators-break-spaces-014.html
					white-space/trailing-other-space-separators-break-spaces-015.html
					line-break/line-break-anywhere-and-white-space-008.html
					line-break/line-break-anywhere-and-white-space-009.html
					white-space/break-spaces-with-ideographic-space-001.html
					white-space/break-spaces-with-ideographic-space-001.html
					white-space/break-spaces-with-ideographic-space-005.html
					white-space/break-spaces-with-ideographic-space-007.html
					white-space/break-spaces-with-ideographic-space-008.html
					white-space/break-spaces-with-ideographic-space-009.html
					white-space/break-spaces-with-ideographic-space-010.html
					white-space/trailing-ideographic-space-break-spaces-001.html
					white-space/trailing-ideographic-space-break-spaces-002.html
					white-space/trailing-ideographic-space-break-spaces-003.html
					white-space/trailing-ideographic-space-break-spaces-004.html
					white-space/trailing-ideographic-space-break-spaces-005.html
					white-space/trailing-ideographic-space-break-spaces-006.html
					white-space/trailing-ideographic-space-break-spaces-007.html
					white-space/trailing-ideographic-space-break-spaces-008.html
					white-space/trailing-space-and-text-alignment-004.html
					white-space/trailing-space-and-text-alignment-rtl-004.html
					</wpt>

					Note: 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.
			</ul>

			ISSUE: What should happen here for ''white-space-collapse: preserve-spaces''?
	</ol>

	<div class=example>
		This example shows that [=conditionally hanging=] 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 highlight=css>
			p {
				white-space: pre-wrap;
				width: 5ch;
				border: solid 1px;
				font-family: monospace;
				text-align: center;
			}
		</code></pre>

		<xmp highlight=html>
			<p> 0 </p>
		</xmp>

		The sample above would be rendered as follows:
		<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>

		Since the final [=space=] is before a forced line break
		and does not overflow,
		it does not hang,
		and centering works as expected.
	</div>

	<div class=example>
		This example illustrates the difference
		between [=hanging=] [=spaces=]
		at the end of lines without forced breaks,
		and [=conditionally hanging=] them at the end of lines with forced breaks.
		An underline is added to help visualize the [=spaces=].

		<pre><code highlight=css>
			p {
				white-space: pre-wrap;
				width: 3ch;
				border: solid 1px;
				font-family: monospace;
			}
		</code></pre>

		<xmp highlight=html>
			<p> 0 0 0 0 </p>
		</xmp>

		The sample above would be rendered as follows:
		<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>

		If <code highlight=css>p { text-align: right; }</code> was added,
		the result would be as follows:

		<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>

		As the [=preserved=] [=spaces=] at the end of lines without a forced break must [=hang=],
		they are not considered when placing the rest of the line during text alignment.
		When aligning towards the end,
		this means any such [=spaces=] 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
		[=conditionally hang=].
		Since the space at the end of the last line would not overflow in this example,
		it does not [=hang=]
		and therefore is considered during text alignment.
	</div>

	<div class=example>
		In the following example,
		there is not enough room on any line to fit the end-of-line spaces,
		so they [=hang=] 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 [=conditionally hangs=] and overflows.
		An underline is added to help visualize the spaces.

		<pre><code highlight=css>
			p {
				white-space: pre-wrap;
				width: 3ch;
				border: solid 1px;
				font-family: monospace;
			}
		</code></pre>

		<xmp highlight=html>
			<p>0 0 0 0 </p>
		</xmp>

		<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>

		The last line is not wrapped before the last <code>0</code>
		because characters that [=conditionally hang=] are not considered
		when measuring the line’s contents for fit.
	</div>


<h4 id="line-break-transform">
Segment Break Transformation Rules</h4>

	<wpt title="
		This section has reasonable test coverage,
		though some assertions are only tested indirectly through
		test for other features that rely on this,
		rather than by dedicated tests."></wpt>

	When 'white-space-collapse' is not ''white-space-collapse/collapse'',
	[=segment breaks=] are not [=collapsible=].
	For values other than ''white-space-collapse/collapse''
	or ''white-space-collapse/preserve-spaces''
	(which transforms them into [=spaces=]),
	[=segment breaks=] are instead transformed into a preserved line feed (U+000A).

	<wpt pathprefix="/css/CSS2/text/">
	white-space-008.xht
	white-space-processing-016.xht
	white-space-processing-017.xht
	white-space-processing-018.xht
	</wpt>

	When 'white-space-collapse' is ''white-space-collapse/collapse'',
	[=segment breaks=] are [=collapsible=],
	and are collapsed as follows:

	<ol>
		<li>
			First, any collapsible [=segment break=]
			immediately following another collapsible [=segment break=]
			is removed.

			<wpt>
			line-breaking/segment-break-transformation-unremovable-2.html
			line-breaking/segment-break-transformation-unremovable-4.html
			</wpt>

		<li>
			Then any remaining [=segment break=]
			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.

			<wpt>
			line-breaking/segment-break-transformation-unremovable-1.html
			line-breaking/segment-break-transformation-unremovable-2.html
			line-breaking/segment-break-transformation-unremovable-3.html
			line-breaking/segment-break-transformation-unremovable-4.html
			</wpt>

			ISSUE: Should we define this for Level 4?

			<wpt hidden
				title="
					Tests for a proposed set of segment break transformations
					which seem reasonable but have not (yet) been officially adopted">
			white-space/seg-break-transformation-000.tentative.html
			white-space/seg-break-transformation-001.tentative.html
			white-space/seg-break-transformation-002.tentative.html
			white-space/seg-break-transformation-003.tentative.html
			white-space/seg-break-transformation-004.tentative.html
			white-space/seg-break-transformation-005.tentative.html
			white-space/seg-break-transformation-006.tentative.html
			white-space/seg-break-transformation-007.tentative.html
			white-space/seg-break-transformation-008.tentative.html
			white-space/seg-break-transformation-009.tentative.html
			white-space/seg-break-transformation-010.tentative.html
			white-space/seg-break-transformation-011.tentative.html
			white-space/seg-break-transformation-012.tentative.html
			white-space/seg-break-transformation-014.tentative.html
			white-space/seg-break-transformation-015.tentative.html
			white-space/seg-break-transformation-016.tentative.html
			white-space/seg-break-transformation-017.tentative.html
			white-space/seg-break-transformation-018.tentative.html
			white-space/seg-break-transformation-019.tentative.html
			line-breaking/segment-break-transformation-removable-1.html
			line-breaking/segment-break-transformation-removable-2.html
			line-breaking/segment-break-transformation-removable-3.html
			line-breaking/segment-break-transformation-removable-4.html
			line-breaking/segment-break-transformation-rules-001.html
			line-breaking/segment-break-transformation-rules-002.html
			line-breaking/segment-break-transformation-rules-003.html
			line-breaking/segment-break-transformation-rules-004.html
			line-breaking/segment-break-transformation-rules-005.html
			line-breaking/segment-break-transformation-rules-006.html
			line-breaking/segment-break-transformation-rules-007.html
			line-breaking/segment-break-transformation-rules-008.html
			line-breaking/segment-break-transformation-rules-009.html
			line-breaking/segment-break-transformation-rules-010.html
			line-breaking/segment-break-transformation-rules-011.html
			line-breaking/segment-break-transformation-rules-012.html
			line-breaking/segment-break-transformation-rules-013.html
			line-breaking/segment-break-transformation-rules-014.html
			line-breaking/segment-break-transformation-rules-015.html
			line-breaking/segment-break-transformation-rules-016.html
			line-breaking/segment-break-transformation-rules-017.html
			line-breaking/segment-break-transformation-rules-018.html
			line-breaking/segment-break-transformation-rules-019.html
			line-breaking/segment-break-transformation-rules-020.html
			line-breaking/segment-break-transformation-rules-021.html
			line-breaking/segment-break-transformation-rules-022.html
			line-breaking/segment-break-transformation-rules-023.html
			line-breaking/segment-break-transformation-rules-024.html
			line-breaking/segment-break-transformation-rules-025.html
			line-breaking/segment-break-transformation-rules-026.html
			line-breaking/segment-break-transformation-rules-027.html
			line-breaking/segment-break-transformation-rules-028.html
			line-breaking/segment-break-transformation-rules-029.html
			line-breaking/segment-break-transformation-rules-030.html
			line-breaking/segment-break-transformation-rules-031.html
			line-breaking/segment-break-transformation-rules-032.html
			line-breaking/segment-break-transformation-rules-033.html
			line-breaking/segment-break-transformation-rules-034.html
			line-breaking/segment-break-transformation-rules-035.html
			line-breaking/segment-break-transformation-rules-036.html
			line-breaking/segment-break-transformation-rules-037.html
			line-breaking/segment-break-transformation-rules-038.html
			line-breaking/segment-break-transformation-rules-039.html
			line-breaking/segment-break-transformation-rules-040.html
			line-breaking/segment-break-transformation-rules-041.html
			line-breaking/segment-break-transformation-rules-042.html
			line-breaking/segment-break-transformation-rules-043.html
			line-breaking/segment-break-transformation-rules-044.html
			line-breaking/segment-break-transformation-rules-045.html
			line-breaking/segment-break-transformation-rules-046.html
			line-breaking/segment-break-transformation-rules-047.html
			line-breaking/segment-break-transformation-rules-048.html
			line-breaking/segment-break-transformation-rules-049.html
			</wpt>
<!-- CUT SEGMENT BREAK TRANSFORM
			<wpt pathprefix="/css/css-text/line-breaking/">
			segment-break-transformation-removable-2.html
			segment-break-transformation-removable-4.html
			</wpt>
			<wpt>
			white-space/seg-break-transformation-000.html
			</wpt>

			<ul>
			<li>
				If the character immediately before or immediately after the [=segment break=]
				is the zero-width space character (U+200B), then the break
				is removed, leaving behind the zero-width space.

				<wpt>
				white-space/seg-break-transformation-016.html
				white-space/seg-break-transformation-017.html
				white-space/seg-break-transformation-018.html
				white-space/seg-break-transformation-019.html
				</wpt>

				<wpt pathprefix="/css/css-text/line-breaking/">
				segment-break-transformation-removable-1.html
				segment-break-transformation-removable-3.html
				</wpt>

			<li>
				Otherwise,
				if both the characters before and after the [=segment break=]
				belong to the [=space-discarding character set=]
				(see [[#space-discard-set]]),
				then the [=segment break=] is removed.

			<li>
				Otherwise,
				if the [=East Asian Width property=]
				of both the character before and after the [=segment break=]
				is <code>Fullwidth</code>,
				<code>Wide</code>,
				or <code>Halfwidth</code>
				(not <code>Ambiguous</code>),
				and neither side is Hangul,
				then the [=segment break=] is removed.
				[[!UAX11]]

				<wpt>
				white-space/seg-break-transformation-001.html
				white-space/seg-break-transformation-002.html
				white-space/seg-break-transformation-003.html
				white-space/seg-break-transformation-004.html
				white-space/seg-break-transformation-005.html
				white-space/seg-break-transformation-006.html
				white-space/seg-break-transformation-007.html
				white-space/seg-break-transformation-008.html
				white-space/seg-break-transformation-009.html
				white-space/seg-break-transformation-010.html
				white-space/seg-break-transformation-011.html
				white-space/seg-break-transformation-012.html
				white-space/seg-break-transformation-014.html
				white-space/seg-break-transformation-015.html
				</wpt>

				<wpt pathprefix="/css/css-text/line-breaking/">
				segment-break-transformation-rules-001.html
				segment-break-transformation-rules-002.html
				segment-break-transformation-rules-003.html
				segment-break-transformation-rules-004.html
				segment-break-transformation-rules-005.html
				segment-break-transformation-rules-006.html
				segment-break-transformation-rules-007.html
				segment-break-transformation-rules-008.html
				segment-break-transformation-rules-009.html
				segment-break-transformation-rules-010.html
				segment-break-transformation-rules-011.html
				segment-break-transformation-rules-012.html
				segment-break-transformation-rules-013.html
				segment-break-transformation-rules-014.html
				segment-break-transformation-rules-015.html
				segment-break-transformation-rules-016.html
				segment-break-transformation-rules-017.html
				segment-break-transformation-rules-018.html
				segment-break-transformation-rules-019.html
				segment-break-transformation-rules-020.html
				segment-break-transformation-rules-021.html
				segment-break-transformation-rules-022.html
				segment-break-transformation-rules-023.html
				segment-break-transformation-rules-024.html
				segment-break-transformation-rules-025.html
				segment-break-transformation-rules-026.html
				segment-break-transformation-rules-027.html
				segment-break-transformation-rules-028.html
				segment-break-transformation-rules-029.html
				segment-break-transformation-rules-030.html
				segment-break-transformation-rules-031.html
				segment-break-transformation-rules-032.html
				segment-break-transformation-rules-033.html
				segment-break-transformation-rules-034.html
				segment-break-transformation-rules-035.html
				segment-break-transformation-rules-036.html
				segment-break-transformation-rules-037.html
				segment-break-transformation-rules-038.html
				segment-break-transformation-rules-039.html
				segment-break-transformation-rules-040.html
				segment-break-transformation-rules-041.html
				segment-break-transformation-rules-042.html
				segment-break-transformation-rules-043.html
				segment-break-transformation-rules-044.html
				segment-break-transformation-rules-045.html
				segment-break-transformation-rules-046.html
				segment-break-transformation-rules-047.html
				segment-break-transformation-rules-048.html
				segment-break-transformation-rules-049.html
				</wpt>

			<li>
				Otherwise,
				if the <a>writing system</a> of the <a>segment break</a> is
				<a for=writing-system>Chinese</a>,
				<a for=writing-system>Japanese</a>,
				or Yi,
				and the character before or after the [=segment break=]
				is punctuation or a symbol (Unicode [=general category=] P* or S*)
				and has an [=East Asian Width property=] of <code>Ambiguous</code>,
				and the character on the other side of the [=segment break=] is
				<code>Fullwidth</code>,
				<code>Wide</code>,
				or <code>Halfwidth</code>,
				and not Hangul,
				then the [=segment break=] is removed.

				<wpt>
				writing-system/writing-system-segment-break-001.html
				</wpt>

			<li>
				Otherwise, the [=segment break=] is converted to a space (U+0020).

				<wpt>
				white-space/seg-break-transformation-000.html
				</wpt>

				<wpt pathprefix="/css/CSS2/text/">
				white-space-processing-005.xht
				white-space-processing-014.xht
				white-space-processing-015.xht
				</wpt>

		</ul>

		For this purpose,
		Emoji (Unicode property <code>Emoji</code>)
		with an [=East Asian Width property=] of
		<code>Wide</code> or <code>Neutral</code>
		are treated as having an [=East Asian Width property=] of
		<code>Ambiguous</code>.


		ISSUE(5086): Should space-discarding punctuation have a stronger influence over mismatched before/after contexts?

		ISSUE(5017): Should we classify punctuation and/or symbols as a category of space-ambiguous characters? (Currently spaces are discarded only if both sides are space-discarding; ambiguous characters would defer to the other side.)

CUT SEGMENT BREAK TRANSFORM -->

		Note: The white space processing rules have already
		removed any [=tabs=] and [=spaces=] around the [=segment break=]
		before this context is evaluated.
	</ol>

	<div class="example">
		The purpose of the segment break transformation rules
		(and white space collapsing in general)
		is to “unbreak” text that has been
		[[#white-space-processing|broken into segments]]
		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 [=space=].

		<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>

			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.

			<figcaption>
				Eliminating a line break in English
				requires maintaining a [=space=] in its place.
			</figcaption>
		</figure>

		In languages that have no word separators, such as Chinese,
		“unbreaking” a line requires joining the two lines with no intervening space.

		<figure>
			<pre lang="zh-Hant">
				這個段落是那麼長，
				在一行寫不行。最好
				用三行寫。
			</pre>

			<p lang="zh-Hant">這個段落是那麼長，在一行寫不行。最好用三行寫。

			<figcaption>
				Eliminating a line break in Chinese
				requires eliminating any intervening [=white space=].
			</figcaption>
		</figure>

		The segment break transformation rules can use adjacent context
		to either transform the segment break into a space
		or eliminate it entirely.
	</div>

	Note: Historically, HTML and CSS have unconditionally converted [=segment breaks=] 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 [=segment breaks=]
	even as they strive to improve support for such languages.

<h3 id="tab-size-property" caniuse="css3-tabsize" oldids="tab-size">
Tab Character Size: the 'tab-size' property</h3>

	<wpt title="
		This section has good test coverage.

		Missing test:
		* Applies to text"></wpt>

	<pre class="propdef">
	Name: tab-size
	Value: <<number [0,∞]>> | <<length [0,∞]>>
	Initial: 8
	Applies to: text
	Inherited: yes
	Computed value: the specified number or absolute length
	Animation type: by computed value type
	Canonical order: n/a
	</pre>

	<wpt>
	tab-size/tab-size-integer-001.html
	tab-size/tab-size.html
	tab-size/tab-size-inheritance-001.html
	inheritance.html
	parsing/tab-size-valid.html
	parsing/tab-size-invalid.html
	parsing/tab-size-computed.html
	tab-size/tab-size-computed-value-001.html
	tab-size/tab-size-inline-001.html
	animations/tab-size-interpolation.html
	</wpt>

	This property determines the <dfn id=tab-size-dfn>tab size</dfn>
	used to render [=preserved=] tab characters (U+0009).
	A <<number>> represents the measure
	as a multiple of the advance width of the space character (U+0020)
	of the nearest [=block container=] ancestor of the [=preserved=] [=tab=],
	including its associated 'letter-spacing' and 'word-spacing'.
	Negative values are not allowed.

	<wpt>
	tab-size/tab-size-integer-001.html
	tab-size/tab-size-integer-002.html
	tab-size/tab-size-integer-003.html
	tab-size/tab-size-integer-004.html
	tab-size/tab-size-integer-005.html
	tab-size/tab-size-length-001.html
	tab-size/tab-size-length-002.html
	tab-size/tab-size-percent-001.html
	tab-size/tab-min-rendered-width-1.html
	tab-size/tab-size-spacing-001.html
	tab-size/tab-size-spacing-002.html
	tab-size/tab-size-spacing-003.html
	white-space/tab-stop-threshold-001.html
	white-space/tab-stop-threshold-002.html
	white-space/tab-stop-threshold-003.html
	white-space/tab-stop-threshold-004.html
	white-space/tab-stop-threshold-005.html
	white-space/tab-stop-threshold-006.html
	text-indent/text-indent-tab-positions-001.html
	tab-size/tab-size-block-ancestor.html
	</wpt>

	<wpt pathprefix="/css/CSS2/text/">
	white-space-processing-042.xht
	</wpt>

<h2 id="text-wrapping" oldids="text-wrap">
Text Wrapping</h2>

	<wpt title="
		Tests mostly not needed for this section:
		these are definitions,
		they get tested through their application,
		not by themselves."></wpt>

	When inline-level content is laid out into lines, it is broken across line boxes.
	Such a break is called a <dfn export>line break</dfn>.
	When a line is broken due to explicit line-breaking controls
	(such as a <a>preserved</a> newline character),
	or due to the start or end of a block,
	it is a <dfn export>forced line break</dfn>.
	When a line is broken due to content <dfn lt="wrapping|wrap">wrapping</dfn>
	(i.e. when the UA creates unforced line breaks
	in order to fit the content within the measure),
	it is a <dfn>soft wrap break</dfn>.
	The process of breaking inline-level content into lines is called <dfn export lt="line breaking process | line breaking">line breaking</dfn>.

	Wrapping is only performed at an allowed break point,
	called a <dfn export>soft wrap opportunity</dfn>.
	When wrapping is enabled (see 'white-space'),
	the UA must minimize the amount of content overflowing a line
	by wrapping the line at a [=soft wrap opportunity=],
	if one exists.
	Valid [=soft wrap opportunities=] depend
	on the [=content language=] and writing system,
	as well as on CSS properties that control them,
	see [[#line-breaking]].

	<wpt>
	line-breaking/line-breaking-020.html
	</wpt>

	Where text is allowed to wrap is controlled
	by the [[#line-breaking|line-breaking rules and controls]];
	<em>whether</em> it is allowed to wrap
	and how multiple [=soft wrap opportunities=] within a line are prioritized
	is controlled
	by the 'text-wrap-mode',
	'text-wrap-style',
	'wrap-before',
	'wrap-after',
	and
	'wrap-inside' properties.

<h3 id="text-wrap-mode">
Deciding Whether to Wrap: the 'text-wrap-mode' property</h3>

	<wpt title="
		This property is tested extensively through its shorthands,
		but not much directly beyond parsing.

		Missing test:
		* preserved segment breaks are forced line breaks (probably tested already, but need to find those tests)
		* CR and LF  line breaking class are forced line breaks
		* Direct tests of this property as a longhand"></wpt>

	<pre class="propdef">
	Name: text-wrap-mode
	Value: wrap | nowrap
	Initial: wrap
	Applies to: text
	Inherited: yes
	Percentages: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
		parsing/text-wrap-mode-computed.html
		parsing/text-wrap-mode-invalid.html
		parsing/text-wrap-mode-valid.html
	</wpt>

	This property specifies whether [=inline-level=] content
	[=wraps=] at unforced [=soft wrap opportunities=].

	Note: This property is a [=longhand=]
	of both 'white-space' and 'text-wrap'.

	Possible values:

	<dl dfn-for=text-wrap-mode dfn-type=value>
		<dt><dfn>wrap</dfn>
		<dd>
			Lines may [=wrap=] at allowed [=soft wrap opportunities=],
			as determined by the line-breaking rules in effect,
			in order to minimize [=inline-axis=] overflow.

			<wpt title="tests using wrap directly through 'text-wrap-mode':">
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: normal':" pathprefix="/css/CSS2/text/">
				white-space-normal-001.xht
				white-space-normal-002.xht
				white-space-normal-003.xht
				white-space-normal-004.xht
				white-space-normal-005.xht
				white-space-normal-006.xht
				white-space-normal-007.xht
				white-space-normal-008.xht
				white-space-normal-009.xht
				white-space-p-element-001.xht
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: pre-line':" pathprefix="/css/CSS2/text/">
				white-space-005.xht
				white-space-processing-017.xht
				white-space-processing-053.xht
			</wpt>
			<wpt title="tests using wrap through 'text-wrap: wrap':">
			</wpt>
			<wpt title="tests using wrap implicitly through 'text-wrap':">
				parsing/white-space-shorthand-text-wrap.html
				white-space/text-wrap-balance-001.html
				white-space/text-wrap-balance-002.html
				white-space/text-wrap-balance-003.html
				white-space/text-wrap-balance-align-001.html
				white-space/text-wrap-balance-dynamic-001.html
				white-space/text-wrap-balance-line-clamp-001.html
				white-space/text-wrap-balance-narrow-crash.html
				white-space/text-wrap-balance-text-indent-001.html
				white-space/text-wrap-balance-overflow-001.html
			</wpt>
			<wpt title="tests using wrap through 'white-space: normal':">
				hyphens/hyphens-auto-003.html
				i18n/css3-text-line-break-baspglwj-001.html
				i18n/css3-text-line-break-baspglwj-002.html
				i18n/css3-text-line-break-baspglwj-003.html
				i18n/css3-text-line-break-baspglwj-004.html
				i18n/css3-text-line-break-baspglwj-005.html
				i18n/css3-text-line-break-baspglwj-006.html
				i18n/css3-text-line-break-baspglwj-007.html
				i18n/css3-text-line-break-baspglwj-008.html
				i18n/css3-text-line-break-baspglwj-009.html
				i18n/css3-text-line-break-baspglwj-010.html
				i18n/css3-text-line-break-baspglwj-011.html
				i18n/css3-text-line-break-baspglwj-012.html
				i18n/css3-text-line-break-baspglwj-014.html
				i18n/css3-text-line-break-baspglwj-015.html
				i18n/css3-text-line-break-baspglwj-016.html
				i18n/css3-text-line-break-baspglwj-017.html
				i18n/css3-text-line-break-baspglwj-018.html
				i18n/css3-text-line-break-baspglwj-019.html
				i18n/css3-text-line-break-baspglwj-020.html
				i18n/css3-text-line-break-baspglwj-021.html
				i18n/css3-text-line-break-baspglwj-022.html
				i18n/css3-text-line-break-baspglwj-023.html
				i18n/css3-text-line-break-baspglwj-024.html
				i18n/css3-text-line-break-baspglwj-025.html
				i18n/css3-text-line-break-baspglwj-026.html
				i18n/css3-text-line-break-baspglwj-030.html
				i18n/css3-text-line-break-baspglwj-031.html
				i18n/css3-text-line-break-baspglwj-032.html
				i18n/css3-text-line-break-baspglwj-033.html
				i18n/css3-text-line-break-baspglwj-034.html
				i18n/css3-text-line-break-baspglwj-035.html
				i18n/css3-text-line-break-baspglwj-036.html
				i18n/css3-text-line-break-baspglwj-037.html
				i18n/css3-text-line-break-baspglwj-038.html
				i18n/css3-text-line-break-baspglwj-039.html
				i18n/css3-text-line-break-baspglwj-040.html
				i18n/css3-text-line-break-baspglwj-041.html
				i18n/css3-text-line-break-baspglwj-042.html
				i18n/css3-text-line-break-baspglwj-043.html
				i18n/css3-text-line-break-baspglwj-044.html
				i18n/css3-text-line-break-baspglwj-045.html
				i18n/css3-text-line-break-baspglwj-046.html
				i18n/css3-text-line-break-baspglwj-047.html
				i18n/css3-text-line-break-baspglwj-048.html
				i18n/css3-text-line-break-baspglwj-049.html
				i18n/css3-text-line-break-baspglwj-050.html
				i18n/css3-text-line-break-baspglwj-051.html
				i18n/css3-text-line-break-baspglwj-052.html
				i18n/css3-text-line-break-baspglwj-060.html
				i18n/css3-text-line-break-baspglwj-061.html
				i18n/css3-text-line-break-baspglwj-062.html
				i18n/css3-text-line-break-baspglwj-063.html
				i18n/css3-text-line-break-baspglwj-064.html
				i18n/css3-text-line-break-baspglwj-065.html
				i18n/css3-text-line-break-baspglwj-066.html
				i18n/css3-text-line-break-baspglwj-067.html
				i18n/css3-text-line-break-baspglwj-068.html
				i18n/css3-text-line-break-baspglwj-069.html
				i18n/css3-text-line-break-baspglwj-070.html
				i18n/css3-text-line-break-baspglwj-071.html
				i18n/css3-text-line-break-baspglwj-072.html
				i18n/css3-text-line-break-baspglwj-073.html
				i18n/css3-text-line-break-baspglwj-074.html
				i18n/css3-text-line-break-baspglwj-075.html
				i18n/css3-text-line-break-baspglwj-076.html
				i18n/css3-text-line-break-baspglwj-077.html
				i18n/css3-text-line-break-baspglwj-078.html
				i18n/css3-text-line-break-baspglwj-080.html
				i18n/css3-text-line-break-baspglwj-081.html
				i18n/css3-text-line-break-baspglwj-082.html
				i18n/css3-text-line-break-baspglwj-083.html
				i18n/css3-text-line-break-baspglwj-084.html
				i18n/css3-text-line-break-baspglwj-085.html
				i18n/css3-text-line-break-baspglwj-086.html
				i18n/css3-text-line-break-baspglwj-090.html
				i18n/css3-text-line-break-baspglwj-091.html
				i18n/css3-text-line-break-baspglwj-092.html
				i18n/css3-text-line-break-baspglwj-093.html
				i18n/css3-text-line-break-baspglwj-095.html
				i18n/css3-text-line-break-baspglwj-096.html
				i18n/css3-text-line-break-baspglwj-097.html
				i18n/css3-text-line-break-baspglwj-098.html
				i18n/css3-text-line-break-baspglwj-099.html
				i18n/css3-text-line-break-baspglwj-100.html
				i18n/css3-text-line-break-baspglwj-101.html
				i18n/css3-text-line-break-baspglwj-102.html
				i18n/css3-text-line-break-baspglwj-103.html
				i18n/css3-text-line-break-baspglwj-104.html
				i18n/css3-text-line-break-baspglwj-105.html
				i18n/css3-text-line-break-baspglwj-106.html
				i18n/css3-text-line-break-baspglwj-107.html
				i18n/css3-text-line-break-baspglwj-108.html
				i18n/css3-text-line-break-baspglwj-109.html
				i18n/css3-text-line-break-baspglwj-110.html
				i18n/css3-text-line-break-baspglwj-111.html
				i18n/css3-text-line-break-baspglwj-112.html
				i18n/css3-text-line-break-baspglwj-113.html
				i18n/css3-text-line-break-baspglwj-114.html
				i18n/css3-text-line-break-baspglwj-115.html
				i18n/css3-text-line-break-baspglwj-116.html
				i18n/css3-text-line-break-baspglwj-117.html
				i18n/css3-text-line-break-baspglwj-118.html
				i18n/css3-text-line-break-baspglwj-120.html
				i18n/css3-text-line-break-baspglwj-121.html
				i18n/css3-text-line-break-baspglwj-122.html
				i18n/css3-text-line-break-baspglwj-123.html
				i18n/css3-text-line-break-baspglwj-124.html
				i18n/css3-text-line-break-baspglwj-125.html
				i18n/css3-text-line-break-baspglwj-126.html
				i18n/css3-text-line-break-baspglwj-127.html
				i18n/css3-text-line-break-baspglwj-128.html
				i18n/css3-text-line-break-baspglwj-130.html
				i18n/css3-text-line-break-baspglwj-131.html
				line-break/line-break-anywhere-and-white-space-004.html
				line-break/line-break-anywhere-and-white-space-005.html
				line-breaking/line-breaking-001.html
				line-breaking/line-breaking-002.html
				line-breaking/line-breaking-003.html
				line-breaking/line-breaking-004.html
				line-breaking/line-breaking-005.html
				line-breaking/line-breaking-006.html
				line-breaking/line-breaking-007.html
				line-breaking/line-breaking-008.html
				line-breaking/line-breaking-009.html
				line-breaking/line-breaking-010.html
				line-breaking/line-breaking-011.html
				line-breaking/line-breaking-ic-001.html
				line-breaking/line-breaking-ic-002.html
				line-breaking/line-breaking-ic-003.html
				overflow-wrap/overflow-wrap-anywhere-011.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash.html
				parsing/white-space-shorthand-text-wrap.html
				white-space/trailing-ideographic-space-005.html
				white-space/trailing-ideographic-space-006.html
				white-space/trailing-space-and-text-alignment-001.html
				white-space/trailing-space-and-text-alignment-rtl-001.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-normal-011.html
				white-space/white-space-nowrap-011.html
				white-space/white-space-pre-011.html
				white-space/white-space-pre-031.html
				white-space/white-space-pre-032.html
				white-space/white-space-pre-034.html
				white-space/white-space-pre-035.html
				white-space/white-space-pre-wrap-justify-001.html
				white-space/white-space-pre-wrap-justify-002.html
				white-space/white-space-pre-wrap-justify-003.html
				white-space/white-space-pre-wrap-justify-004.html
				white-space/white-space-pre-wrap-trailing-spaces-021.html
				white-space/white-space-wrap-after-nowrap-001.html
				white-space/ws-break-spaces-applies-to-012.html
				white-space/ws-break-spaces-applies-to-013.html
				word-break/break-boundary-2-chars-001.html
				word-break/word-break-break-all-062.html
				word-break/word-break-keep-all-063.html
			</wpt>
			<wpt title="tests using wrap through 'white-space: pre-wrap':">
				crashtests/trailing-space-with-cr-crash.html
				crashtests/white-space-pre-wrap-chash.html
				hyphens/hyphens-auto-002.html
				i18n/css3-text-line-break-baspglwj-001.html
				i18n/css3-text-line-break-baspglwj-002.html
				i18n/css3-text-line-break-baspglwj-003.html
				i18n/css3-text-line-break-baspglwj-004.html
				i18n/css3-text-line-break-baspglwj-005.html
				i18n/css3-text-line-break-baspglwj-006.html
				i18n/css3-text-line-break-baspglwj-007.html
				i18n/css3-text-line-break-baspglwj-008.html
				i18n/css3-text-line-break-baspglwj-009.html
				i18n/css3-text-line-break-baspglwj-010.html
				i18n/css3-text-line-break-baspglwj-011.html
				i18n/css3-text-line-break-baspglwj-012.html
				i18n/css3-text-line-break-baspglwj-014.html
				i18n/css3-text-line-break-baspglwj-015.html
				i18n/css3-text-line-break-baspglwj-016.html
				i18n/css3-text-line-break-baspglwj-017.html
				i18n/css3-text-line-break-baspglwj-018.html
				i18n/css3-text-line-break-baspglwj-019.html
				i18n/css3-text-line-break-baspglwj-020.html
				i18n/css3-text-line-break-baspglwj-021.html
				i18n/css3-text-line-break-baspglwj-022.html
				i18n/css3-text-line-break-baspglwj-023.html
				i18n/css3-text-line-break-baspglwj-024.html
				i18n/css3-text-line-break-baspglwj-025.html
				i18n/css3-text-line-break-baspglwj-026.html
				i18n/css3-text-line-break-baspglwj-030.html
				i18n/css3-text-line-break-baspglwj-031.html
				i18n/css3-text-line-break-baspglwj-032.html
				i18n/css3-text-line-break-baspglwj-033.html
				i18n/css3-text-line-break-baspglwj-034.html
				i18n/css3-text-line-break-baspglwj-035.html
				i18n/css3-text-line-break-baspglwj-036.html
				i18n/css3-text-line-break-baspglwj-037.html
				i18n/css3-text-line-break-baspglwj-038.html
				i18n/css3-text-line-break-baspglwj-039.html
				i18n/css3-text-line-break-baspglwj-040.html
				i18n/css3-text-line-break-baspglwj-041.html
				i18n/css3-text-line-break-baspglwj-042.html
				i18n/css3-text-line-break-baspglwj-043.html
				i18n/css3-text-line-break-baspglwj-044.html
				i18n/css3-text-line-break-baspglwj-045.html
				i18n/css3-text-line-break-baspglwj-046.html
				i18n/css3-text-line-break-baspglwj-047.html
				i18n/css3-text-line-break-baspglwj-048.html
				i18n/css3-text-line-break-baspglwj-049.html
				i18n/css3-text-line-break-baspglwj-050.html
				i18n/css3-text-line-break-baspglwj-051.html
				i18n/css3-text-line-break-baspglwj-052.html
				i18n/css3-text-line-break-baspglwj-060.html
				i18n/css3-text-line-break-baspglwj-061.html
				i18n/css3-text-line-break-baspglwj-062.html
				i18n/css3-text-line-break-baspglwj-063.html
				i18n/css3-text-line-break-baspglwj-064.html
				i18n/css3-text-line-break-baspglwj-065.html
				i18n/css3-text-line-break-baspglwj-066.html
				i18n/css3-text-line-break-baspglwj-067.html
				i18n/css3-text-line-break-baspglwj-068.html
				i18n/css3-text-line-break-baspglwj-069.html
				i18n/css3-text-line-break-baspglwj-070.html
				i18n/css3-text-line-break-baspglwj-071.html
				i18n/css3-text-line-break-baspglwj-072.html
				i18n/css3-text-line-break-baspglwj-073.html
				i18n/css3-text-line-break-baspglwj-074.html
				i18n/css3-text-line-break-baspglwj-075.html
				i18n/css3-text-line-break-baspglwj-076.html
				i18n/css3-text-line-break-baspglwj-077.html
				i18n/css3-text-line-break-baspglwj-078.html
				i18n/css3-text-line-break-baspglwj-080.html
				i18n/css3-text-line-break-baspglwj-081.html
				i18n/css3-text-line-break-baspglwj-082.html
				i18n/css3-text-line-break-baspglwj-083.html
				i18n/css3-text-line-break-baspglwj-084.html
				i18n/css3-text-line-break-baspglwj-085.html
				i18n/css3-text-line-break-baspglwj-086.html
				i18n/css3-text-line-break-baspglwj-090.html
				i18n/css3-text-line-break-baspglwj-091.html
				i18n/css3-text-line-break-baspglwj-092.html
				i18n/css3-text-line-break-baspglwj-093.html
				i18n/css3-text-line-break-baspglwj-095.html
				i18n/css3-text-line-break-baspglwj-096.html
				i18n/css3-text-line-break-baspglwj-097.html
				i18n/css3-text-line-break-baspglwj-098.html
				i18n/css3-text-line-break-baspglwj-099.html
				i18n/css3-text-line-break-baspglwj-100.html
				i18n/css3-text-line-break-baspglwj-101.html
				i18n/css3-text-line-break-baspglwj-102.html
				i18n/css3-text-line-break-baspglwj-103.html
				i18n/css3-text-line-break-baspglwj-104.html
				i18n/css3-text-line-break-baspglwj-105.html
				i18n/css3-text-line-break-baspglwj-106.html
				i18n/css3-text-line-break-baspglwj-107.html
				i18n/css3-text-line-break-baspglwj-108.html
				i18n/css3-text-line-break-baspglwj-109.html
				i18n/css3-text-line-break-baspglwj-110.html
				i18n/css3-text-line-break-baspglwj-111.html
				i18n/css3-text-line-break-baspglwj-112.html
				i18n/css3-text-line-break-baspglwj-113.html
				i18n/css3-text-line-break-baspglwj-114.html
				i18n/css3-text-line-break-baspglwj-115.html
				i18n/css3-text-line-break-baspglwj-116.html
				i18n/css3-text-line-break-baspglwj-117.html
				i18n/css3-text-line-break-baspglwj-118.html
				i18n/css3-text-line-break-baspglwj-120.html
				i18n/css3-text-line-break-baspglwj-121.html
				i18n/css3-text-line-break-baspglwj-122.html
				i18n/css3-text-line-break-baspglwj-123.html
				i18n/css3-text-line-break-baspglwj-124.html
				i18n/css3-text-line-break-baspglwj-125.html
				i18n/css3-text-line-break-baspglwj-126.html
				i18n/css3-text-line-break-baspglwj-127.html
				i18n/css3-text-line-break-baspglwj-128.html
				i18n/css3-text-line-break-baspglwj-130.html
				i18n/css3-text-line-break-baspglwj-131.html
				letter-spacing/letter-spacing-200.html
				letter-spacing/letter-spacing-201.html
				letter-spacing/letter-spacing-203.html
				letter-spacing/letter-spacing-204.html
				letter-spacing/letter-spacing-205.html
				letter-spacing/letter-spacing-211.html
				letter-spacing/letter-spacing-212.html
				line-break/line-break-anywhere-008.html
				line-break/line-break-anywhere-010.html
				line-break/line-break-anywhere-and-white-space-006.html
				line-break/line-break-anywhere-and-white-space-007.html
				overflow-wrap/overflow-wrap-anywhere-004.html
				overflow-wrap/overflow-wrap-anywhere-005.html
				overflow-wrap/overflow-wrap-break-word-004.html
				overflow-wrap/overflow-wrap-break-word-005.html
				overflow-wrap/overflow-wrap-break-word-007.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash-002.html
				overflow-wrap/overflow-wrap-min-content-size-009.html
				text-justify/text-justify-and-trailing-spaces-001.html
				text-justify/text-justify-and-trailing-spaces-002.html
				text-justify/text-justify-and-trailing-spaces-003.html
				text-justify/text-justify-and-trailing-spaces-004.html
				text-justify/text-justify-and-trailing-spaces-005.html
				text-justify/text-justify-and-trailing-spaces-006.html
				text-transform/text-transform-fullwidth-007.html
				text-transform/text-transform-fullwidth-009.html
				white-space/break-spaces-newline-011.html
				white-space/break-spaces-newline-012.html
				white-space/break-spaces-newline-013.html
				white-space/break-spaces-newline-014.html
				white-space/break-spaces-newline-015.html
				white-space/break-spaces-newline-016.html
				white-space/control-chars-00D.html
				white-space/eol-spaces-bidi-002.html
				white-space/eol-spaces-bidi-003.html
				white-space/pre-wrap-001.html
				white-space/pre-wrap-002.html
				white-space/pre-wrap-003.html
				white-space/pre-wrap-004.html
				white-space/pre-wrap-005.html
				white-space/pre-wrap-006.html
				white-space/pre-wrap-007.html
				white-space/pre-wrap-008.html
				white-space/pre-wrap-009.html
				white-space/pre-wrap-010.html
				white-space/pre-wrap-011.html
				white-space/pre-wrap-012.html
				white-space/pre-wrap-013.html
				white-space/pre-wrap-014.html
				white-space/pre-wrap-015.html
				white-space/pre-wrap-016.html
				white-space/pre-wrap-017.html
				white-space/pre-wrap-018.html
				white-space/pre-wrap-019.html
				white-space/pre-wrap-020.html
				white-space/pre-wrap-051.html
				white-space/pre-wrap-052.html
				white-space/pre-wrap-align-center-001.html
				white-space/pre-wrap-align-center-002.html
				white-space/pre-wrap-align-center-003.html
				white-space/pre-wrap-align-end-001.html
				white-space/pre-wrap-align-end-002.html
				white-space/pre-wrap-align-end-003.html
				white-space/pre-wrap-align-left-001.html
				white-space/pre-wrap-align-left-002.html
				white-space/pre-wrap-align-left-003.html
				white-space/pre-wrap-align-right-001.html
				white-space/pre-wrap-align-right-002.html
				white-space/pre-wrap-align-right-003.html
				white-space/pre-wrap-align-start-001.html
				white-space/pre-wrap-align-start-002.html
				white-space/pre-wrap-align-start-003.html
				white-space/pre-wrap-float-001.html
				white-space/pre-wrap-leading-spaces-001.html
				white-space/pre-wrap-leading-spaces-002.html
				white-space/pre-wrap-leading-spaces-003.html
				white-space/pre-wrap-leading-spaces-004.html
				white-space/pre-wrap-leading-spaces-005.html
				white-space/pre-wrap-leading-spaces-006.html
				white-space/pre-wrap-leading-spaces-007.html
				white-space/pre-wrap-leading-spaces-008.html
				white-space/pre-wrap-leading-spaces-009.html
				white-space/pre-wrap-leading-spaces-010.html
				white-space/pre-wrap-leading-spaces-011.html
				white-space/pre-wrap-leading-spaces-012.html
				white-space/pre-wrap-leading-spaces-013.html
				white-space/pre-wrap-leading-spaces-014.html
				white-space/pre-wrap-leading-spaces-015.html
				white-space/pre-wrap-leading-spaces-016.html
				white-space/pre-wrap-leading-spaces-017.html
				white-space/pre-wrap-tab-001.html
				white-space/pre-wrap-tab-002.html
				white-space/pre-wrap-tab-003.html
				white-space/pre-wrap-tab-004.html
				white-space/pre-wrap-tab-005.html
				white-space/pre-wrap-tab-006.html
				white-space/tab-stop-threshold-003.html
				white-space/tab-stop-threshold-004.html
				white-space/textarea-pre-wrap-001.html
				white-space/textarea-pre-wrap-002.html
				white-space/textarea-pre-wrap-003.html
				white-space/textarea-pre-wrap-004.html
				white-space/textarea-pre-wrap-005.html
				white-space/textarea-pre-wrap-006.html
				white-space/textarea-pre-wrap-007.html
				white-space/textarea-pre-wrap-011.html
				white-space/textarea-pre-wrap-012.html
				white-space/textarea-pre-wrap-013.html
				white-space/textarea-pre-wrap-014.html
				white-space/trailing-ideographic-space-003.html
				white-space/trailing-ideographic-space-004.html
				white-space/trailing-other-space-separators-002.html
				white-space/trailing-space-align-start.tentative.html
				white-space/trailing-space-and-text-alignment-003.html
				white-space/trailing-space-and-text-alignment-rtl-003.html
				white-space/trailing-space-in-inline-box.html
				white-space/trailing-space-position-001.html
				white-space/trailing-space-rtl-001.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-intrinsic-size-003.html
				white-space/white-space-intrinsic-size-004.html
				white-space/white-space-intrinsic-size-005.html
				white-space/white-space-intrinsic-size-006.html
				white-space/white-space-intrinsic-size-013.html
				white-space/white-space-intrinsic-size-014.html
				white-space/white-space-intrinsic-size-017.html
				white-space/white-space-letter-spacing-001.html
				white-space/white-space-pre-032.html
				white-space/white-space-pre-wrap-justify-001.html
				white-space/white-space-pre-wrap-justify-002.html
				white-space/white-space-pre-wrap-justify-003.html
				white-space/white-space-pre-wrap-justify-004.html
				white-space/white-space-pre-wrap-trailing-spaces-001.html
				white-space/white-space-pre-wrap-trailing-spaces-002.html
				white-space/white-space-pre-wrap-trailing-spaces-003.html
				white-space/white-space-pre-wrap-trailing-spaces-004.html
				white-space/white-space-pre-wrap-trailing-spaces-005.html
				white-space/white-space-pre-wrap-trailing-spaces-006.html
				white-space/white-space-pre-wrap-trailing-spaces-007.html
				white-space/white-space-pre-wrap-trailing-spaces-008.html
				white-space/white-space-pre-wrap-trailing-spaces-010.html
				white-space/white-space-pre-wrap-trailing-spaces-011.html
				white-space/white-space-pre-wrap-trailing-spaces-012.html
				white-space/white-space-pre-wrap-trailing-spaces-013.html
				white-space/white-space-pre-wrap-trailing-spaces-014.html
				white-space/white-space-pre-wrap-trailing-spaces-015.html
				white-space/white-space-pre-wrap-trailing-spaces-021.html
				white-space/white-space-pre-wrap-trailing-spaces-022.html
				white-space/white-space-pre-wrap-trailing-spaces-023.html
				word-break/break-boundary-2-chars-001.html
				word-break/word-break-break-all-010.html
				word-break/word-break-break-all-011.html
				word-break/word-break-break-all-015.html
				word-break/word-break-break-all-019.html
				word-break/word-break-break-all-021.html
				word-break/word-break-break-all-062.html
				word-break/word-break-keep-all-007.html
				word-break/word-break-keep-all-063.html
				word-break/word-break-min-content-007.html
			</wpt>
			<wpt title="tests using wrap through 'white-space: pre-line':">
				i18n/css3-text-line-break-baspglwj-001.html
				i18n/css3-text-line-break-baspglwj-002.html
				i18n/css3-text-line-break-baspglwj-003.html
				i18n/css3-text-line-break-baspglwj-004.html
				i18n/css3-text-line-break-baspglwj-005.html
				i18n/css3-text-line-break-baspglwj-006.html
				i18n/css3-text-line-break-baspglwj-007.html
				i18n/css3-text-line-break-baspglwj-008.html
				i18n/css3-text-line-break-baspglwj-009.html
				i18n/css3-text-line-break-baspglwj-010.html
				i18n/css3-text-line-break-baspglwj-011.html
				i18n/css3-text-line-break-baspglwj-012.html
				i18n/css3-text-line-break-baspglwj-014.html
				i18n/css3-text-line-break-baspglwj-015.html
				i18n/css3-text-line-break-baspglwj-016.html
				i18n/css3-text-line-break-baspglwj-017.html
				i18n/css3-text-line-break-baspglwj-018.html
				i18n/css3-text-line-break-baspglwj-019.html
				i18n/css3-text-line-break-baspglwj-020.html
				i18n/css3-text-line-break-baspglwj-021.html
				i18n/css3-text-line-break-baspglwj-022.html
				i18n/css3-text-line-break-baspglwj-023.html
				i18n/css3-text-line-break-baspglwj-024.html
				i18n/css3-text-line-break-baspglwj-025.html
				i18n/css3-text-line-break-baspglwj-026.html
				i18n/css3-text-line-break-baspglwj-030.html
				i18n/css3-text-line-break-baspglwj-031.html
				i18n/css3-text-line-break-baspglwj-032.html
				i18n/css3-text-line-break-baspglwj-033.html
				i18n/css3-text-line-break-baspglwj-034.html
				i18n/css3-text-line-break-baspglwj-035.html
				i18n/css3-text-line-break-baspglwj-036.html
				i18n/css3-text-line-break-baspglwj-037.html
				i18n/css3-text-line-break-baspglwj-038.html
				i18n/css3-text-line-break-baspglwj-039.html
				i18n/css3-text-line-break-baspglwj-040.html
				i18n/css3-text-line-break-baspglwj-041.html
				i18n/css3-text-line-break-baspglwj-042.html
				i18n/css3-text-line-break-baspglwj-043.html
				i18n/css3-text-line-break-baspglwj-044.html
				i18n/css3-text-line-break-baspglwj-045.html
				i18n/css3-text-line-break-baspglwj-046.html
				i18n/css3-text-line-break-baspglwj-047.html
				i18n/css3-text-line-break-baspglwj-048.html
				i18n/css3-text-line-break-baspglwj-049.html
				i18n/css3-text-line-break-baspglwj-050.html
				i18n/css3-text-line-break-baspglwj-051.html
				i18n/css3-text-line-break-baspglwj-052.html
				i18n/css3-text-line-break-baspglwj-060.html
				i18n/css3-text-line-break-baspglwj-061.html
				i18n/css3-text-line-break-baspglwj-062.html
				i18n/css3-text-line-break-baspglwj-063.html
				i18n/css3-text-line-break-baspglwj-064.html
				i18n/css3-text-line-break-baspglwj-065.html
				i18n/css3-text-line-break-baspglwj-066.html
				i18n/css3-text-line-break-baspglwj-067.html
				i18n/css3-text-line-break-baspglwj-068.html
				i18n/css3-text-line-break-baspglwj-069.html
				i18n/css3-text-line-break-baspglwj-070.html
				i18n/css3-text-line-break-baspglwj-071.html
				i18n/css3-text-line-break-baspglwj-072.html
				i18n/css3-text-line-break-baspglwj-073.html
				i18n/css3-text-line-break-baspglwj-074.html
				i18n/css3-text-line-break-baspglwj-075.html
				i18n/css3-text-line-break-baspglwj-076.html
				i18n/css3-text-line-break-baspglwj-077.html
				i18n/css3-text-line-break-baspglwj-078.html
				i18n/css3-text-line-break-baspglwj-080.html
				i18n/css3-text-line-break-baspglwj-081.html
				i18n/css3-text-line-break-baspglwj-082.html
				i18n/css3-text-line-break-baspglwj-083.html
				i18n/css3-text-line-break-baspglwj-084.html
				i18n/css3-text-line-break-baspglwj-085.html
				i18n/css3-text-line-break-baspglwj-086.html
				i18n/css3-text-line-break-baspglwj-090.html
				i18n/css3-text-line-break-baspglwj-091.html
				i18n/css3-text-line-break-baspglwj-092.html
				i18n/css3-text-line-break-baspglwj-093.html
				i18n/css3-text-line-break-baspglwj-095.html
				i18n/css3-text-line-break-baspglwj-096.html
				i18n/css3-text-line-break-baspglwj-097.html
				i18n/css3-text-line-break-baspglwj-098.html
				i18n/css3-text-line-break-baspglwj-099.html
				i18n/css3-text-line-break-baspglwj-100.html
				i18n/css3-text-line-break-baspglwj-101.html
				i18n/css3-text-line-break-baspglwj-102.html
				i18n/css3-text-line-break-baspglwj-103.html
				i18n/css3-text-line-break-baspglwj-104.html
				i18n/css3-text-line-break-baspglwj-105.html
				i18n/css3-text-line-break-baspglwj-106.html
				i18n/css3-text-line-break-baspglwj-107.html
				i18n/css3-text-line-break-baspglwj-108.html
				i18n/css3-text-line-break-baspglwj-109.html
				i18n/css3-text-line-break-baspglwj-110.html
				i18n/css3-text-line-break-baspglwj-111.html
				i18n/css3-text-line-break-baspglwj-112.html
				i18n/css3-text-line-break-baspglwj-113.html
				i18n/css3-text-line-break-baspglwj-114.html
				i18n/css3-text-line-break-baspglwj-115.html
				i18n/css3-text-line-break-baspglwj-116.html
				i18n/css3-text-line-break-baspglwj-117.html
				i18n/css3-text-line-break-baspglwj-118.html
				i18n/css3-text-line-break-baspglwj-120.html
				i18n/css3-text-line-break-baspglwj-121.html
				i18n/css3-text-line-break-baspglwj-122.html
				i18n/css3-text-line-break-baspglwj-123.html
				i18n/css3-text-line-break-baspglwj-124.html
				i18n/css3-text-line-break-baspglwj-125.html
				i18n/css3-text-line-break-baspglwj-126.html
				i18n/css3-text-line-break-baspglwj-127.html
				i18n/css3-text-line-break-baspglwj-128.html
				i18n/css3-text-line-break-baspglwj-130.html
				i18n/css3-text-line-break-baspglwj-131.html
				white-space/control-chars-00D.html
				white-space/pre-line-051.html
				white-space/pre-line-052.html
				white-space/pre-line-br-with-whitespace-child-crash.html
				white-space/pre-line-with-space-and-newline.html
				white-space/trailing-ideographic-space-008.html
				white-space/trailing-ideographic-space-010.html
				white-space/trailing-ogham-002.html
				white-space/trailing-other-space-separators-003.html
				white-space/trailing-space-and-text-alignment-005.html
				white-space/trailing-space-and-text-alignment-rtl-005.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-intrinsic-size-019.html
				white-space/white-space-intrinsic-size-020.html
				white-space/white-space-letter-spacing-001.html
				white-space/white-space-pre-035.html
				word-break/break-boundary-2-chars-001.html
				word-break/word-break-break-all-062.html
				word-break/word-break-keep-all-063.html
			</wpt>
			<wpt title="tests using wrap through 'white-space: break-spaces':">
				i18n/css3-text-line-break-baspglwj-001.html
				i18n/css3-text-line-break-baspglwj-002.html
				i18n/css3-text-line-break-baspglwj-003.html
				i18n/css3-text-line-break-baspglwj-004.html
				i18n/css3-text-line-break-baspglwj-005.html
				i18n/css3-text-line-break-baspglwj-006.html
				i18n/css3-text-line-break-baspglwj-007.html
				i18n/css3-text-line-break-baspglwj-008.html
				i18n/css3-text-line-break-baspglwj-009.html
				i18n/css3-text-line-break-baspglwj-010.html
				i18n/css3-text-line-break-baspglwj-011.html
				i18n/css3-text-line-break-baspglwj-012.html
				i18n/css3-text-line-break-baspglwj-014.html
				i18n/css3-text-line-break-baspglwj-015.html
				i18n/css3-text-line-break-baspglwj-016.html
				i18n/css3-text-line-break-baspglwj-017.html
				i18n/css3-text-line-break-baspglwj-018.html
				i18n/css3-text-line-break-baspglwj-019.html
				i18n/css3-text-line-break-baspglwj-020.html
				i18n/css3-text-line-break-baspglwj-021.html
				i18n/css3-text-line-break-baspglwj-022.html
				i18n/css3-text-line-break-baspglwj-023.html
				i18n/css3-text-line-break-baspglwj-024.html
				i18n/css3-text-line-break-baspglwj-025.html
				i18n/css3-text-line-break-baspglwj-026.html
				i18n/css3-text-line-break-baspglwj-030.html
				i18n/css3-text-line-break-baspglwj-031.html
				i18n/css3-text-line-break-baspglwj-032.html
				i18n/css3-text-line-break-baspglwj-033.html
				i18n/css3-text-line-break-baspglwj-034.html
				i18n/css3-text-line-break-baspglwj-035.html
				i18n/css3-text-line-break-baspglwj-036.html
				i18n/css3-text-line-break-baspglwj-037.html
				i18n/css3-text-line-break-baspglwj-038.html
				i18n/css3-text-line-break-baspglwj-039.html
				i18n/css3-text-line-break-baspglwj-040.html
				i18n/css3-text-line-break-baspglwj-041.html
				i18n/css3-text-line-break-baspglwj-042.html
				i18n/css3-text-line-break-baspglwj-043.html
				i18n/css3-text-line-break-baspglwj-044.html
				i18n/css3-text-line-break-baspglwj-045.html
				i18n/css3-text-line-break-baspglwj-046.html
				i18n/css3-text-line-break-baspglwj-047.html
				i18n/css3-text-line-break-baspglwj-048.html
				i18n/css3-text-line-break-baspglwj-049.html
				i18n/css3-text-line-break-baspglwj-050.html
				i18n/css3-text-line-break-baspglwj-051.html
				i18n/css3-text-line-break-baspglwj-052.html
				i18n/css3-text-line-break-baspglwj-060.html
				i18n/css3-text-line-break-baspglwj-061.html
				i18n/css3-text-line-break-baspglwj-062.html
				i18n/css3-text-line-break-baspglwj-063.html
				i18n/css3-text-line-break-baspglwj-064.html
				i18n/css3-text-line-break-baspglwj-065.html
				i18n/css3-text-line-break-baspglwj-066.html
				i18n/css3-text-line-break-baspglwj-067.html
				i18n/css3-text-line-break-baspglwj-068.html
				i18n/css3-text-line-break-baspglwj-069.html
				i18n/css3-text-line-break-baspglwj-070.html
				i18n/css3-text-line-break-baspglwj-071.html
				i18n/css3-text-line-break-baspglwj-072.html
				i18n/css3-text-line-break-baspglwj-073.html
				i18n/css3-text-line-break-baspglwj-074.html
				i18n/css3-text-line-break-baspglwj-075.html
				i18n/css3-text-line-break-baspglwj-076.html
				i18n/css3-text-line-break-baspglwj-077.html
				i18n/css3-text-line-break-baspglwj-078.html
				i18n/css3-text-line-break-baspglwj-080.html
				i18n/css3-text-line-break-baspglwj-081.html
				i18n/css3-text-line-break-baspglwj-082.html
				i18n/css3-text-line-break-baspglwj-083.html
				i18n/css3-text-line-break-baspglwj-084.html
				i18n/css3-text-line-break-baspglwj-085.html
				i18n/css3-text-line-break-baspglwj-086.html
				i18n/css3-text-line-break-baspglwj-090.html
				i18n/css3-text-line-break-baspglwj-091.html
				i18n/css3-text-line-break-baspglwj-092.html
				i18n/css3-text-line-break-baspglwj-093.html
				i18n/css3-text-line-break-baspglwj-095.html
				i18n/css3-text-line-break-baspglwj-096.html
				i18n/css3-text-line-break-baspglwj-097.html
				i18n/css3-text-line-break-baspglwj-098.html
				i18n/css3-text-line-break-baspglwj-099.html
				i18n/css3-text-line-break-baspglwj-100.html
				i18n/css3-text-line-break-baspglwj-101.html
				i18n/css3-text-line-break-baspglwj-102.html
				i18n/css3-text-line-break-baspglwj-103.html
				i18n/css3-text-line-break-baspglwj-104.html
				i18n/css3-text-line-break-baspglwj-105.html
				i18n/css3-text-line-break-baspglwj-106.html
				i18n/css3-text-line-break-baspglwj-107.html
				i18n/css3-text-line-break-baspglwj-108.html
				i18n/css3-text-line-break-baspglwj-109.html
				i18n/css3-text-line-break-baspglwj-110.html
				i18n/css3-text-line-break-baspglwj-111.html
				i18n/css3-text-line-break-baspglwj-112.html
				i18n/css3-text-line-break-baspglwj-113.html
				i18n/css3-text-line-break-baspglwj-114.html
				i18n/css3-text-line-break-baspglwj-115.html
				i18n/css3-text-line-break-baspglwj-116.html
				i18n/css3-text-line-break-baspglwj-117.html
				i18n/css3-text-line-break-baspglwj-118.html
				i18n/css3-text-line-break-baspglwj-120.html
				i18n/css3-text-line-break-baspglwj-121.html
				i18n/css3-text-line-break-baspglwj-122.html
				i18n/css3-text-line-break-baspglwj-123.html
				i18n/css3-text-line-break-baspglwj-124.html
				i18n/css3-text-line-break-baspglwj-125.html
				i18n/css3-text-line-break-baspglwj-126.html
				i18n/css3-text-line-break-baspglwj-127.html
				i18n/css3-text-line-break-baspglwj-128.html
				i18n/css3-text-line-break-baspglwj-130.html
				i18n/css3-text-line-break-baspglwj-131.html
				line-break/line-break-anywhere-005.html
				line-break/line-break-anywhere-009.html
				line-break/line-break-anywhere-and-white-space-008.html
				line-break/line-break-anywhere-and-white-space-009.html
				overflow-wrap/overflow-wrap-anywhere-002.html
				overflow-wrap/overflow-wrap-anywhere-003.html
				overflow-wrap/overflow-wrap-break-word-002.html
				overflow-wrap/overflow-wrap-break-word-003.html
				overflow-wrap/overflow-wrap-break-word-006.html
				overflow-wrap/overflow-wrap-break-word-008.html
				white-space/break-spaces-001.html
				white-space/break-spaces-002.html
				white-space/break-spaces-003.html
				white-space/break-spaces-004.html
				white-space/break-spaces-005.html
				white-space/break-spaces-006.html
				white-space/break-spaces-007.html
				white-space/break-spaces-008.html
				white-space/break-spaces-009.html
				white-space/break-spaces-010.html
				white-space/break-spaces-011.html
				white-space/break-spaces-051.html
				white-space/break-spaces-052.html
				white-space/break-spaces-before-first-char-001.html
				white-space/break-spaces-before-first-char-002.html
				white-space/break-spaces-before-first-char-003.html
				white-space/break-spaces-before-first-char-004.html
				white-space/break-spaces-before-first-char-005.html
				white-space/break-spaces-before-first-char-006.html
				white-space/break-spaces-before-first-char-007.html
				white-space/break-spaces-before-first-char-008.html
				white-space/break-spaces-before-first-char-009.html
				white-space/break-spaces-before-first-char-010.html
				white-space/break-spaces-before-first-char-011.html
				white-space/break-spaces-before-first-char-012.html
				white-space/break-spaces-before-first-char-013.html
				white-space/break-spaces-before-first-char-014.html
				white-space/break-spaces-before-first-char-015.html
				white-space/break-spaces-before-first-char-016.html
				white-space/break-spaces-before-first-char-017.html
				white-space/break-spaces-before-first-char-018.html
				white-space/break-spaces-before-first-ideographic-char-001.html
				white-space/break-spaces-before-first-ideographic-char-002.html
				white-space/break-spaces-before-first-ideographic-char-003.html
				white-space/break-spaces-before-first-ideographic-char-004.html
				white-space/break-spaces-before-first-ideographic-char-005.html
				white-space/break-spaces-before-first-ideographic-char-006.html
				white-space/break-spaces-before-first-ideographic-char-007.html
				white-space/break-spaces-before-first-ideographic-char-008.html
				white-space/break-spaces-before-first-ideographic-char-009.html
				white-space/break-spaces-before-first-ideographic-char-010.html
				white-space/break-spaces-before-first-ideographic-char-011.html
				white-space/break-spaces-before-first-ideographic-char-012.html
				white-space/break-spaces-before-first-ideographic-char-013.html
				white-space/break-spaces-before-first-ideographic-char-014.html
				white-space/break-spaces-before-first-ideographic-char-015.html
				white-space/break-spaces-before-first-ideographic-char-016.html
				white-space/break-spaces-before-first-ideographic-char-017.html
				white-space/break-spaces-before-first-ideographic-char-018.html
				white-space/break-spaces-newline-011.html
				white-space/break-spaces-newline-012.html
				white-space/break-spaces-newline-013.html
				white-space/break-spaces-newline-014.html
				white-space/break-spaces-newline-015.html
				white-space/break-spaces-newline-016.html
				white-space/break-spaces-tab-001.html
				white-space/break-spaces-tab-002.html
				white-space/break-spaces-tab-003.html
				white-space/break-spaces-tab-004.html
				white-space/break-spaces-tab-005.html
				white-space/break-spaces-tab-006.html
				white-space/break-spaces-with-ideographic-space-001.html
				white-space/break-spaces-with-ideographic-space-002.html
				white-space/break-spaces-with-ideographic-space-003.html
				white-space/break-spaces-with-ideographic-space-004.html
				white-space/break-spaces-with-ideographic-space-005.html
				white-space/break-spaces-with-ideographic-space-006.html
				white-space/break-spaces-with-ideographic-space-007.html
				white-space/break-spaces-with-ideographic-space-008.html
				white-space/break-spaces-with-ideographic-space-009.html
				white-space/break-spaces-with-ideographic-space-010.html
				white-space/break-spaces-with-overflow-wrap-001.html
				white-space/break-spaces-with-overflow-wrap-002.html
				white-space/break-spaces-with-overflow-wrap-003.html
				white-space/break-spaces-with-overflow-wrap-004.html
				white-space/break-spaces-with-overflow-wrap-005.html
				white-space/break-spaces-with-overflow-wrap-006.html
				white-space/break-spaces-with-overflow-wrap-007.html
				white-space/break-spaces-with-overflow-wrap-008.html
				white-space/break-spaces-with-overflow-wrap-009.html
				white-space/break-spaces-with-overflow-wrap-010.html
				white-space/control-chars-00D.html
				white-space/tab-stop-threshold-005.html
				white-space/tab-stop-threshold-006.html
				white-space/textarea-break-spaces-001.html
				white-space/textarea-break-spaces-002.html
				white-space/trailing-ideographic-space-break-spaces-001.html
				white-space/trailing-ideographic-space-break-spaces-002.html
				white-space/trailing-ideographic-space-break-spaces-003.html
				white-space/trailing-ideographic-space-break-spaces-004.html
				white-space/trailing-ideographic-space-break-spaces-005.html
				white-space/trailing-ideographic-space-break-spaces-006.html
				white-space/trailing-ideographic-space-break-spaces-007.html
				white-space/trailing-ideographic-space-break-spaces-008.html
				white-space/trailing-other-space-separators-break-spaces-001.html
				white-space/trailing-other-space-separators-break-spaces-002.html
				white-space/trailing-other-space-separators-break-spaces-003.html
				white-space/trailing-other-space-separators-break-spaces-004.html
				white-space/trailing-other-space-separators-break-spaces-005.html
				white-space/trailing-other-space-separators-break-spaces-006.html
				white-space/trailing-other-space-separators-break-spaces-007.html
				white-space/trailing-other-space-separators-break-spaces-008.html
				white-space/trailing-other-space-separators-break-spaces-009.html
				white-space/trailing-other-space-separators-break-spaces-010.html
				white-space/trailing-other-space-separators-break-spaces-011.html
				white-space/trailing-other-space-separators-break-spaces-012.html
				white-space/trailing-other-space-separators-break-spaces-013.html
				white-space/trailing-other-space-separators-break-spaces-014.html
				white-space/trailing-other-space-separators-break-spaces-015.html
				white-space/trailing-space-and-text-alignment-004.html
				white-space/trailing-space-and-text-alignment-rtl-004.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-intrinsic-size-001.html
				white-space/white-space-intrinsic-size-002.html
				white-space/white-space-letter-spacing-001.html
				white-space/white-space-pre-034.html
				white-space/ws-break-spaces-applies-to-001.html
				white-space/ws-break-spaces-applies-to-002.html
				white-space/ws-break-spaces-applies-to-003.html
				white-space/ws-break-spaces-applies-to-005.html
				white-space/ws-break-spaces-applies-to-006.html
				white-space/ws-break-spaces-applies-to-007.html
				white-space/ws-break-spaces-applies-to-008.html
				white-space/ws-break-spaces-applies-to-009.html
				white-space/ws-break-spaces-applies-to-010.html
				white-space/ws-break-spaces-applies-to-011.html
				white-space/ws-break-spaces-applies-to-012.html
				white-space/ws-break-spaces-applies-to-013.html
				white-space/ws-break-spaces-applies-to-014.html
				white-space/ws-break-spaces-applies-to-015.html
				word-break/break-boundary-2-chars-001.html
				word-break/word-break-break-all-012.html
				word-break/word-break-break-all-013.html
				word-break/word-break-break-all-017.html
				word-break/word-break-break-all-022.html
				word-break/word-break-break-all-062.html
				word-break/word-break-keep-all-008.html
				word-break/word-break-keep-all-063.html
			</wpt>

			Note: See [[#line-break-details]] for more information
			about rules and constrains on [=soft wrap opportunities=].

		<dt><dfn>nowrap</dfn>
		<dd>
			Lines only break at [=forced line breaks=];
			content that does not fit within the block container overflows it.

			<wpt title="tests using nowrap directly through 'text-wrap-mode':">
			</wpt>
			<wpt title="tests using nowrap through 'text-wrap: nowrap':">
			white-space/text-wrap-nowrap-001.html
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: pre':" pathprefix="/css/CSS2/text/">
				white-space-pre-001.xht
				white-space-pre-002.xht
				white-space-pre-005.xht
				white-space-pre-006.xht
			</wpt>
			<wpt title="CSS 2 indirect tests via 'white-space: nowrap':" pathprefix="/css/CSS2/text/">
				white-space-nowrap-001.xht
				white-space-nowrap-005.xht
				white-space-nowrap-006.xht
				text-align-white-space-004.xht
				text-align-white-space-008.xht
				white-space-nowrap-attribute-001.xht
				white-space-processing-006.xht
			</wpt>
			<wpt title="tests using nowrap through 'white-space: pre':">
				bidi/bidi-lines-001.html
				bidi/bidi-tab-001.html
				letter-spacing/letter-spacing-206.html
				letter-spacing/letter-spacing-bidi-003.xht
				letter-spacing/letter-spacing-bidi-004.xht
				letter-spacing/letter-spacing-bidi-005.xht
				letter-spacing/letter-spacing-nesting-003.xht
				line-break/line-break-anywhere-005.html
				line-break/line-break-anywhere-and-white-space-001.html
				line-break/line-break-anywhere-and-white-space-003.html
				line-breaking/line-breaking-009.html
				line-breaking/line-breaking-010.html
				line-breaking/line-breaking-011.html
				line-breaking/line-breaking-023.html
				line-breaking/line-breaking-024.html
				line-breaking/line-breaking-025.html
				line-breaking/line-breaking-026.html
				line-breaking/line-breaking-027.html
				line-breaking/line-breaking-ic-001.html
				line-breaking/line-breaking-ic-002.html
				line-breaking/line-breaking-ic-003.html
				line-breaking/line-breaking-replaced-006.html
				overflow-wrap/overflow-wrap-break-word-007.html
				overflow-wrap/overflow-wrap-break-word-008.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash.html
				tab-size/tab-size-block-ancestor.html
				tab-size/tab-size-inheritance-001.html
				tab-size/tab-size-inline-001.html
				tab-size/tab-size-inline-002.html
				tab-size/tab-size-integer-004.html
				tab-size/tab-size-spacing-001.html
				tab-size/tab-size-spacing-002.html
				tab-size/tab-size-spacing-003.html
				text-indent/text-indent-length-002.html
				text-indent/text-indent-tab-positions-001.html
				text-justify/text-justify-006.html
				text-transform/text-transform-capitalize-035.html
				text-transform/text-transform-fullwidth-008.html
				text-transform/text-transform-fullwidth-009.html
				white-space/break-spaces-009.html
				white-space/break-spaces-newline-011.html
				white-space/break-spaces-newline-012.html
				white-space/break-spaces-newline-013.html
				white-space/break-spaces-newline-014.html
				white-space/break-spaces-newline-015.html
				white-space/break-spaces-newline-016.html
				white-space/break-spaces-tab-005.html
				white-space/break-spaces-tab-006.html
				white-space/break-spaces-with-ideographic-space-009.html
				white-space/break-spaces-with-overflow-wrap-009.html
				white-space/break-spaces-with-overflow-wrap-010.html
				white-space/control-chars-00D.html
				white-space/eol-spaces-bidi-001.html
				white-space/eol-spaces-bidi-002.html
				white-space/pre-float-001.html
				white-space/pre-with-whitespace-crash.html
				white-space/pre-wrap-008.html
				white-space/pre-wrap-009.html
				white-space/pre-wrap-010.html
				white-space/pre-wrap-016.html
				white-space/pre-wrap-018.html
				white-space/pre-wrap-019.html
				white-space/pre-wrap-020.html
				white-space/tab-bidi-001.html
				white-space/tab-stop-threshold-001.html
				white-space/tab-stop-threshold-002.html
				white-space/trailing-other-space-separators-001.html
				white-space/trailing-other-space-separators-003.html
				white-space/trailing-other-space-separators-004.html
				white-space/trailing-other-space-separators-break-spaces-001.html
				white-space/trailing-other-space-separators-break-spaces-002.html
				white-space/trailing-other-space-separators-break-spaces-003.html
				white-space/trailing-other-space-separators-break-spaces-004.html
				white-space/trailing-other-space-separators-break-spaces-005.html
				white-space/trailing-other-space-separators-break-spaces-006.html
				white-space/trailing-other-space-separators-break-spaces-007.html
				white-space/trailing-other-space-separators-break-spaces-008.html
				white-space/trailing-other-space-separators-break-spaces-009.html
				white-space/trailing-other-space-separators-break-spaces-010.html
				white-space/trailing-other-space-separators-break-spaces-011.html
				white-space/trailing-other-space-separators-break-spaces-012.html
				white-space/trailing-other-space-separators-break-spaces-013.html
				white-space/trailing-other-space-separators-break-spaces-014.html
				white-space/trailing-other-space-separators-break-spaces-015.html
				white-space/trailing-space-align-start.tentative.html
				white-space/trailing-space-and-text-alignment-002.html
				white-space/trailing-space-and-text-alignment-rtl-002.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-intrinsic-size-015.html
				white-space/white-space-intrinsic-size-016.html
				white-space/white-space-intrinsic-size-018.html
				white-space/white-space-letter-spacing-001.html
				white-space/white-space-normal-011.html
				white-space/white-space-pre-011.html
				white-space/white-space-pre-031.html
				white-space/white-space-pre-032.html
				white-space/white-space-pre-034.html
				white-space/white-space-pre-035.html
				white-space/white-space-pre-051.html
				white-space/white-space-pre-052.html
				white-space/ws-break-spaces-applies-to-001.html
				white-space/ws-break-spaces-applies-to-002.html
				white-space/ws-break-spaces-applies-to-003.html
				white-space/ws-break-spaces-applies-to-005.html
				white-space/ws-break-spaces-applies-to-006.html
				white-space/ws-break-spaces-applies-to-007.html
				white-space/ws-break-spaces-applies-to-008.html
				white-space/ws-break-spaces-applies-to-009.html
				white-space/ws-break-spaces-applies-to-010.html
				white-space/ws-break-spaces-applies-to-011.html
				white-space/ws-break-spaces-applies-to-014.html
				white-space/ws-break-spaces-applies-to-015.html
				word-break/break-boundary-2-chars-001.html
				word-break/break-boundary-2-chars-002.html
				word-break/word-break-break-all-010.html
				word-break/word-break-break-all-011.html
				word-break/word-break-break-all-012.html
				word-break/word-break-break-all-013.html
				word-break/word-break-break-all-015.html
				word-break/word-break-break-all-017.html
				word-break/word-break-break-all-ethiopic.html
				word-break/word-break-normal-ethiopic.html
				word-space-transform/word-space-transform-008.html
				word-space-transform/word-space-transform-011.html
			</wpt>
			<wpt title="tests using nowrap through 'white-space: nowrap':">
				hanging-punctuation/hanging-punctuation-allow-end-001.xht
				hanging-punctuation/hanging-punctuation-first-001.xht
				hanging-punctuation/hanging-punctuation-force-end-001.xht
				hanging-punctuation/hanging-punctuation-last-001.xht
				letter-spacing/letter-spacing-206.html
				line-break/line-break-anywhere-and-white-space-002.html
				line-breaking/line-breaking-012.html
				line-breaking/line-breaking-atomic-nowrap-001.html
				overflow-wrap/overflow-wrap-002.html
				overflow-wrap/overflow-wrap-anywhere-008.html
				overflow-wrap/overflow-wrap-break-word-white-space-crash-002.html
				overflow-wrap/word-wrap-002.html
				text-transform/text-transform-capitalize-001.html
				text-transform/text-transform-capitalize-003.html
				text-transform/text-transform-capitalize-005.html
				text-transform/text-transform-capitalize-007.html
				text-transform/text-transform-capitalize-009.html
				text-transform/text-transform-capitalize-010.html
				text-transform/text-transform-capitalize-011.html
				text-transform/text-transform-capitalize-014.html
				text-transform/text-transform-capitalize-016.html
				text-transform/text-transform-capitalize-018.html
				text-transform/text-transform-capitalize-020.html
				text-transform/text-transform-capitalize-022.html
				text-transform/text-transform-capitalize-024.html
				text-transform/text-transform-capitalize-026.html
				text-transform/text-transform-capitalize-028.html
				text-transform/text-transform-capitalize-030.html
				text-transform/text-transform-full-size-kana-005.html
				text-transform/text-transform-full-size-kana-006.html
				text-transform/text-transform-full-size-kana-007.html
				text-transform/text-transform-fullwidth-001.xht
				text-transform/text-transform-upperlower-001.html
				text-transform/text-transform-upperlower-002.html
				text-transform/text-transform-upperlower-003.html
				text-transform/text-transform-upperlower-004.html
				text-transform/text-transform-upperlower-005.html
				text-transform/text-transform-upperlower-006.html
				text-transform/text-transform-upperlower-007.html
				text-transform/text-transform-upperlower-008.html
				text-transform/text-transform-upperlower-009.html
				text-transform/text-transform-upperlower-010.html
				text-transform/text-transform-upperlower-011.html
				text-transform/text-transform-upperlower-012.html
				text-transform/text-transform-upperlower-014.html
				text-transform/text-transform-upperlower-015.html
				text-transform/text-transform-upperlower-016.html
				text-transform/text-transform-upperlower-017.html
				text-transform/text-transform-upperlower-018.html
				text-transform/text-transform-upperlower-019.html
				text-transform/text-transform-upperlower-020.html
				text-transform/text-transform-upperlower-021.html
				text-transform/text-transform-upperlower-022.html
				text-transform/text-transform-upperlower-023.html
				text-transform/text-transform-upperlower-024.html
				text-transform/text-transform-upperlower-025.html
				text-transform/text-transform-upperlower-026.html
				text-transform/text-transform-upperlower-027.html
				text-transform/text-transform-upperlower-028.html
				text-transform/text-transform-upperlower-029.html
				text-transform/text-transform-upperlower-030.html
				text-transform/text-transform-upperlower-031.html
				text-transform/text-transform-upperlower-032.html
				text-transform/text-transform-upperlower-033.html
				text-transform/text-transform-upperlower-034.html
				text-transform/text-transform-upperlower-035.html
				text-transform/text-transform-upperlower-039.html
				text-transform/text-transform-upperlower-040.html
				text-transform/text-transform-upperlower-041.html
				text-transform/text-transform-upperlower-042.html
				text-transform/text-transform-upperlower-043.html
				text-transform/text-transform-upperlower-044.html
				text-transform/text-transform-upperlower-101.html
				text-transform/text-transform-upperlower-102.html
				text-transform/text-transform-upperlower-103.html
				text-transform/text-transform-upperlower-104.html
				white-space/control-chars-00D.html
				white-space/nowrap-wbr-and-space-crash.html
				white-space/trailing-ideographic-space-007.html
				white-space/trailing-ideographic-space-009.html
				white-space/trailing-ogham-003.html
				white-space/trailing-other-space-separators-004.html
				white-space/white-space-applies-to-text-001.html
				white-space/white-space-nowrap-011.html
				white-space/white-space-wrap-after-nowrap-001.html
				word-break/auto-phrase/word-break-auto-phrase-wbr-nobr-002.html
				word-break/break-boundary-2-chars-002.html
				word-break/word-break-break-word-crash-001.html
			</wpt>
	</dl>

	Regardless of the 'text-wrap-mode' value,
	[=preserved=] [=segment breaks=],
	and any Unicode character with the <code>BK</code>, <code>CR</code>, <code>LF</code>, and <code>NL</code> line breaking class,
	must be treated as [=forced line breaks=].
	[[!UAX14]]

	<wpt>
	line-breaking/line-breaking-022.html
	</wpt>

	Note: The bidi implications of such [=forced line breaks=]
	are defined by the <a href="https://www.unicode.org/reports/tr9/"><cite>Unicode Bidirectional Algorithm</cite></a>.
	[[!UAX9]]

<h3 id="wrap-inside">
Controlling Breaks Within Boxes: the 'wrap-inside' property</h3>

	<wpt title="This section lacks tests."></wpt>

	<pre class="propdef">
	Name: wrap-inside
	Value: auto | avoid
	Initial: auto
	Applies to: <a>inline boxes</a>
	Inherited: no
	Percentages: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<dl dfn-for=wrap-inside dfn-type=value>
		<dt><dfn>auto</dfn>
		<dd>
			Lines may break at allowed break points
			within the box,
			as determined by the line-breaking rules in effect.

		<dt><dfn>avoid</dfn>
		<dd>
			Line breaking is suppressed within the box:
			the UA may only break within the box
			if there are no other valid break points in the line.
			If the text breaks,
			line-breaking restrictions are honored as for
			''wrap-inside/auto''.

			If boxes with ''wrap-inside/avoid'' are nested
			and the UA must break within these boxes,
			a break in an outer box must be used
			before a break within an inner box may be used.
	</dl>

<h4 id="example-avoid">
Example of using 'wrap-inside: avoid' in presenting a footer</h4>

	<wpt title="This section does not need tests."></wpt>

	<div class="example">

		The priority of breakpoints can be set
		to reflect the intended grouping of text.

		Given the rules

		<pre>
			footer { wrap-inside: avoid; }
			venue { wrap-inside: avoid; }
			date { wrap-inside: avoid; }
			place { wrap-inside: avoid; }
		</pre>

		and the following markup:

		<pre>
			&lt;footer>
			&lt;venue>27th Internationalization and Unicode Conference&lt;/venue>
			&amp;#8226; &lt;date>April 7, 2005&lt;/date> &amp;#8226;
			&lt;place>Berlin, Germany&lt;/place>
			&lt;/footer>
		</pre>

		In a narrow window the footer could be broken as

		<pre>
			27th Internationalization and Unicode Conference &#8226;
			April 7, 2005 &#8226; Berlin, Germany
		</pre>

		or in a narrower window as

		<pre>
			27th Internationalization and Unicode
			Conference &#8226; April 7, 2005 &#8226;
			Berlin, Germany
		</pre>

		but not as

		<pre>
			27th Internationalization and Unicode Conference &#8226; April
			7, 2005 &#8226; Berlin, Germany
		</pre>
	</div>

<h3 id="wrap-before">
Controlling Breaks Between Boxes: the 'wrap-before'/'wrap-after' properties</h3>

	<wpt title="This section lacks tests."></wpt>

	<pre class="propdef">
	Name: wrap-before, wrap-after
	Value: auto | avoid | avoid-line | avoid-flex | line | flex
	Initial: auto
	Applies to: <a>inline-level</a> boxes and <a>flex items</a>
	Inherited: no
	Percentages: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	These properties specify modifications to break opportunities
	in line breaking (and <a>flex line</a> breaking [[CSS3-FLEXBOX]]).
	Possible values:

	<dl dfn-for="wrap-before, wrap-after" dfn-type=value>
		<dt><dfn>auto</dfn>
		<dd>
			Lines may break at allowed break points
			before and after the box,
			as determined by the line-breaking rules in effect.

		<dt><dfn>avoid</dfn>
		<dd>
			Line breaking is suppressed immediately before/after the box:
			the UA may only break there
			if there are no other valid break points
			in the line.
			If the text breaks,
			line-breaking restrictions are honored as for
			''wrap-before/auto''.

		<dt><dfn>avoid-line</dfn>
		<dd>
			Same as ''wrap-before/avoid'',
			but only for line breaks.

		<dt><dfn>avoid-flex</dfn>
		<dd>
			Same as ''wrap-before/avoid'',
			but only for flex line breaks.

		<dt><dfn>line</dfn>
		<dd>
			Force a line break immediately before/after the box
			if the box is an <a>inline-level</a> box.

		<dt><dfn>flex</dfn>
		<dd>
			Force a <a>flex line</a> break immediately before/after the box
			if the box is a <a>flex item</a>
			in a <a>multi-line flex container</a>.
	</dl>

	Forced line breaks on <a>inline-level</a> boxes propagate upward
	through any parent <a>inline boxes</a>
	the same way forced breaks on <a>block-level</a> boxes propagate upward
	through any parent <a>block boxes</a>
	in the same <a>fragmentation context</a>.
	[[!CSS3-BREAK]]

<h3 id="text-wrap-style">
Selecting How to Wrap: the 'text-wrap-style' property</h3>

	<wpt title="
		This property has limited coverage.

		Missing test:
		* tests for values other than balance
		* Direct tests of this property as a longhand"></wpt>

	<pre class="propdef">
	Name: text-wrap-style
	Value: auto | balance | stable | pretty | avoid-orphans
	Initial: auto
	Applies to: [=block containers=] hat establish an [=inline formatting context=]
	Inherited: yes
	Percentages: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	Issue: The CSSWG is looking for a better name for ''avoid-orphans''.

	<wpt>
		parsing/text-wrap-style-computed.html
		parsing/text-wrap-style-invalid.html
		parsing/text-wrap-style-valid.html
		parsing/text-wrap-pretty.html
		white-space/text-wrap-balance-before-after-002.html
	</wpt>

	When wrapping is allowed
	(see 'text-wrap-mode'),
	this property selects between several approaches for wrapping lines,
	trading off between speed, quality and style of layout, or stability.
	It does not change which [=soft wrap opportunity=] exist,
	but changes how the user agent selects among them.
	Possible values:

	<dl dfn-for=text-wrap-style dfn-type=value>
		<dt><dfn>auto</dfn>
		<dd>
			The exact algorithm for selecting
			which [=soft wrap opportunity=] to break at is UA-defined.
			The algorithm <em>may</em> consider multiple lines
			when making break decisions.
			The UA <em>may</em> bias for speed over best layout.
			The UA <em>must not</em> attempt to even out all lines
			(including the last) as for ''text-wrap-style/balance''.
			This value selects the UA’s preferred (or most Web-compatible)
			wrapping algorithm.

		<dt><dfn>balance</dfn>
		<dd>
			Line breaks are chosen to balance
			the remaining (empty) space in each line box,
			if better balance than ''text-wrap-style/auto'' is possible.
			This should avoid changing--
			and in the case of 5 or fewer lines must not change--
			the number of line boxes
			the block would contain
			if 'text-wrap' were set to ''text-wrap-style/auto''.

			Note: The height of the line boxes may nevertheless change,
			due to changes in which content appears together on one line.

			<wpt>
				white-space/text-wrap-balance-001.html
				white-space/text-wrap-balance-002.html
				white-space/text-wrap-balance-003.html
				white-space/text-wrap-balance-align-001.html
				white-space/text-wrap-balance-dynamic-001.html
				white-space/text-wrap-balance-line-clamp-001.html
				white-space/text-wrap-balance-narrow-crash.html
				crashtests/text-wrap-balance-float-crash.html
				crashtests/text-wrap-balance-nested-blocks-crash.html
				white-space/text-wrap-balance-overflow-001.html
				white-space/text-wrap-balance-overflow-002.html
				white-space/text-wrap-balance-right-to-left.html
				white-space/text-wrap-balance-top-to-bottom.html
				white-space/text-wrap-balance-before-after-001.html
			</wpt>

			The remaining space to consider
			is that which remains after placing floats and inline content,
			but before any adjustments due to text justification.
			Line boxes are balanced when the standard deviation
			from the average <a>inline-size</a> of the remaining space in each line box
			is reduced over the block
			(including lines that end in a [=forced line break=]).

			<wpt>
				white-space/text-wrap-balance-text-indent-001.html
				white-space/text-wrap-balance-float-001.html
				white-space/text-wrap-balance-float-002.html
				white-space/text-wrap-balance-float-003.html
				white-space/text-wrap-balance-float-004.html
				white-space/text-wrap-balance-float-005.html
				white-space/text-wrap-balance-float-006.html
			</wpt>

			Groups of lines separated by a [=forced line break=]
			are processed separately.
			If the element is affected by 'line-clamp',
			the clamping effect is applied first,
			then the remaining lines are balanced.

			<wpt>
				white-space/text-wrap-balance-004.html
				white-space/text-wrap-balance-005.html
			</wpt>

			The exact algorithm is UA-defined.

			UAs may treat this value as ''text-wrap-style/auto'' if there are more than ten lines to balance.

		<dt><dfn>stable</dfn>
		<dd>
			Specifies that content on subsequent lines
			<em>should not</em> be considered when making break decisions
			so that when editing text any content before the cursor
			remains stable;
			otherwise equivalent to ''text-wrap-style/auto'',

		<dt><dfn>pretty</dfn>
		<dd>
			Specifies the UA <em>should</em> bias for better layout over speed,
			and is expected to consider multiple lines
			when making break decisions.
			Otherwise equivalent to ''text-wrap-style/auto''.

			The user agent may among other things
			attempt to avoid excessively short last lines,
			similarly to ''avoid-orphans'',
			but it should also improve the layout in additional ways.
			The precise set of improvements is user agent dependent,
			and may include things such as:
			reducing the variation in length between lines;
			avoiding <a href="https://en.wikipedia.org/wiki/River_(typography)">typographic rivers</a>;
			prioritizing different classes of [=soft wrap opportunities=], [=hyphenation opportunities=], or [=justification opportunities=];
			avoiding hyphenation on too many consecutive lines…

			<div class=advisement>
				The necessary computations may be expensive,
				especially when applied to large amounts of text.
				Authors are encouraged to assess the impact on performance
				when using ''text-wrap-style: pretty'',
				and possibly use it selectively where it matters most.
			</div>

		<dt><dfn>avoid-orphans</dfn>
		<dd>
			Specifies the UA <em>should</em> avoid excessively short last lines,
			and is expected to consider more than one line
			when making break decisions
			(for example, to avoid "fixing" an orphan
			by making the previous line too short).
			The user agent may decide against improving the last line
			when it would make some prior line(s) substantially unbalanced.
			The user agent should not attempt to improve other aspects of the layout
			beyond what ''text-wrap-style/auto''
			if those improvements come at a significant performance cost.

			Note: In western typography, an “orphan” can refer to a single word on the last line of a paragraph.
			However, not all languages or writing systems wrap lines at word boundaries,
			and even in languages that do,
			a few very short words on the last line may still be undesirable,
			especially if the available inline space is long.
			This specification does not therefore strictly define
			lines to be too short only when they are composed a single word,
			and lets the user agent be the judge of what is excessively short.

			Note: See also the 'orphans' property for control over fragmentation
			and the other typographic meaning of “orphans”.

			<div class=example>
				For instance, with the given line length, the following test would be wrapped with a single word on the last line,
				which could be judged too short.
				<pre lang=grc style="border: solid lightgray 8px; border-bottom: none; border-top: none; width: 45ch;">
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα
πολλὰ πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον
ἔπερσεν.
				</pre>
				Applying ''text-wrap-style: avoid-orphans'' could yield something like this instead,
				which is arguably more pleasing:
				<pre lang=grc style="border: solid lightgray 8px; border-bottom: none; border-top: none; width: 45ch;">
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς
μάλα πολλὰ πλάγχθη, ἐπεὶ Τροίης ἱερὸν
πτολίεθρον ἔπερσεν.
				</pre>
			</div>
			<div class=example>
				However, the following fragment is more vexing:
				<pre style="border: solid lightgray 8px; border-bottom: none; border-top: none; width: 17ch;">
Circumnavigating
the Mississippi
river
				</pre>
				An attempt to make the last line less short by wrapping the previous line earlier would result in the following:
				<pre style="border: solid lightgray 8px; border-bottom: none; border-top: none; width: 17ch;">
Circumnavigating
the
Mississippi river
				</pre>
				While the last line would indeed no longer be short,
				the penultimate line would be unsightly.
				In such cases, user agents are expected
				to prefer the first rendering
				despite ''text-wrap-style: avoid-orphans'' being set.
			</div>
	</dl>

	<!-- add a sample prioritization algorithm -->

	Note: The ''text-wrap-style/auto'' value will typically map
	to Web browsers’ speedy legacy line breaking,
	which has so far used first-fit/greedy algorithms
	that can often give sub-optimal results.
	UAs can experiment with better line breaking algorithms
	with this default value,
	but as optimal results often take more time,
	''text-wrap-style/pretty'' and ''avoid-orphans'' are offered as opt-ins
	to take more time for better results.
	Both values are intended for body text,
	where the last line is expected to be a bit shorter than the average line,
	but ''avoid-orphans'' aims to avoid excessively short last lines while staying performant,
	while ''pretty'' can sacrifice more speed in pursuit of even better layout;
	the ''text-wrap-style/balance'' value is intended for titles and captions,
	where equal-length lines of text tend to be preferred;
	and the ''text-wrap-style/stable'' is intended for sections that are,
	or are likely become toggled as,
	editable.

	<div class="issue" id="last-line-limits">
		See <a href="http://www.w3.org/mid/0BD85DFF-A147-44EF-B18A-FF03C3D67EF0@verou.me">thread</a>.
		Issue is about requiring a minimum length for lines.
		Common measures seem to be

		<ul>
			<li>At least as long as the text-indent.
			<li>At least X characters.
			<li>Percentage-based.
		</ul>

		Suggestion for value space is ''match-indent | <<length>> | <<percentage>>''
		(with ''Xch'' given as an example to make that use case clear).
		Alternately <<integer>> could actually count the characters.

		It's unclear how this would interact with text balancing (above);
		one earlier proposal had them be the same property
		(with ''100%'' meaning full balancing).

		People have requested word-based limits, but since this is really
		dependent on the length of the word, character-based is better.
	</div>

<h3 id="text-wrap-shorthand">
Joint Wrapping Control: the 'text-wrap' shorthand property</h3>

	<wpt title="This section has limited coverage."></wpt>

	<pre class="propdef">
	Name: text-wrap
	Value: <<'text-wrap-mode'>> || <<'text-wrap-style'>>
	Initial: wrap
	Applies to: see individual properties
	Inherited: see individual properties
	Percentages: see individual properties
	Computed value: see individual properties
	Animation type: see individual properties
	</pre>

	<wpt>
		parsing/text-wrap-invalid.html
		parsing/text-wrap-valid.html
		parsing/text-wrap-computed.html
		parsing/text-wrap-pretty.html
	</wpt>
	<wpt title="TODO: needs review, probably outdated">
		parsing/white-space-shorthand-text-wrap.html
	</wpt>

	This property is a shorthand for the 'text-wrap-mode' and 'text-wrap-style' properties.
	Any omitted [=longhand=] is set to its [=initial value=].

<h2 id="line-breaking">
Line Breaking and Word Boundaries</h2>

	<wpt title="
		This section deals in generalities
		rather than specific requirements.
		Exhaustive coverage is neither practical
		nor needed,
		as more specific requirements
		are made in different sections,
		and can be tested there.

		Nonetheless,
		this can be a good section
		to host tests for i18n requirements
		not covered in detail by the spec.

		Possible additions:
		* tests for at least one language with line breaking based on orthographic syllable boundaries
		* Basic line breaking tests for some languages mentioned: Javanese, Balinese, Yi"></wpt>

	In most writing systems,
	in the absence of hyphenation a [=soft wrap opportunity=] occurs only at word boundaries.
	Many such systems (such as English written using the Latin alphabet)
	use [=spaces=] or punctuation to explicitly separate words,
	and [=soft wrap opportunities=] can be identified by these characters.

	<wpt>
	i18n/css3-text-line-break-baspglwj-003.html
	i18n/css3-text-line-break-baspglwj-004.html
	i18n/css3-text-line-break-baspglwj-005.html
	i18n/css3-text-line-break-baspglwj-006.html
	i18n/css3-text-line-break-baspglwj-007.html
	i18n/css3-text-line-break-baspglwj-008.html
	i18n/css3-text-line-break-baspglwj-009.html
	i18n/css3-text-line-break-baspglwj-010.html
	i18n/css3-text-line-break-baspglwj-011.html
	i18n/css3-text-line-break-baspglwj-012.html
	i18n/css3-text-line-break-baspglwj-014.html
	i18n/css3-text-line-break-baspglwj-015.html
	i18n/css3-text-line-break-baspglwj-016.html
	i18n/css3-text-line-break-baspglwj-017.html
	i18n/css3-text-line-break-baspglwj-018.html
	i18n/css3-text-line-break-baspglwj-019.html
	i18n/css3-text-line-break-baspglwj-020.html
	i18n/css3-text-line-break-baspglwj-021.html
	i18n/css3-text-line-break-baspglwj-022.html
	i18n/css3-text-line-break-baspglwj-023.html
	i18n/css3-text-line-break-baspglwj-024.html
	i18n/css3-text-line-break-baspglwj-025.html
	i18n/css3-text-line-break-baspglwj-026.html
	i18n/css3-text-line-break-baspglwj-030.html
	i18n/css3-text-line-break-baspglwj-031.html
	i18n/css3-text-line-break-baspglwj-032.html
	i18n/css3-text-line-break-baspglwj-033.html
	i18n/css3-text-line-break-baspglwj-034.html
	i18n/css3-text-line-break-baspglwj-035.html
	i18n/css3-text-line-break-baspglwj-036.html
	i18n/css3-text-line-break-baspglwj-037.html
	i18n/css3-text-line-break-baspglwj-038.html
	i18n/css3-text-line-break-baspglwj-039.html
	i18n/css3-text-line-break-baspglwj-040.html
	i18n/css3-text-line-break-baspglwj-041.html
	i18n/css3-text-line-break-baspglwj-042.html
	i18n/css3-text-line-break-baspglwj-043.html
	i18n/css3-text-line-break-baspglwj-044.html
	i18n/css3-text-line-break-baspglwj-045.html
	i18n/css3-text-line-break-baspglwj-046.html
	i18n/css3-text-line-break-baspglwj-047.html
	i18n/css3-text-line-break-baspglwj-048.html
	i18n/css3-text-line-break-baspglwj-049.html
	i18n/css3-text-line-break-baspglwj-050.html
	i18n/css3-text-line-break-baspglwj-051.html
	i18n/css3-text-line-break-baspglwj-052.html
	i18n/css3-text-line-break-baspglwj-060.html
	i18n/css3-text-line-break-baspglwj-061.html
	i18n/css3-text-line-break-baspglwj-062.html
	i18n/css3-text-line-break-baspglwj-063.html
	i18n/css3-text-line-break-baspglwj-064.html
	i18n/css3-text-line-break-baspglwj-065.html
	i18n/css3-text-line-break-baspglwj-066.html
	i18n/css3-text-line-break-baspglwj-067.html
	i18n/css3-text-line-break-baspglwj-068.html
	i18n/css3-text-line-break-baspglwj-069.html
	i18n/css3-text-line-break-baspglwj-070.html
	i18n/css3-text-line-break-baspglwj-071.html
	i18n/css3-text-line-break-baspglwj-072.html
	i18n/css3-text-line-break-baspglwj-073.html
	i18n/css3-text-line-break-baspglwj-074.html
	i18n/css3-text-line-break-baspglwj-075.html
	i18n/css3-text-line-break-baspglwj-076.html
	i18n/css3-text-line-break-baspglwj-077.html
	i18n/css3-text-line-break-baspglwj-078.html
	i18n/css3-text-line-break-baspglwj-080.html
	i18n/css3-text-line-break-baspglwj-081.html
	i18n/css3-text-line-break-baspglwj-082.html
	i18n/css3-text-line-break-baspglwj-083.html
	i18n/css3-text-line-break-baspglwj-084.html
	i18n/css3-text-line-break-baspglwj-085.html
	i18n/css3-text-line-break-baspglwj-086.html
	i18n/css3-text-line-break-baspglwj-090.html
	i18n/css3-text-line-break-baspglwj-091.html
	i18n/css3-text-line-break-baspglwj-092.html
	i18n/css3-text-line-break-baspglwj-093.html
	i18n/css3-text-line-break-baspglwj-095.html
	i18n/css3-text-line-break-baspglwj-096.html
	i18n/css3-text-line-break-baspglwj-097.html
	i18n/css3-text-line-break-baspglwj-098.html
	i18n/css3-text-line-break-baspglwj-099.html
	i18n/css3-text-line-break-baspglwj-100.html
	i18n/css3-text-line-break-baspglwj-101.html
	i18n/css3-text-line-break-baspglwj-102.html
	i18n/css3-text-line-break-baspglwj-103.html
	i18n/css3-text-line-break-baspglwj-104.html
	i18n/css3-text-line-break-baspglwj-105.html
	i18n/css3-text-line-break-baspglwj-106.html
	i18n/css3-text-line-break-baspglwj-107.html
	i18n/css3-text-line-break-baspglwj-108.html
	i18n/css3-text-line-break-baspglwj-109.html
	i18n/css3-text-line-break-baspglwj-110.html
	i18n/css3-text-line-break-baspglwj-111.html
	i18n/css3-text-line-break-baspglwj-112.html
	i18n/css3-text-line-break-baspglwj-113.html
	i18n/css3-text-line-break-baspglwj-114.html
	i18n/css3-text-line-break-baspglwj-115.html
	i18n/css3-text-line-break-baspglwj-116.html
	i18n/css3-text-line-break-baspglwj-117.html
	i18n/css3-text-line-break-baspglwj-118.html
	word-break/word-break-normal-bo-000.html
	word-break/word-break-normal-en-000.html
	word-break/word-break-normal-ethiopic.html
	word-break/word-break-normal-hi-000.html
	word-break/word-break-normal-ko-000.html
	</wpt>

	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 [=soft wrap opportunities=] in such texts.

	<wpt>
	word-break/word-break-normal-002.html
	word-break/word-break-normal-003.html
	word-break/word-break-normal-th-000.html
	word-break/word-break-normal-th-001.html
	word-break/word-break-normal-km-000.html
	word-break/word-break-normal-lo-000.html
	word-break/word-break-normal-my-000.html
	word-break/word-break-normal-tdd-000.html
	</wpt>

	In some other writing systems,
	notably Brahmic scripts such as Javanese and Balinese,
	[=soft wrap opportunities=] are based on orthographic syllable boundaries,
	not word boundaries.
	Although orthographic syllable breaking
	does not depend on the [=content language=]
	or require lexical resource,
	it nonetheless requires analysis of the text
	to find breaking opportunities.

	<wpt>
	</wpt>

	In others such as Chinese (as well as Japanese, Yi, and sometimes also Korean),
	each syllable tends to correspond to a single [=typographic letter unit=],
	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.

	<wpt>
	word-break/word-break-normal-ja-000.html
	word-break/word-break-normal-ja-001.html
	word-break/word-break-normal-ja-002.html
	word-break/word-break-normal-ja-004.html
	word-break/word-break-normal-zh-000.html
	i18n/css3-text-line-break-opclns-001.html
	i18n/css3-text-line-break-opclns-002.html
	i18n/css3-text-line-break-opclns-003.html
	i18n/css3-text-line-break-opclns-004.html
	i18n/css3-text-line-break-opclns-005.html
	i18n/css3-text-line-break-opclns-006.html
	i18n/css3-text-line-break-opclns-007.html
	i18n/css3-text-line-break-opclns-008.html
	i18n/css3-text-line-break-opclns-009.html
	i18n/css3-text-line-break-opclns-010.html
	i18n/css3-text-line-break-opclns-011.html
	i18n/css3-text-line-break-opclns-012.html
	i18n/css3-text-line-break-opclns-014.html
	i18n/css3-text-line-break-opclns-015.html
	i18n/css3-text-line-break-opclns-016.html
	i18n/css3-text-line-break-opclns-017.html
	i18n/css3-text-line-break-opclns-018.html
	i18n/css3-text-line-break-opclns-019.html
	i18n/css3-text-line-break-opclns-020.html
	i18n/css3-text-line-break-opclns-021.html
	i18n/css3-text-line-break-opclns-022.html
	i18n/css3-text-line-break-opclns-023.html
	i18n/css3-text-line-break-opclns-024.html
	i18n/css3-text-line-break-opclns-025.html
	i18n/css3-text-line-break-opclns-026.html
	i18n/css3-text-line-break-opclns-027.html
	i18n/css3-text-line-break-opclns-028.html
	i18n/css3-text-line-break-opclns-029.html
	i18n/css3-text-line-break-opclns-030.html
	i18n/css3-text-line-break-opclns-031.html
	i18n/css3-text-line-break-opclns-032.html
	i18n/css3-text-line-break-opclns-033.html
	i18n/css3-text-line-break-opclns-034.html
	i18n/css3-text-line-break-opclns-035.html
	i18n/css3-text-line-break-opclns-036.html
	i18n/css3-text-line-break-opclns-037.html
	i18n/css3-text-line-break-opclns-038.html
	i18n/css3-text-line-break-opclns-039.html
	i18n/css3-text-line-break-opclns-040.html
	i18n/css3-text-line-break-opclns-041.html
	i18n/css3-text-line-break-opclns-042.html
	i18n/css3-text-line-break-opclns-043.html
	i18n/css3-text-line-break-opclns-044.html
	i18n/css3-text-line-break-opclns-045.html
	i18n/css3-text-line-break-opclns-046.html
	i18n/css3-text-line-break-opclns-047.html
	i18n/css3-text-line-break-opclns-049.html
	i18n/css3-text-line-break-opclns-050.html
	i18n/css3-text-line-break-opclns-051.html
	i18n/css3-text-line-break-opclns-052.html
	i18n/css3-text-line-break-opclns-053.html
	i18n/css3-text-line-break-opclns-054.html
	i18n/css3-text-line-break-opclns-055.html
	i18n/css3-text-line-break-opclns-056.html
	i18n/css3-text-line-break-opclns-057.html
	i18n/css3-text-line-break-opclns-058.html
	i18n/css3-text-line-break-opclns-059.html
	i18n/css3-text-line-break-opclns-060.html
	i18n/css3-text-line-break-opclns-061.html
	i18n/css3-text-line-break-opclns-062.html
	i18n/css3-text-line-break-opclns-063.html
	i18n/css3-text-line-break-opclns-064.html
	i18n/css3-text-line-break-opclns-065.html
	i18n/css3-text-line-break-opclns-100.html
	i18n/css3-text-line-break-opclns-101.html
	i18n/css3-text-line-break-opclns-102.html
	i18n/css3-text-line-break-opclns-103.html
	i18n/css3-text-line-break-opclns-104.html
	i18n/css3-text-line-break-opclns-105.html
	i18n/css3-text-line-break-opclns-106.html
	i18n/css3-text-line-break-opclns-107.html
	i18n/css3-text-line-break-opclns-108.html
	i18n/css3-text-line-break-opclns-109.html
	i18n/css3-text-line-break-opclns-110.html
	i18n/css3-text-line-break-opclns-111.html
	i18n/css3-text-line-break-opclns-112.html
	i18n/css3-text-line-break-opclns-113.html
	i18n/css3-text-line-break-opclns-114.html
	i18n/css3-text-line-break-opclns-115.html
	i18n/css3-text-line-break-opclns-116.html
	i18n/css3-text-line-break-opclns-117.html
	i18n/css3-text-line-break-opclns-119.html
	i18n/css3-text-line-break-opclns-120.html
	i18n/css3-text-line-break-opclns-121.html
	i18n/css3-text-line-break-opclns-122.html
	i18n/css3-text-line-break-opclns-123.html
	i18n/css3-text-line-break-opclns-124.html
	i18n/css3-text-line-break-opclns-125.html
	i18n/css3-text-line-break-opclns-126.html
	i18n/css3-text-line-break-opclns-127.html
	i18n/css3-text-line-break-opclns-128.html
	i18n/css3-text-line-break-opclns-129.html
	i18n/css3-text-line-break-opclns-130.html
	i18n/css3-text-line-break-opclns-131.html
	i18n/css3-text-line-break-opclns-132.html
	i18n/css3-text-line-break-opclns-133.html
	i18n/css3-text-line-break-opclns-134.html
	i18n/css3-text-line-break-opclns-135.html
	i18n/css3-text-line-break-opclns-136.html
	i18n/css3-text-line-break-opclns-137.html
	i18n/css3-text-line-break-opclns-138.html
	i18n/css3-text-line-break-opclns-139.html
	i18n/css3-text-line-break-opclns-140.html
	i18n/css3-text-line-break-opclns-141.html
	i18n/css3-text-line-break-opclns-142.html
	i18n/css3-text-line-break-opclns-143.html
	i18n/css3-text-line-break-opclns-144.html
	i18n/css3-text-line-break-opclns-145.html
	i18n/css3-text-line-break-opclns-146.html
	i18n/css3-text-line-break-opclns-147.html
	i18n/css3-text-line-break-opclns-148.html
	i18n/css3-text-line-break-opclns-149.html
	i18n/css3-text-line-break-opclns-150.html
	i18n/css3-text-line-break-opclns-151.html
	i18n/css3-text-line-break-opclns-152.html
	i18n/css3-text-line-break-opclns-153.html
	i18n/css3-text-line-break-opclns-155.html
	i18n/css3-text-line-break-opclns-156.html
	i18n/css3-text-line-break-opclns-157.html
	i18n/css3-text-line-break-opclns-158.html
	i18n/css3-text-line-break-opclns-159.html
	i18n/css3-text-line-break-opclns-160.html
	i18n/css3-text-line-break-opclns-161.html
	i18n/css3-text-line-break-opclns-162.html
	i18n/css3-text-line-break-opclns-163.html
	i18n/css3-text-line-break-opclns-164.html
	i18n/css3-text-line-break-opclns-165.html
	i18n/css3-text-line-break-opclns-166.html
	i18n/css3-text-line-break-opclns-167.html
	i18n/css3-text-line-break-opclns-168.html
	i18n/css3-text-line-break-opclns-169.html
	i18n/css3-text-line-break-opclns-170.html
	i18n/css3-text-line-break-opclns-171.html
	i18n/css3-text-line-break-opclns-200.html
	i18n/css3-text-line-break-opclns-201.html
	i18n/css3-text-line-break-opclns-202.html
	i18n/css3-text-line-break-opclns-203.html
	i18n/css3-text-line-break-opclns-204.html
	i18n/css3-text-line-break-opclns-205.html
	i18n/css3-text-line-break-opclns-206.html
	i18n/css3-text-line-break-opclns-207.html
	i18n/css3-text-line-break-opclns-208.html
	i18n/css3-text-line-break-opclns-209.html
	i18n/css3-text-line-break-opclns-210.html
	i18n/css3-text-line-break-opclns-211.html
	i18n/css3-text-line-break-opclns-212.html
	i18n/css3-text-line-break-opclns-213.html
	i18n/css3-text-line-break-opclns-214.html
	i18n/css3-text-line-break-opclns-215.html
	i18n/css3-text-line-break-opclns-217.html
	i18n/css3-text-line-break-opclns-218.html
	i18n/css3-text-line-break-opclns-219.html
	i18n/css3-text-line-break-opclns-220.html
	i18n/css3-text-line-break-opclns-221.html
	i18n/css3-text-line-break-opclns-222.html
	i18n/css3-text-line-break-opclns-223.html
	i18n/css3-text-line-break-opclns-225.html
	i18n/css3-text-line-break-opclns-226.html
	</wpt>

	While CSS does not fully define where [=soft wrap opportunities=] occur,
	some controls are provided to distinguish common variations:

	<ul>
		<li>
			The 'line-break' property allows choosing various levels of “strictness”
			for line breaking restrictions.
		<li>
			The 'word-break' 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,
			enabling control over word detection in South East Asian Languages,
			or allowing words to be grouped into phrases…
		<li>
			The 'hyphens' property controls whether automatic hyphenation
			is allowed to break words in scripts that hyphenate.
		<li>
			The 'overflow-wrap' property allows the UA to take a break anywhere
			in otherwise-unbreakable strings that would otherwise overflow.
	</ul>

	Note: <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.
	[[UAX14]]
	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> [[JLREQ]]
	and <cite>Formatting Rules for Japanese Documents</cite> [[JIS4051]] for Japanese,
	<a href="https://www.w3.org/TR/clreq/"><cite>Requirements for Chinese Text Layout</cite></a> [[CLREQ]]
	and <cite>General Rules for Punctuation</cite> [[ZHMARK]] 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.
	[[TYPOGRAPHY]]
	Any guidance on additional appropriate references
	would be much appreciated.

	<wpt>
	line-breaking/line-breaking-028.html
	line-breaking/line-breaking-029.html
	</wpt>

	<wpt title="Generic line-breaking tests not particularly anchored to any specific spec language">
	shaping/shaping_lig-001.html
	</wpt>

<h3 id="word-break-property" caniuse="word-break" oldids="word-break">
Breaking Rules for Letters: the 'word-break' property</h3>

	<wpt title="
		This section has partial test coverage.

		Missing tests:
		* Applies to text
		* No test of Animation type.
		* affects intrinsic sizing (tested for word-break:break-word)
		* treating non-letter typographic character units belonging to the NU, AL, AI, or ID Unicode line breaking classes
		* any typographic character units resolving to the any typographic letter units (and any typographic character units resolving to the <code>NU</code> (“numeric”), <code>AL</code> (“alphabetic”), or <code>SA</code> (“Southeast Asian”) line breaking classes
		* effect of word-break:keep-all on NU and AI classes
		* Symbols that line-break the same way as letters of a particular category are affected the same way as those letters.
		* does not suppress wbr (tested with auto-phrase, but not with keep-all or manual)
		* More tests for “does not affect rules governing the soft wrap opportunities created around punctuation"></wpt>

	<pre class="propdef">
	Name: word-break
	Value: normal | break-all | keep-all | manual | auto-phrase | break-word
	Initial: normal
	Applies to: text
	Inherited: yes
	Canonical order: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/word-break-invalid.html
	parsing/word-break-valid.html
	parsing/word-break-computed.html
	word-break/word-break-break-all-inline-001.html
	word-break/word-break-break-all-inline-002.html
	word-break/word-break-break-all-inline-003.html
	word-break/word-break-break-all-inline-004.tentative.html
	word-break/word-break-break-all-inline-005.html
	word-break/word-break-break-all-inline-006.html
	word-break/word-break-break-all-inline-007.tentative.html
	word-break/word-break-break-all-inline-009.html
	word-break/word-break-break-all-062.html
	word-break/word-break-keep-all-063.html
	</wpt>

	This property specifies [=soft wrap opportunities=] between and within “words”,
	i.e. where it is “normal” and permissible to break lines of text.
	It focuses on breaks between letters,
	and does not define whether and how [=soft wrap opportunities=]
	are created by [=white space=] and [=other space separators=]
	(though ''word-break/auto-phrase'' may suppress some),
	nor around punctuation.
	(See 'line-break' for controls affecting punctuation and small kana.)

	<wpt>
		word-break/word-break-keep-all-005.html
		word-break/word-break-keep-all-006.html
		word-break/word-break-keep-all-007.html
		word-break/word-break-keep-all-008.html
		word-break/word-break-min-content-003.html
		word-space-transform/word-space-transform-013.html
		word-space-transform/word-space-transform-014.html
	</wpt>

	In particular,
	'word-break' controls whether a [=soft wrap opportunity=]
	generally exists
	between adjacent [=typographic letter units=],
	treating non-[=letter=] [=typographic character units=]
	belonging to the
	<code>NU</code>,
	<code>AL</code>,
	<code>AI</code>,
	or <code>ID</code>
	Unicode line breaking classes
	as [=typographic letter units=] for this purpose (only).
	[[!UAX14]]

	<div class="example">
		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 ''word-break:break-all''.

		<figure>
			<img src="images/break-all.png"
			     alt="A snippet of Japanese text with English in it.
			          The word 'caption' is broken into 'capt' and 'ion' across two lines.">

			<figcaption>
				An example of English text embedded in Japanese
				being broken at an arbitrary point in the word.
			</figcaption>
		</figure>

		As another example, Korean has two styles of line-breaking:
		between any two Korean syllables (''word-break: normal'')
		or, like English, mainly at spaces (''word-break: keep-all'').

		<pre>
			각 줄의 마지막에 한글이 올 때 줄 나눔 <strong>기
			준을</strong> “글자” 또는 “어절” 단위로 한다.
		</pre>

		<pre>
			각 줄의 마지막에 한글이 올 때 줄 나눔
			<strong>기준을</strong> “글자” 또는 “어절” 단위로 한다.
		</pre>

		Ethiopic similarly has two styles of line-breaking,
		either only breaking at [=word separators=] (''word-break: normal''),
		or also allowing breaks between letters within a word (''word-break: break-all'').

		<pre>
			ተወልዱ፡ኵሉ፡ሰብእ፡ግዑዛን፡ወዕሩያን፡
			<strong>በማዕረግ</strong>፡ወብሕግ።ቦሙ፡ኅሊና፡ወዐቅል፡
			ወይትጌበሩ፡አሐዱ፡ምስለ፡አሀዱ፡
			በመንፈሰ፡እኍና።
		</pre>

		<pre>
			ተወልዱ፡ኵሉ፡ሰብእ፡ግዑዛን፡ወዕሩያን፡<strong>በማ
			ዕረግ</strong>፡ወብሕግ።ቦሙ፡ኅሊና፡ወዐቅል፡ወይትጌ
			በሩ፡አሐዱ፡ምስለ፡አሀዱ፡በመንፈሰ፡እኍና።
		</pre>
	</div>

	Note: To enable additional break opportunities only in the case of overflow,
	see 'overflow-wrap'.

	Values have the following meanings:

	<dl dfn-for=word-break dfn-type=value>
		<dt><dfn>normal</dfn>
		<dd>
			Words break according to their customary rules,
			as described [[#line-breaking|above]].
			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.

			<wpt>
			word-break/word-break-normal-001.html
			word-break/word-break-normal-002.html
			word-break/word-break-normal-003.html
			word-break/word-break-normal-ar-000.html
			word-break/word-break-normal-bo-000.html
			word-break/word-break-normal-en-000.html
			word-break/word-break-normal-hi-000.html
			word-break/word-break-normal-ja-000.html
			word-break/word-break-normal-ja-001.html
			word-break/word-break-normal-ja-002.html
			word-break/word-break-normal-ja-004.html
			word-break/word-break-normal-km-000.html
			word-break/word-break-normal-ko-000.html
			word-break/word-break-normal-lo-000.html
			word-break/word-break-normal-my-000.html
			word-break/word-break-normal-tdd-000.html
			word-break/word-break-normal-th-000.html
			word-break/word-break-normal-th-001.html
			word-break/word-break-normal-zh-000.html
			word-break/word-break-normal-ethiopic.html
			</wpt>

			Some writing systems require specific processing
			to obtain the customarily expected [=soft wrap opportunities=],
			as described in [[#analytical-word-breaking]].

		<dt><dfn>break-all</dfn>
		<dd>
			Breaking is allowed within “words”:
			specifically,
			in addition to [=soft wrap opportunities=] allowed for ''word-break/normal'',
			any [=typographic letter units=]
			(and any [=typographic character units=] resolving to the
			<code>NU</code> (“numeric”),
			<code>AL</code> (“alphabetic”),
			or <code>SA</code> (“Southeast Asian”)
			line breaking classes [[!UAX14]])
			are instead treated as <code>ID</code>
			(“ideographic characters”)
			for the purpose of line-breaking.
			Hyphenation is not applied.

			<wpt>
			line-break/line-break-loose-hyphens-002.html
			line-break/line-break-normal-hyphens-002.html
			line-break/line-break-strict-hyphens-002.html
			overflow-wrap/overflow-wrap-anywhere-006.html
			white-space/break-spaces-006.html
			white-space/break-spaces-008.html
			white-space/break-spaces-before-first-char-004.html
			white-space/break-spaces-before-first-char-005.html
			white-space/break-spaces-before-first-char-006.html
			white-space/break-spaces-before-first-ideographic-char-004.html
			white-space/break-spaces-before-first-ideographic-char-005.html
			white-space/break-spaces-before-first-ideographic-char-006.html
			word-break/break-boundary-2-chars-002.html
			word-break/word-break-break-all-000.html
			word-break/word-break-break-all-001.html
			word-break/word-break-break-all-002.html
			word-break/word-break-break-all-003.html
			word-break/word-break-break-all-005.html
			word-break/word-break-break-all-006.html
			word-break/word-break-break-all-010.html
			word-break/word-break-break-all-012.html
			word-break/word-break-break-all-013.html
			word-break/word-break-break-all-014.html
			word-break/word-break-break-all-015.html
			word-break/word-break-break-all-016.html
			word-break/word-break-break-all-017.html
			word-break/word-break-break-all-018.html
			word-break/word-break-break-all-019.html
			word-break/word-break-break-all-020.html
			word-break/word-break-break-all-021.html
			word-break/word-break-break-all-022.html
			word-break/word-break-break-all-023.html
			word-break/word-break-break-all-024.html
			word-break/word-break-break-all-025.html
			word-break/word-break-break-all-026.html
			word-break/word-break-break-all-027.html
			word-break/word-break-break-all-028.html
			word-break/word-break-break-all-029.html
			word-break/word-break-break-all-030.html
			word-break/word-break-break-all-031.html
			word-break/word-break-break-all-032.html
			word-break/word-break-break-all-ethiopic.html
			word-break/word-break-break-all-inline-001.html
			word-break/word-break-break-all-inline-002.html
			word-break/word-break-break-all-inline-003.html
			word-break/word-break-break-all-inline-004.tentative.html
			word-break/word-break-break-all-inline-005.html
			word-break/word-break-break-all-inline-006.html
			word-break/word-break-break-all-inline-007.tentative.html
			word-break/word-break-break-all-inline-008.html
			word-break/word-break-break-all-inline-009.html
			word-break/word-break-break-all-inline-010.tentative.html
			</wpt>

			Note: This value does not affect
			whether there are [=soft wrap opportunities=]
			around punctuation characters.
			To allow breaks anywhere, see ''line-break: anywhere''.

			<wpt>
			white-space/break-spaces-before-first-char-011.html
			white-space/break-spaces-before-first-ideographic-char-011.html
			word-break/word-break-break-all-ethiopic.html
			</wpt>

			Note: 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.

		<dt><dfn>keep-all</dfn>
		<dd>
			Breaking is forbidden within “words”:
			implicit [=soft wrap opportunities=] between [=typographic letter units=]
			(or other [=typographic character units=]
			belonging to the
			<code>NU</code>,
			<code>AL</code>,
			<code>AI</code>,
			or <code>ID</code>
			Unicode line breaking classes [[!UAX14]])
			are suppressed,
			i.e. breaks are prohibited between pairs of such characters
			(regardless of 'line-break' settings other than ''line-break/anywhere'')
			except where opportunities exist due to [[#lexical-breaking]].
			Otherwise this option is equivalent to ''word-break/normal''.
			In this style, sequences of CJK characters do not break.

			<wpt>
			word-break/word-break-keep-all-000.html
			word-break/word-break-keep-all-001.html
			word-break/word-break-keep-all-002.html
			word-break/word-break-keep-all-003.html
			word-break/word-break-keep-all-009.html
			word-break/word-break-keep-all-010.html
			white-space/break-spaces-with-word-break-001.html
			</wpt>

			Note: This is the other common behavior for Korean
			(which uses [=spaces=] between words),
			and is also useful for mixed-script text where CJK snippets are mixed
			into another language that uses [=spaces=] for separation.

		<dt><dfn>manual</dfn>
		<dd>
			Behaves the same as ''word-break/normal'',
			except that
			[[#lexical-breaking]] must <em>not</em> be performed.
			Specifically,
			[=typographic character units=] with class SA in [[!UAX14]]
			must be treated as if they had class AL
			(i.e. assuming a value of 'line-break' other than ''line-break/anywhere'',
			there is no [=soft wrap opportunity=]
			between pairs of such characters).

			<wpt>
				word-break/word-break-manual-001.html
			</wpt>

			Note: This value does not affect
			syllable-based [=soft wrap opportunities=] within words
			in languages such as Balinese.
			(See [[#orthographic-breaking]]
			for some discussion of such writing systems.)

			Issue: alternatively, this value could be based
			on ''keep-all'' rather than ''word-break/normal''.
			Yet another variant is to merge this behavior
			with ''keep-all''.

			<div class=note>
				Note: Some Southeast Asian languages are commonly misdetected by user agents.
				With ''word-break: normal'',
				they would then apply inappropriate language-specific logic
				to find wrapping opportunities,
				and place them inappropriately.

				For instance,
				many languages other than Thai are written using the Thai script,
				and line-breaking them as if they were Thai
				will generally produce inadequate--
				and possibly confusing--
				results.

				When this occurs,
				this value enables authors to turn off
				the word boundary detection
				built into user agents for ''word-break: normal'',
				so that they can manually mark up the text to indicate wrapping opportunities
				and obtain sensible results.

				<div class=advisement>
					Authors using this value
					are expected to manually indicate word boundaries for Southeast Asian languages,
					using <{wbr}> or U+200B.
					Otherwise, there will be no [=soft wrap opportunity=]
					and the text may overflow.
				</div>
			</div>

		<dt><dfn>auto-phrase</dfn>
		<dd>
			Behaves the same as ''word-break/normal'',
			except that
			this value directs the user agent to perform language-specific content analysis
			to prioritize keeping natural phrases (of multiple words) together.

			If the [=content language=] of the element is unknown,
			or if the user agent does not know how to [=detect phrase boundaries=]
			for that particular language,
			this value must behave as ''word-break/normal''.
			Otherwise,
			the user agent should [=detect phrase boundaries=]
			and suppress [=soft wrap opportunities=]
			within each phrase.

			<wpt>
				word-break/auto-phrase/word-break-auto-phrase-001.html
				word-break/auto-phrase/word-break-auto-phrase-002.html
				word-break/auto-phrase/word-break-auto-phrase-003.html
				word-break/auto-phrase/word-break-auto-phrase-004.html
				word-break/auto-phrase/word-break-auto-phrase-005.html
				word-break/auto-phrase/word-break-auto-phrase-005.html
				word-break/auto-phrase/word-break-auto-phrase-007.html
				word-break/auto-phrase/word-break-auto-phrase-009.html
				word-break/auto-phrase/word-break-auto-phrase-fallback-001.html
				word-break/auto-phrase/word-break-auto-phrase-fallback-002.html
				word-break/auto-phrase/word-break-auto-phrase-fallback-003.html
				word-break/auto-phrase/word-break-auto-phrase-intrinsic-001.html
				word-break/auto-phrase/word-break-auto-phrase-overflow-001.html
				word-break/auto-phrase/word-break-auto-phrase-wbr-nobr-001.html
				word-break/auto-phrase/word-break-auto-phrase-wbr-nobr-002.html
			</wpt>

			Regardless of the [=content language=]
			and support for [=phrase boundary detection=],
			[=hyphenation opportunities=] are suppressed
			as if ''hyphens: none'' had been specified.

			<wpt>
				word-break/auto-phrase/word-break-auto-phrase-006.html
				word-break/auto-phrase/word-break-auto-phrase-008.html
			</wpt>

			<div class=note>
			Note: Whether a word boundary detection system designed for one language
			is suitable for some or all dialects of that language is somewhat subjective,
			and this specifications leaves it at the discretion of the user agent.
			Even if a detection system is not able to cope
			with all nuances of a particular dialect,
			it may be reasonable to claim support
			if the detection correctly recognizes word boundaries most of the time.
			However, the user agent would do a disservice to authors and users
			if it claimed support for languages
			where it fails to detect most word boundaries
			or has a high error rate.

				<div class=example>
					If a user agent has a word-boundary detection system for Cantonese
					that is not suitable for the broader set of Chinese languages,
					''word-break/auto-phrase'' should have an effect on content marked as
					''lang=yue'', ''lang=zh-yue'', or ''lang=zh-HK'',
					but not ''lang=zh'' or ''lang=zh-Hant''.

					However, if the user agent supports a generic word-boundary detection system
					that is suitable for Chinese in general,
					''word-break/auto-phrase'' should have an effect on content
					marked with the broad ''lang=zh'' characterization,
					as well as any more specific ones,
					such as ''lang=zh-yue'', ''lang=zh-Hant-HK'', ''lang=zh-Hans-SG'', or ''lang=zh-hak''.
				</div>
			</div>
	</dl>

	Symbols that line-break the same way as letters of a particular category
	are affected the same way as those letters.

	<div class="example">
		Here’s a mixed-script sample text:

		<pre style="white-space: pre-wrap">
			这是一些汉字 and some Latin <bdi dir=rtl>و کمی خط عربی</bdi> และตัวอย่างการเขียนภาษาไทย በጽሑፍ፡ማራዘሙን፡አንዳንድ፡
		</pre>

		The break-points are determined as follows (indicated by &lsquo;&middot;&rsquo;):

		<dl>
			<dt>''word-break: normal''
			<dd>
				<pre style="white-space: pre-wrap">
					这·是·一·些·汉·字·and·some·Latin·<bdi dir=rtl>و·کمی·خط·عربی</bdi>·และ·ตัวอย่าง·การเขียน·ภาษาไทย·በጽሑፍ፡·ማራዘሙን፡·አንዳንድ፡
				</pre>

			<dt>''word-break: break-all''
			<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>''word-break: keep-all''
			<dd>
				<pre style="white-space: pre-wrap">
					这是一些汉字·and·some·Latin·<bdi dir=rtl>و·کمی·خط·عربی</bdi>·และ·ตัวอย่าง·การเขียน·ภาษาไทย·በጽሑፍ፡·ማራዘሙን፡·አንዳንድ፡
				</pre>
		</dl>
	</div>

	<div class="example" id=jp-title-break>
		<style>
			#jp-title-break td samp,
			#jp-title-break td pre {
				font-size: 1.5em;
				width: 6em;
				line-height: 2;
				padding: 0.5em 1em;
				display: block;
				margin: auto;
				border: solid gray 1px;
				color: black;
				background: white;
			}
		</style>

		Japanese is usually typeset allowing line breaks between syllables 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.

		This can be achieved manually by marking the allowed wrapping points
		with <{wbr}> or U+200B ZERO WIDTH SPACE,
		and suppressing the other ones using ''word-break: keep-all''.

		Alternatively,
		in user agents that support detection of phrases boundaries in Japanese,
		the same results can be achieved automatically
		by using
		''word-break: auto-phrase''
		(assuming the [=content language=] is specified).

		<table class=data>
			<colgroup span=1></colgroup>
			<colgroup span=2></colgroup>
			<thead>
				<tr>
					<th>Sample markup and style rule
					<th>Expected rendering
					<th>Result in your browser
			<tbody>
				<tr>
					<th scope=row>
						<xmp highlight=markup>
							<h1>
							窓ぎわの<wbr>トットちゃん
							</h1>
						</xmp>
						<pre><code highlight=css>
						h1 {
						  word-break: normal;
						}</code></pre>
					<td>
						<pre lang=ja>
							窓ぎわのトッ
							トちゃん
						</pre>

					<td>
						<samp lang=ja>
							窓ぎわの<wbr>トットちゃん
						</samp>
				<tr>
					<th scope=row>
						<xmp highlight=markup>
							<h1>
							窓ぎわの<wbr>トットちゃん
							</h1>
						</xmp>
						<pre><code highlight=css>
						h1 {
						  word-break: keep-all;
						}</code></pre>
					<td>
						<pre lang=ja>
							窓ぎわの
							トットちゃん
						</pre>
					<td>
						<samp style="word-break:keep-all" lang=ja>
							窓ぎわの<wbr>トットちゃん
						</samp>
				<tr>
					<th scope=row>
						<xmp highlight=markup>
							<h1 lang=ja>
							窓ぎわのトットちゃん
							</h1>
						</xmp>
						<pre><code highlight=css>
						h1 {
						  word-break: auto-phrase;
						}</code></pre>
					<td>
						<pre lang=ja>
							窓ぎわの
							トットちゃん
						</pre>
					<td>
						<samp style="word-break:auto-phrase" lang=ja>
							窓ぎわのトットちゃん
						</samp>
		</table>

	</div>

	<wpt>
	word-break/word-break-break-all-004.html
	</wpt>

	User agents must not,
	in response to any value of this property,
	suppress [=soft wrap opportunities=] which are:
	* introduced by the <{wbr}> HTML element or U+200B ZERO WIDTH SPACE
		<wpt>
			word-break/auto-phrase/word-break-auto-phrase-006.html
			word-break/auto-phrase/word-break-auto-phrase-wbr-nobr-001.html
		</wpt>
	* required by the 'line-break' property
	* <a href=#atomic-compat-wrap>surrounding atomic inlines</a>

	The effects of 'word-break'
	are taken into account when computing [=intrinsic sizes=].

	For compatibility with legacy content,
	the 'word-break' property also supports
	a deprecated <dfn value for=word-break>break-word</dfn> keyword.
	When specified, this has the same effect as
	''word-break: normal'' and ''overflow-wrap: anywhere'',
	regardless of the actual value of the 'overflow-wrap' property.
	<!-- This is officially sad -->

	<wpt>
	white-space/pre-wrap-008.html
	white-space/pre-wrap-016.html
	word-break/word-break-break-word-overflow-wrap-interactions.html
	word-break/word-break-break-word-crash-001.html
	white-space/break-spaces-003.html
	white-space/break-spaces-004.html
	white-space/break-spaces-008.html
	white-space/break-spaces-before-first-char-010.html
	white-space/break-spaces-before-first-ideographic-char-010.html
	word-break/word-break-min-content-001.html
	word-break/word-break-min-content-002.html
	word-break/word-break-min-content-003.html
	word-break/word-break-min-content-004.html
	word-break/word-break-min-content-005.html
	word-break/word-break-min-content-006.html
	white-space/break-spaces-with-ideographic-space-002.html
	white-space/break-spaces-with-ideographic-space-004.html
	white-space/break-spaces-with-ideographic-space-006.html
	white-space/break-spaces-with-ideographic-space-008.html
	white-space/break-spaces-with-ideographic-space-009.html
	word-break/word-break-min-content-007.html
	</wpt>

<h4 id="analytical-word-breaking">
Analytical Word Breaking</h4>

<h5 id="lexical-breaking">
Lexical Word Breaking</h5>

	<wpt title="This section has basic but adequate coverage"></wpt>

	To provide the expected ''word-break/normal'' behavior
	for Southeast Asian languages,
	[=typographic character units=] with line breaking class SA in [[!UAX14]]
	must be treated as if they had class AL.
	However, the user agent must additionally
	analyze the content of a run of such characters
	to [=detect word boundaries=]
	and treat each boundary as a [=soft wrap opportunities=].

	<wpt>
		word-break/word-break-normal-002.html
		word-break/word-break-normal-003.html
		word-break/word-break-normal-km-000.html
		word-break/word-break-normal-lo-000.html
		word-break/word-break-normal-my-000.html
		word-break/word-break-normal-tdd-000.html
		word-break/word-break-normal-th-000.html
		word-break/word-break-normal-th-001.html
	</wpt>

	As various languages can be written in scripts
	which use the characters with class SA,
	if the [=content language=] is known,
	the user agent should use this information
	to tailor its analysis.

	<wpt>
		word-break/word-break-normal-tdd-000.html
	</wpt>

<h5 id="orthographic-breaking">
Orthographic Breaking</h5>

	<wpt title="This section is untested."></wpt>

	For scripts (such as Balinese) that use line breaking based on orthographic syllables,
	the UA must analyze the content
	to find the correct points to insert [=soft wrap opportunities=].

	Note: At the time of writing,
	Unicode does not define how to perform this analysis,
	and treats all characters in these writing systems
	as having line breaking class AL.
	However,
	[[L2-22-080R inline|a proposal]] has been made to solve that issue.
	Even though it is not final,
	it can be informative to consult.
	[[L2-22-080R]]

<h5 id="fallback-breaking">
Fallback Breaking</h5>

	<wpt title="This section has basic but adequate coverage"></wpt>

	In order to avoid unexpected overflow,
	if the user agent is unable to perform the requisite lexical
	or orthographic analysis
	for line breaking any [=content language=] that requires it--
	for example due to lacking a dictionary
	for languages written in characters with class SA--
	it must assume a [=soft wrap opportunity=]
	between pairs of [=typographic letter units=] in that writing system.

	<wpt>
		line-breaking/line-breaking-023.html
		line-breaking/line-breaking-024.html
		line-breaking/line-breaking-025.html
		line-breaking/line-breaking-026.html
		line-breaking/line-breaking-027.html
	</wpt>

	Note: 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.


<h4 id="phrase-pref">
Expressing User Preferences for Phrase-based Line Breaking</h4>

	<wpt title="This section is untested, but it is not clear how it could be."></wpt>

	User agents may activate
	language-specific content analysis
	described in ''word-break/auto-phrase''
	in response to user preferences.
	User agents with this behavior must do this
	by setting the [=declared value=] of 'word-break' to ''word-break/auto-phrase''
	in the [=user origin=].

	Note: This allows authors to detect
	whether or not this feature is enabled by calling {{getComputedStyle()}},
	or to override it in the [=author origin=] where appropriate.


<h3 id="line-break-property">
Line Breaking Strictness: the 'line-break' property</h3>

	<wpt title="
		This section has extensive test coverage for CJK.

		Missing tests:
		* applies to text
		* affects intrinsic sizing
		* Line breaking classes CM and SG must be honored even with line-break: anywhere

		Untestable(?):
		* behavior of “auto”"></wpt>

	<pre class="propdef">
	Name: line-break
	Value: auto | loose | normal | strict | anywhere
	Initial: auto
	Applies to: text
	Inherited: yes
	Canonical order: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/line-break-valid.html
	parsing/line-break-invalid.html
	parsing/line-break-computed.html
	animations/line-break-no-interpolation.html
	</wpt>

	This property specifies the strictness of line-breaking rules applied
	within an element:
	especially how [=wrapping=] interacts with punctuation and symbols.
	Values have the following meanings:

	<dl dfn-for=line-break dfn-type=value>
		<dt><dfn>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>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>normal</dfn>
		<dd>
			Breaks text using the most common set of line-breaking rules.

		<dt><dfn>strict</dfn>
		<dd>
			Breaks text using the most stringent set of line-breaking rules.

		<dt><dfn>anywhere</dfn>
		<dd>
			There is a [=soft wrap opportunity=] around every [=typographic character unit=],
			including around any punctuation character
			or [=preserved white spaces=],
			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 'word-break' property.
			[[UAX14]]
			The different wrapping opportunities must not be prioritized.
			Hyphenation is not applied.

			<wpt>
			line-break/line-break-anywhere-001.html
			line-break/line-break-anywhere-002.html
			line-break/line-break-anywhere-003.html
			line-break/line-break-anywhere-004.html
			line-break/line-break-anywhere-005.html
			line-break/line-break-anywhere-006.html
			line-break/line-break-anywhere-007.html
			line-break/line-break-anywhere-008.html
			line-break/line-break-anywhere-009.html
			line-break/line-break-anywhere-010.html
			line-break/line-break-anywhere-011.html
			line-break/line-break-anywhere-012.html
			line-break/line-break-anywhere-013.html
			line-break/line-break-anywhere-014.html
			line-break/line-break-anywhere-015.html
			line-break/line-break-anywhere-016.html
			line-break/line-break-anywhere-017.html
			line-break/line-break-anywhere-and-white-space-001.html
			line-break/line-break-anywhere-and-white-space-002.html
			line-break/line-break-anywhere-and-white-space-003.html
			line-break/line-break-anywhere-and-white-space-004.html
			line-break/line-break-anywhere-and-white-space-005.html
			line-break/line-break-anywhere-and-white-space-006.html
			line-break/line-break-anywhere-and-white-space-007.html
			line-break/line-break-anywhere-and-white-space-008.html
			line-break/line-break-anywhere-and-white-space-009.html
			line-break/line-break-anywhere-and-white-space-009.html
			line-break/line-break-anywhere-overrides-uax-behavior-001.html
			line-break/line-break-anywhere-overrides-uax-behavior-002.html
			line-break/line-break-anywhere-overrides-uax-behavior-003.html
			line-break/line-break-anywhere-overrides-uax-behavior-004.html
			line-break/line-break-anywhere-overrides-uax-behavior-005.html
			line-break/line-break-anywhere-overrides-uax-behavior-006.html
			line-break/line-break-anywhere-overrides-uax-behavior-007.html
			line-break/line-break-anywhere-overrides-uax-behavior-008.html
			line-break/line-break-anywhere-overrides-uax-behavior-009.html
			line-break/line-break-anywhere-overrides-uax-behavior-010.html
			line-break/line-break-anywhere-overrides-uax-behavior-011.html
			line-break/line-break-anywhere-overrides-uax-behavior-012.html
			line-break/line-break-anywhere-overrides-uax-behavior-013.html
			line-break/line-break-anywhere-overrides-uax-behavior-014.html
			line-break/line-break-anywhere-overrides-uax-behavior-015.html
			line-break/line-break-anywhere-overrides-uax-behavior-016.html
			line-break/line-break-shaping-001.html
			white-space/break-spaces-before-first-char-007.html
			white-space/break-spaces-before-first-char-011.html
			white-space/break-spaces-before-first-ideographic-char-007.html
			white-space/break-spaces-before-first-ideographic-char-011.html
			</wpt>

			Note: This value triggers the line breaking rules typically seen in terminals.

			<div class=note>
				Note: ''line-break/anywhere'' only allows [=preserved white spaces=]
				at the end of the line
				to be wrapped to the next line
				when 'white-space' is set to ''white-space/break-spaces'',
				because in other cases:

				<ul>
					<li>
						[=preserved white space=] at the end/start of the line is discarded
						(''white-space/normal'', ''white-space/pre-line'')

					<li>
						wrapping is forbidden altogether (''white-space/nowrap'', ''pre'')

					<li>
						the [=preserved white space=] [=hang=] (''pre-wrap'').
				</ul>

				When it does have an effect on [=preserved white space=],
				with ''white-space: break-spaces'',
				it allows breaking before the first space of a sequence,
				which ''break-spaces'' on its own does not.
			</div>

			<wpt>
			line-break/line-break-anywhere-005.html
			white-space/break-spaces-before-first-char-007.html
			white-space/break-spaces-before-first-char-008.html
			white-space/break-spaces-before-first-char-009.html
			white-space/break-spaces-before-first-char-010.html
			white-space/break-spaces-before-first-ideographic-char-007.html
			white-space/break-spaces-before-first-ideographic-char-008.html
			white-space/break-spaces-before-first-ideographic-char-009.html
			white-space/break-spaces-before-first-ideographic-char-010.html
			</wpt>
	</dl>

	CSS distinguishes between four levels of strictness
	in the rules for text wrapping.
	The precise set of rules in effect for each of
	''line-break/loose'',
	''line-break/normal'',
	and ''line-break/strict''
	is up to the UA
	and should follow language conventions.
	However, for these three keywords, this specification does require that:

	<ul>
		<li>
			The following breaks are allowed for ''line-break/normal''
			and ''loose'' line breaking
			if the [=writing system=] is <a for=writing-system>Chinese</a>
			or <a for=writing-system>Japanese</a>,
			and are otherwise forbidden:

			<ul>
				<li>
					breaks before certain CJK hyphen-like characters:<br>
					&#x301C;&nbsp;U+301C,
					&#x30A0;&nbsp;U+30A0

					<wpt>
					line-break/line-break-loose-013.xht
					line-break/line-break-normal-013.xht
					line-break/line-break-strict-013.xht
					i18n/ja/css-text-line-break-ja-hyphens-loose.html
					i18n/ja/css-text-line-break-ja-hyphens-normal.html
					i18n/ja/css-text-line-break-ja-hyphens-strict.html
					i18n/zh/css-text-line-break-zh-hyphens-loose.html
					i18n/zh/css-text-line-break-zh-hyphens-normal.html
					i18n/zh/css-text-line-break-zh-hyphens-strict.html
					i18n/other-lang/css-text-line-break-de-hyphens-loose.html
					i18n/other-lang/css-text-line-break-de-hyphens-normal.html
					i18n/other-lang/css-text-line-break-de-hyphens-strict.html
					i18n/unknown-lang/css-text-line-break-hyphens-loose.html
					i18n/unknown-lang/css-text-line-break-hyphens-normal.html
					i18n/unknown-lang/css-text-line-break-hyphens-strict.html
					writing-system/writing-system-line-break-001.html
					</wpt>
			</ul>
		<li>
			The following breaks are allowed for ''loose'' line breaking
			if the preceding character
			belongs to the Unicode line breaking class <code>ID</code>
			[[!UAX14]]
			(including when the preceding character
			is treated as <code>ID</code>
			due to ''word-break: break-all''),
			and are otherwise forbidden:

			<ul>
				<li>
					breaks before hyphens:<br>
					&#x2010;&nbsp;U+2010,  &#x2013;&nbsp;U+2013

					<wpt>
					line-break/line-break-loose-hyphens-001.html
					line-break/line-break-normal-hyphens-001.html
					line-break/line-break-strict-hyphens-001.html
					line-break/line-break-loose-hyphens-002.html
					line-break/line-break-normal-hyphens-002.html
					line-break/line-break-strict-hyphens-002.html
					line-break/line-break-loose-hyphens-003.html
					line-break/line-break-normal-hyphens-003.html
					line-break/line-break-strict-hyphens-003.html
					</wpt>
			</ul>
		<li>
			The following breaks are forbidden for ''line-break/normal''
			and ''strict'' line breaking
			and allowed in ''loose'':

			<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>.
					[[!UAX14]]

					<wpt>
					line-break/line-break-loose-011.xht
					line-break/line-break-loose-012.xht
					line-break/line-break-normal-011.xht
					line-break/line-break-normal-012.xht
					line-break/line-break-strict-011.xht
					line-break/line-break-strict-012.xht
					i18n/ja/css-text-line-break-ja-cj-loose.html
					i18n/ja/css-text-line-break-ja-cj-normal.html
					i18n/ja/css-text-line-break-ja-cj-strict.html
					i18n/zh/css-text-line-break-zh-cj-loose.html
					i18n/zh/css-text-line-break-zh-cj-normal.html
					i18n/zh/css-text-line-break-zh-cj-strict.html
					i18n/other-lang/css-text-line-break-de-cj-loose.html
					i18n/other-lang/css-text-line-break-de-cj-normal.html
					i18n/other-lang/css-text-line-break-de-cj-strict.html
					i18n/unknown-lang/css-text-line-break-cj-loose.html
					i18n/unknown-lang/css-text-line-break-cj-normal.html
					i18n/unknown-lang/css-text-line-break-cj-strict.html
					</wpt>

				<li>
					breaks before iteration marks:<br>
					&#x3005;&nbsp;U+3005,  &#x303B;&nbsp;U+303B,  &#x309D;&nbsp;U+309D,
					&#x309E;&nbsp;U+309E,  &#x30FD;&nbsp;U+30FD,  &#x30FE;&nbsp;U+30FE

					<wpt>
					line-break/line-break-loose-014.xht
					line-break/line-break-normal-014.xht
					line-break/line-break-strict-014.xht
					i18n/ja/css-text-line-break-ja-iteration-loose.html
					i18n/ja/css-text-line-break-ja-iteration-normal.html
					i18n/ja/css-text-line-break-ja-iteration-strict.html
					i18n/zh/css-text-line-break-zh-iteration-loose.html
					i18n/zh/css-text-line-break-zh-iteration-normal.html
					i18n/zh/css-text-line-break-zh-iteration-strict.html
					i18n/other-lang/css-text-line-break-de-iteration-loose.html
					i18n/other-lang/css-text-line-break-de-iteration-normal.html
					i18n/other-lang/css-text-line-break-de-iteration-strict.html
					i18n/unknown-lang/css-text-line-break-iteration-loose.html
					i18n/unknown-lang/css-text-line-break-iteration-normal.html
					i18n/unknown-lang/css-text-line-break-iteration-strict.html
					</wpt>

				<li>
					breaks between inseparable characters
					(such as &#x2025;&nbsp;U+2025, &#x2026;&nbsp;U+2026)
					i.e. characters from the Unicode line breaking class <code>IN</code>.
					[[!UAX14]]

					<wpt>
					line-break/line-break-loose-015.xht
					line-break/line-break-normal-015a.xht
					line-break/line-break-normal-015b.xht
					line-break/line-break-strict-015a.xht
					line-break/line-break-strict-015b.xht
					i18n/ja/css-text-line-break-ja-in-loose.html
					i18n/ja/css-text-line-break-ja-in-normal.html
					i18n/ja/css-text-line-break-ja-in-strict.html
					i18n/zh/css-text-line-break-zh-in-loose.html
					i18n/zh/css-text-line-break-zh-in-normal.html
					i18n/zh/css-text-line-break-zh-in-strict.html
					i18n/other-lang/css-text-line-break-de-in-loose.html
					i18n/other-lang/css-text-line-break-de-in-normal.html
					i18n/other-lang/css-text-line-break-de-in-strict.html
					i18n/unknown-lang/css-text-line-break-in-loose.html
					i18n/unknown-lang/css-text-line-break-in-normal.html
					i18n/unknown-lang/css-text-line-break-in-strict.html
					</wpt>
			</ul>
		<li>
			The following breaks are allowed for ''loose''
			if the [=writing system=] is <a for=writing-system>Chinese</a>
			or <a for=writing-system>Japanese</a>
			and are otherwise forbidden:

			<ul>
				<li>
					breaks before certain centered punctuation marks:<br>
					&#x30FB;&nbsp;U+30FB,
					&#xFF1A;&nbsp;U+FF1A,  &#xFF1B;&nbsp;U+FF1B,  &#xFF65;&nbsp;U+FF65,
					&#x203C;&nbsp;U+203C,
					&#x2047;&nbsp;U+2047,  &#x2048;&nbsp;U+2048,  &#x2049;&nbsp;U+2049,
					&#xFF01;&nbsp;U+FF01,  &#xFF1F;&nbsp;U+FF1F

					<wpt>
					line-break/line-break-loose-016a.xht
					line-break/line-break-loose-016b.xht
					line-break/line-break-normal-016a.xht
					line-break/line-break-normal-016b.xht
					line-break/line-break-strict-016a.xht
					line-break/line-break-strict-016b.xht
					i18n/ja/css-text-line-break-ja-cpm-loose.html
					i18n/ja/css-text-line-break-ja-cpm-normal.html
					i18n/ja/css-text-line-break-ja-cpm-strict.html
					i18n/zh/css-text-line-break-zh-cpm-loose.html
					i18n/zh/css-text-line-break-zh-cpm-normal.html
					i18n/zh/css-text-line-break-zh-cpm-strict.html
					i18n/other-lang/css-text-line-break-de-cpm-loose.html
					i18n/other-lang/css-text-line-break-de-cpm-normal.html
					i18n/other-lang/css-text-line-break-de-cpm-strict.html
					i18n/unknown-lang/css-text-line-break-cpm-loose.html
					i18n/unknown-lang/css-text-line-break-cpm-normal.html
					i18n/unknown-lang/css-text-line-break-cpm-strict.html
					writing-system/writing-system-line-break-002.html
					</wpt>

				<li>
					breaks before suffixes:<br>
					Characters with the Unicode line breaking class <code>PO</code>
					[[!UAX14]]
					and the [=East Asian Width property=]
					[[!UAX11]]
					<code>Ambiguous</code>,
					<code>Fullwidth</code>,
					or <code>Wide</code>.

					<wpt>
					line-break/line-break-loose-017a.xht
					line-break/line-break-loose-017b.xht
					line-break/line-break-normal-017a.xht
					line-break/line-break-normal-017b.xht
					line-break/line-break-strict-017a.xht
					line-break/line-break-strict-017b.xht
					i18n/ja/css-text-line-break-ja-po-loose.html
					i18n/ja/css-text-line-break-ja-po-normal.html
					i18n/ja/css-text-line-break-ja-po-strict.html
					i18n/zh/css-text-line-break-zh-po-loose.html
					i18n/zh/css-text-line-break-zh-po-normal.html
					i18n/zh/css-text-line-break-zh-po-strict.html
					i18n/other-lang/css-text-line-break-de-po-loose.html
					i18n/other-lang/css-text-line-break-de-po-normal.html
					i18n/other-lang/css-text-line-break-de-po-strict.html
					i18n/unknown-lang/css-text-line-break-po-loose.html
					i18n/unknown-lang/css-text-line-break-po-normal.html
					i18n/unknown-lang/css-text-line-break-po-strict.html
					</wpt>

				<li>
					breaks after prefixes:<br>
					Characters with the Unicode line breaking class <code>PR</code>
					[[!UAX14]]
					and the [=East Asian Width property=]
					[[!UAX11]]
					<code>Ambiguous</code>,
					<code>Fullwidth</code>,
					or <code>Wide</code>.

					<wpt>
					line-break/line-break-loose-018.xht
					line-break/line-break-normal-018.xht
					line-break/line-break-strict-018.xht
					i18n/ja/css-text-line-break-ja-pr-loose.html
					i18n/ja/css-text-line-break-ja-pr-normal.html
					i18n/ja/css-text-line-break-ja-pr-strict.html
					i18n/zh/css-text-line-break-zh-pr-loose.html
					i18n/zh/css-text-line-break-zh-pr-normal.html
					i18n/zh/css-text-line-break-zh-pr-strict.html
					i18n/other-lang/css-text-line-break-de-pr-loose.html
					i18n/other-lang/css-text-line-break-de-pr-normal.html
					i18n/other-lang/css-text-line-break-de-pr-strict.html
					i18n/unknown-lang/css-text-line-break-pr-loose.html
					i18n/unknown-lang/css-text-line-break-pr-normal.html
					i18n/unknown-lang/css-text-line-break-pr-strict.html
					</wpt>
			</ul>
	</ul>

	Note: The requirements listed above
	only create distinctions in CJK text.
	In an implementation that matches only the rules above,
	and no additional rules,
	'line-break' would only affect CJK code points
	unless the writing system is tagged as
	<a for=writing-system>Chinese</a> or <a for=writing-system>Japanese</a>.
	Future levels may add additional specific rules
	for other writing systems and languages
	as their requirements become known.

	<div class="example">
		As UAs can add additional distinctions
		between ''line-break/strict''/''line-break/normal''/''line-break/loose'' 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 ''line-break/strict'' mode
		(e.g. breaking ตัวอย่างการเขียนภาษาไทย as ตัวอย่าง·การเขียน·ภาษาไทย)
		while allowing more breaks in ''line-break/loose''
		(ตัวอย่าง·การ·เขียน·ภาษา·ไทย).
	</div>

	Note: 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.

	<div class=note>
		Note: While user agents can refer to [[!UAX14]] as a starting point
		for their line-breaking implementation,
		the following deviations could be desirable
		for maximum interoperability with existing implementations:

		- Not introducing a line break opportunity between
			U+0021 (Exclamation Mark, <code>!</code>) and
			a letter ([=Unicode general category=] <code>L</code>).
			This prevents a break in the string “!important”.
		- Not introducing a line break opportunity between
			U+002F (Solidus, <code>/</code>) and
			a letter ([=Unicode general category=] <code>L</code>).
			This prevents a break in dates such as “23/Jan/2024”.
		- Not introducing a line break opportunity between
			U+007C (Vertical Line, <code>|</code>) and
			a letter ([=Unicode general category=] <code>L</code>).
		- Not introducing a line break opportunity between
			U+002D (Hyphen-Minus `-`) and
			a digit ([=Unicode general category=] <code>Nd</code>)
			if the codepoint prior to the hyphen was _not_ a letter or digit
			([=Unicode general category=] <code>L</code> or <code>Nd</code>).
			This prevents breaking after the minus sign before a number
			such as in “-13”
			whilst allowing breaks after the hyphen in “ABCD-1234” and “1234-5678”
			which may appear in long URLs, for example.
	</div>

<h3 id="hyphenation">
Hyphenation: Morphological Breaking Within Words</h3>

<h4 id="hyphens-property" caniuse="css-hyphens">
Hyphenation Control: the 'hyphens' property</h4>

	<wpt title="This section has partial test coverage.

		Missing tests:
		* Applies to text
		* “Automatic hyphenation opportunities within a word must be ignored if the word contains a conditional hyphen (shy or U+00AD), 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.”"></wpt>

	<dfn id=hyphenate lt="hyphenation|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.

	<wpt>
	hyphens/hyphens-character.html
	hyphens/hyphens-vertical-001.html
	hyphens/hyphens-vertical-002.html
	</wpt>

	<div class=example>
		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&#x2010;
				<td>broken
			<tr lang=nl>
				<th lang=en>Dutch
				<td>cafeetje
				<td>café&#x2010;
				<td>tje
			<tr lang=hu>
				<th lang=en>Hungarian
				<td>Összeg
				<td>Ösz&#x2010;
				<td>szeg
			<tr lang="zh-Latn-pinyin">
				<th lang=en rowspan=2>Mandarin
				<td>tú’àn
				<td>tú&#x2010;
				<td>àn
			<tr lang="zh-Latn-pinyin">
				<td>àizēng&#x2010;fēnmíng
				<td>àizēng&#x2010;
				<td>&#x2010;fēnmíng
			<tr lang=ug>
				<th lang=en>Uyghur
				<td dir=rtl>
					<img src="images/uyghur-unbroken.svg"
					     height=304
					     style="height: 1.5em; vertical-align: -13%"
					     alt=" [isolated DAL + isolated ALEF + initial MEEM +
					          medial YEH  + final DAL +
					          isolated ALEF MAKSURA]">
				<td dir=rtl>
					<img src="images/uyghur-hyphenate-joined-before.svg"
					     height=304
					     style="height: 1.5em; vertical-align: -13%"
					     alt="[isolated DAL + isolated ALEF + initial MEEM +
					          final YEH + hyphen ]">
				<td dir=rtl>
					<img src="images/uyghur-hyphenate-joined-after.svg"
					     height=304
					     style="height: 1.5em; vertical-align: -13%"
					     alt="[ isolated DAL + isolated ALEF MAKSURA]">
			<tr lang=cr>
				<th lang=en>Cree
				<td>
					<img src="images/cree.svg"
					     height=524
					     style="height: 1em; vertical-align: baseline;"
					     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)">
				<td>
					<img src="images/cree-before.svg"
					     height=524
					     style="height: 1em; vertical-align: baseline;"
					     alt="[ᑲᓯᑕᓂ᐀]
					          (CANADIAN SYLLABICS KA +
					          CANADIAN SYLLABICS SI +
					          CANADIAN SYLLABICS TA +
					          CANADIAN SYLLABICS NI +
					          CANADIAN SYLLABICS HYPHEN)">
				<td>
					<img src="images/cree-after.svg"
					     height=524
					     style="height: 1em; vertical-align: baseline;"
					     alt="[ᐘᓂᓂᐠ]
					          (CANADIAN SYLLABICS WEST-CREE WA +
					          CANADIAN SYLLABICS NI +
					          CANADIAN SYLLABICS NI +
					          CANADIAN SYLLABICS FINAL GRAVE)">
		</table>
	</div>

	<wpt>
	hyphens/i18n/hyphens-i18n-auto-001.html
	hyphens/i18n/hyphens-i18n-auto-002.html
	hyphens/i18n/hyphens-i18n-auto-003.html
	hyphens/i18n/hyphens-i18n-auto-004.html
	hyphens/i18n/hyphens-i18n-auto-005.html
	hyphens/i18n/hyphens-i18n-auto-006.html
	</wpt>

	Hyphenation occurs
	when the line breaks at a valid <dfn>hyphenation opportunity</dfn>,
	which is a type of [=soft wrap opportunity=]
	that exists within a word where [=hyphenation=] is allowed.
	In CSS [=hyphenation opportunities=] are controlled
	with the 'hyphens' property.
	CSS Text Level 3 does not define the exact rules for [=hyphenation=];
	however UAs are strongly encouraged
	to optimize their choice of break points
	and to chose language-appropriate hyphenation points.

	<wpt>
	hyphens/hyphens-overflow-001.html
	</wpt>

	Note: The [=soft wrap opportunity=] introduced by
	the U+002D - HYPHEN-MINUS character
	or the U+2010 ‐ HYPHEN character
	is not a [=hyphenation opportunity=],
	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.

	Hyphenation opportunities <em>are</em> considered when calculating
	[=min-content size|min-content intrinsic sizes=].

	<wpt>
	hyphens/hyphens-auto-min-content.html
	</wpt>

	Note: This allows tables to hyphenate their contents
	instead of overflowing their containing block,
	which is particularly important in long-word languages like German.

	<!--
		See https://bugzilla.mozilla.org/show_bug.cgi?id=418975
	-->

	<pre class="propdef">
	Name: hyphens
	Value: none | manual | auto
	Initial: manual
	Applies to: text
	Inherited: yes
	Canonical order: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/hyphens-valid.html
	parsing/hyphens-invalid.html
	parsing/hyphens-computed.html
	hyphens/hyphens-auto-inline-010.html
	hyphens/hyphens-manual-inline-010.html
	hyphens/hyphens-manual-inline-011.html
	hyphens/hyphens-manual-inline-012.html
	animations/hyphen-no-interpolation.html
	</wpt>

	This property controls whether [=hyphenation=] is allowed to create more
	[=soft wrap opportunities=] within a line of text.
	Values have the following meanings:

	<dl dfn-for=hyphens dfn-type=value>
		<dt><dfn>none</dfn>
		<dd>
			Words are not hyphenated,
			even if characters inside the word
			explicitly define [=hyphenation opportunities=].

			Note: This does not suppress the existing [=soft wrap opportunities=]
			introduced by always visible characters such as
			U+002D - HYPHEN-MINUS
			or U+2010 ‐ HYPHEN.

			<wpt>
			hyphens/hyphens-none-011.html
			hyphens/hyphens-none-012.html
			hyphens/hyphens-none-013.html
			hyphens/hyphens-none-014.html
			hyphens/hyphens-none-015.html
			hyphens/hyphens-none-shy-on-2nd-line-001.html
			</wpt>

		<dt><dfn>manual</dfn>
		<dd>
			Words are only hyphenated where there are characters inside the word
			that explicitly suggest [=hyphenation opportunities=].
			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.

			<wpt>
			hyphens/hyphens-overflow-001.html
			hyphens/hyphens-manual-010.html
			hyphens/hyphens-manual-011.html
			hyphens/hyphens-manual-012.html
			hyphens/hyphens-manual-013.html
			hyphens/hyphens-out-of-flow-001.html
			hyphens/hyphens-shaping-001.html
			hyphens/hyphens-shaping-002.html
			hyphens/hyphens-span-001.html
			hyphens/shy-styling-001.html
			hyphens/i18n/hyphens-i18n-manual-001.html
			hyphens/i18n/hyphens-i18n-manual-002.html
			hyphens/i18n/hyphens-i18n-manual-003.html
			hyphens/i18n/hyphens-i18n-manual-004.html
			hyphens/i18n/hyphens-i18n-manual-005.html
			hyphens/hyphens-vertical-001.html
			hyphens/hyphens-vertical-002.html
			hyphens/hyphens-vertical-003.html
			hyphens/hyphens-vertical-004.html
			hyphens/hyphens-vs-float-clearance-002.html
			</wpt>

			<div class="example">
				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.
				[[!UAX14]]
				In HTML,
				&amp;shy; represents the soft hyphen character,
				which suggests a hyphenation opportunity.

				<xmp highlight=html>ex&shy;ample</xmp>
			</div>

		<dt><dfn>auto</dfn>
		<dd>
			Words may be broken at [=hyphenation opportunities=]
			determined automatically by a language-appropriate hyphenation resource
			in addition to those indicated explicitly by a conditional hyphen.
			Automatic [=hyphenation opportunities=] elsewhere within a word must be ignored
			if the word contains a conditional hyphen
			(&amp;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.

			<wpt>
			hyphens/hyphens-auto-control.html
			</wpt>

			<wpt>
			hyphens/hyphens-auto-001.html
			hyphens/hyphens-auto-002.html
			hyphens/hyphens-auto-003.html
			hyphens/hyphens-auto-004.html
			hyphens/hyphens-auto-005.html
			hyphens/hyphens-auto-010.html
			hyphens/hyphens-out-of-flow-002.html
			hyphens/hyphens-span-002.html
			hyphens/hyphens-auto-and-contenteditable-crash.html
			hyphens/hyphens-auto-last-word-001.html
			hyphens/hyphens-punctuation-001.html
			hyphens/hyphens-vs-float-clearance-001.html
			</wpt>
	</dl>

	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>content language</a> is known
	and for which it has an appropriate hyphenation resource.

	<wpt>
	hyphens/hyphens-auto-001.html
	</wpt>

	<div class="advisement">
		Authors should correctly tag their content’s [=content language|language=]
		(e.g. using the HTML <code>lang</code> attribute
		or XML <code>xml:lang</code> attribute)
		in order to obtain correct automatic hyphenation.
	</div>

	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.)

	For the purpose of the 'hyphens' property,
	what constitutes a “word” is UA-dependent.
	However, inline element boundaries
	and [=out-of-flow=] elements
	must be ignored when determining word boundaries.

	<wpt>
	hyphens/hyphens-span-001.html
	hyphens/hyphens-span-002.html
	hyphens/hyphens-out-of-flow-001.html
	hyphens/hyphens-out-of-flow-002.html
	</wpt>

	Any glyphs shown due to hyphenation
	at a [=hyphenation opportunity=]
	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.

	<wpt>
	hyphens/shy-styling-001.html
	</wpt>

	Note: When shaping scripts such as Arabic are allowed to break within words
	due to hyphenation,
	the characters are still shaped
	as if the word were <a href=#word-break-shaping>not broken</a>.

	<wpt>
	hyphens/hyphens-shaping-001.html
	hyphens/hyphens-shaping-002.html
	</wpt>

	<div class="example">
		For example, if the Uyghur word &ldquo;داميدى&rdquo;
		were hyphenated, it would appear as
		<img src="images/uyghur-hyphenate-joined.svg"
		     height=608
		     style="height: 3.5em; background: white;"
		     alt="[isolated DAL + isolated ALEF + initial MEEM +
		          medial YEH + hyphen + line-break + final DAL +
		          isolated ALEF MAKSURA]">
		not as
		<img src="images/uyghur-hyphenate-unjoined.svg"
		     height=608
		     style="height: 3.5em; background: white;"
		     alt="[isolated DAL + isolated ALEF + initial MEEM +
		          final YEH + hyphen + line-break + isolated DAL +
		          isolated ALEF MAKSURA]">
		.
	</div>

<h4 id="hyphenate-character">
Hyphens: the 'hyphenate-character' property</h4>

	<wpt title="
		This section has partial coverage.

		Missing tests:
		* applies to text
		* inheritance
		* the UA must insert the string according to the typographic conventions of the content language

		Likely untestable:
		* when the UA truncates the string (which it may not do),
			it must not truncate part of a typographic character unit."></wpt>

	<pre class="propdef">
	Name: hyphenate-character
	Value: auto | <<string>>
	Initial: auto
	Applies to: text
	Inherited: yes
	Percentages: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
		animations/hyphen-no-interpolation.html
		parsing/hyphenate-character-computed.html
		parsing/hyphenate-character-invalid.html
		parsing/hyphenate-character-valid.html
	</wpt>

	This property specifies the string that is shown
	between parts of hyphenated words.
	Values have the following meanings:

	<dl dfn-for=hyphenate-character dfn-type=value>
		<dt><dfn>auto</dfn>
		<dd>
			Specifies that the user agent should find an appropriate string
			based on the <a>content language</a>’s typographic conventions,
			possibly from the same source as the hyphenation dictionary.

		<dt><dfn><<string>></dfn>
		<dd>
			Specifies the string that appears
			at the hyphenation break when hyphenating.
			(The position of this string is not affected:
			the UA must insert the string
			according to the typographic conventions of the [=content language=],
			defaulting to immediately before the hyphenation break.)
			The UA <em>may</em> truncate the <a>used value</a>
			to a limited number of <a>typographic character units</a>;
			it must not truncate only part of a <a>typographic character unit</a>.

			<wpt>
				hyphens/hyphenate-character-003.html
				hyphens/hyphenate-character-004.html
				hyphens/hyphenate-character-005.html
				hyphens/hyphenate-limit-chars-001.html
				hyphens/hyphens-vertical-003.html
				hyphens/hyphens-vertical-004.html
			</wpt>

			Note: Specifying the empty string ''""'' is valid,
			and causes the UA to break at [=hyphenation opportunities=]
			without inserting a visible hyphenation character.

			<wpt>
				hyphens/hyphenate-character-001.html
				hyphens/hyphenate-character-002.html
			</wpt>
	</dl>

	<div class="example">
		The hyphen character (U+2010) is most typically used
		to indicate that a word has been split.
		However, 'hyphenate-character' can be used
		to specify a different type of hyphen when necessary.
		<pre>
			[lang]:lang(ojs) { hyphenate-character: "᐀" /* CANADIAN SYLLABICS HYPHEN (U+1400) */ }
		</pre>
	</div>

	Note: Both hyphens triggered by automatic hyphenation
	and hyphens triggered by soft hyphens
	are rendered according to 'hyphenate-character'.

<h4 id="hyphenate-size-limits">
Hyphenation Size Limit: the 'hyphenate-limit-zone' property</h4>

	<wpt title="This section lacks tests."></wpt>

	<pre class="propdef">
	Name: hyphenate-limit-zone
	Value: <<length-percentage>>
	Initial: 0
	Applies to: [=block containers=]
	Inherited: yes
	Percentages: refers to length of the line box
	Computed value: computed <<length-percentage>> value
	Animation type: by computed value type
	</pre>

	<p class="issue">Is 'hyphenate-limit-zone' a good name? Comments/suggestions?

	This property specifies the maximum amount of unfilled space
	(before justification)
	that may be left in the line box before hyphenation is triggered
	to pull part of a word from the next line back up into the current line.

<h4 id="hyphenate-char-limits">
Hyphenation Character Limits: the 'hyphenate-limit-chars' property</h4>

	<wpt title="
		This section has limited coverage.

		Missing tests:
		* applies to text
		* inherited
		* If the third value is missing, it is the same as the second.
		* tests of the two-value syntax (but not just syntax tests, check that it has an effect)
		* tests of the 3 value syntax with auto in positions other than first (but not just syntax tests, check that it has an effect)"></wpt>

	<pre class="propdef">
	Name: hyphenate-limit-chars
	Value: [ auto | <<integer>> ]{1,3}
	Initial: auto
	Applies to: text
	Inherited: yes
	Percentages: n/a
	Computed value: three values, each either the ''hyphenate-limit-chars/auto'' keyword or an integer
	Animation type: by computed value type
	</pre>

	<wpt>
		animations/hyphen-no-interpolation.html
		animations/hyphen-limit-chars-interpolation.html
		parsing/hyphenate-limit-chars-computed.html
		parsing/hyphenate-limit-chars-invalid.html
		parsing/hyphenate-limit-chars-valid.html
	</wpt>

	This property specifies the minimum number of characters
	in a hyphenated word.
	If the word does not meet the required minimum number of characters
	in the word / before the hyphen / after the hyphen,
	then the word must not be hyphenated.
	Nonspacing combining marks (Unicode General Category Mn)
	and intra-word punctuation (Unicode General Category P*)
	do not count towards the minimum.

	If three values are specified,
	the first value is the required minimum for the total characters in a word,
	the second value is the minimum for characters before the hyphenation point,
	and the third value is the minimum for characters after the hyphenation point.
	If the third value is missing, it is the same as the second.
	If the second value is missing, then it is ''hyphenate-limit-chars/auto''.
	The <dfn dfn-type=value dfn-for=hyphenate-limit-chars>auto</dfn> value means that
	the UA chooses a value that adapts to the current layout.

	<wpt>
		hyphens/hyphenate-limit-chars-001.html
	</wpt>

	Note: Unless the UA is able to calculate a better value,
	it is suggested that ''hyphenate-limit-chars/auto'' means
	2 for before and after, and 5 for the word total.

	<div class="example">
		In the example below,
		the minimum size of a hyphenated word is left to the UA
		(which means it may vary depending on the language,
		the length of the line, or other factors),
		but the minimum number of characters
		before and after the hyphenation point
		is set to 3.
		<pre>
			p { hyphenate-limit-chars: auto 3; }
		</pre>
	</div>

<h4 id="hyphenate-line-limits">
Hyphenation Line Limits: the 'hyphenate-limit-lines' and 'hyphenate-limit-last' properties</h4>

	<wpt title="This section lacks tests."></wpt>

	<pre class="propdef">
	Name: hyphenate-limit-lines
	Value: no-limit | <<integer>>
	Initial: no-limit
	Applies to: block containers
	Inherited: yes
	Percentages: n/a
	Computed value: specified keyword or integer
	Animation type: by computed value type
	</pre>

	This property indicates the maximum number of
	successive hyphenated lines in an element.
	The ''no-limit'' value means that there is no limit.

	In some cases, user agents may not be able to honor the specified value.
	(See overflow-wrap.)
	It is not defined whether hyphenation introduced by such emergency breaking
	influences nearby hyphenation points.

	<pre class="propdef">
	Name: hyphenate-limit-last
	Value: none | always | column | page | spread
	Initial: none
	Applies to: [=block containers=]
	Inherited: yes
	Percentages: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>


	This property indicates hyphenation behavior at the end
	of elements, column, pages, and spreads.
	A spread is a set of two pages
	that are visible to the reader at the same time.
	Values have the following meanings:

	<dl dfn-for=hyphenate-limit-lines dfn-type=value>
		<dt><dfn>none</dfn>
		<dd>
			No restrictions imposed.

		<dt><dfn>always</dfn>
		<dd>
			The last full line of the element,
			or the last line before any column, page, or spread break inside the element
			should not be hyphenated.

		<dt><dfn>column</dfn>
		<dd>
			The last line before any column, page, or spread break inside the element
			should not be hyphenated.

		<dt><dfn>page</dfn>
		<dd>
			The last line before page or spread break inside the element
			should not be hyphenated.

		<dt><dfn>spread</dfn>
		<dd>
			The last line before any spread break inside the element
			should not be hyphenated.
	</dl>

	<div class=example>
		<pre>
			p { hyphenate-limit-last: always }
			div.chapter {	hyphenate-limit-last: spread }
		</pre>
	</div>

	<div class=example>

		A paragraph may be formatted like this
		when ''hyphenate-limit-last: none'' is set:
		<pre>
			This is just a
			simple example
			to show Antarc-
			tica.
		</pre>

		With 'hyphenate-limit-last: always' one would get:

		<pre>
			This is just a
			simple example
			to        show
			Antarctica.
		</pre>
	</div>

<h3 id="overflow-wrap-property" caniuse="wordwrap" oldids="overflow-wrap">
Overflow Wrapping: the 'overflow-wrap' ('word-wrap') property</h3>

	<wpt title="
		This section has fairly good test coverage.

		Missing tests:
		* Applies to text
		* in the case of auto-phrase, opportunities brought by anywhere only kick in after those from normal
		* No test of Animation type"></wpt>

	<pre class="propdef">
	Name: overflow-wrap
	Value: normal | break-word | anywhere
	Initial: normal
	Applies to: text
	Inherited: yes
	Canonical order: n/a
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/overflow-wrap-invalid.html
	parsing/overflow-wrap-valid.html
	parsing/overflow-wrap-computed.html
	parsing/word-wrap-invalid.html
	parsing/word-wrap-valid.html
	parsing/word-wrap-computed.html
	overflow-wrap/overflow-wrap-anywhere-span-001.html
	overflow-wrap/overflow-wrap-anywhere-span-002.html
	overflow-wrap/overflow-wrap-break-word-span-001.html
	overflow-wrap/overflow-wrap-break-word-span-002.html
	overflow-wrap/overflow-wrap-break-word-long-crash.html
	overflow-wrap/overflow-wrap-break-word-white-space-crash.html
	overflow-wrap/overflow-wrap-break-word-white-space-crash-002.html
	overflow-wrap/overflow-wrap-anywhere-inline-002.tentative.html
	</wpt>

	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
	'white-space' allows [=wrapping=]. Possible values:

	<wpt>
	overflow-wrap/overflow-wrap-002.html
	</wpt>

	<dl dfn-for=overflow-wrap dfn-type=value>
		<dt><dfn>normal</dfn>
		<dd>
			Lines may break only at allowed break points.
			However,
			the restrictions introduced by ''word-break: keep-all'' may be relaxed
			to match ''word-break: normal''
			if there are no otherwise-acceptable break points in the line.

			<wpt>
			overflow-wrap/overflow-wrap-004.html
			overflow-wrap/overflow-wrap-normal-keep-all-001.html
			</wpt>

			Also, the restrictions introduced by ''word-break: auto-phrase''
			are relaxed
			if there are no otherwise-acceptable break points in the line:
			<ul>
				<li>
					If suppressing [=soft wrap opportunities=] within a particular phrase
					would cause that phrase to overflow even when placed on an otherwise empty line,
					the user agent must fall back
					to the same [=soft wrap opportunities=] as ''word-break/normal''
					within that phrase.

					<wpt>
						word-break/auto-phrase/word-break-auto-phrase-009.html
						word-break/auto-phrase/word-break-auto-phrase-overflow-001.html
					</wpt>

				<li>
					If that is not enough to prevent overflow,
					suppression of [=hyphenation opportunities=] must also be abandoned
					within each line that would overflow.

					<wpt>
						word-break/auto-phrase/word-break-auto-phrase-008.html
					</wpt>

				<li>
					As an intermediary measure,
					user agents may also detect multiple levels of phrases,
					choosing to shorter ones
					(possibly down to individual words)
					when longer ones would lead to overflow.
			</ul>

			The [=soft wrap opportunities=] obtained by relaxing the restrictions
			introduced by ''word-break: keep-all'' and ''word-break: auto-phrase''
			are <em>not</em> considered
			when calculating [=min-content size|min-content intrinsic sizes=].

		<dt><dfn>anywhere</dfn>
		<dd>
			An otherwise unbreakable sequence of [=characters=]
			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.
			[=Soft wrap opportunities=] introduced by ''overflow-wrap/anywhere''
			<em>are considered</em>
			when calculating [=min-content size|min-content intrinsic sizes=].

			<wpt>
			overflow-wrap/overflow-wrap-min-content-size-001.html
			overflow-wrap/overflow-wrap-min-content-size-002.html
			overflow-wrap/overflow-wrap-min-content-size-003.html
			overflow-wrap/overflow-wrap-anywhere-001.html
			overflow-wrap/overflow-wrap-anywhere-003.html
			overflow-wrap/overflow-wrap-anywhere-006.html
			overflow-wrap/overflow-wrap-anywhere-007.html
			overflow-wrap/overflow-wrap-anywhere-008.html
			overflow-wrap/overflow-wrap-anywhere-009.html
			overflow-wrap/overflow-wrap-anywhere-010.html
			overflow-wrap/overflow-wrap-anywhere-011.html
			overflow-wrap/overflow-wrap-anywhere-inline-001.html
			overflow-wrap/overflow-wrap-anywhere-inline-002.tentative.html
			overflow-wrap/overflow-wrap-anywhere-inline-003.tentative.html
			overflow-wrap/overflow-wrap-anywhere-inline-004.tentative.html
			overflow-wrap/overflow-wrap-anywhere-fit-content-001.html
			overflow-wrap/overflow-wrap-min-content-size-005.html
			overflow-wrap/overflow-wrap-min-content-size-007.html
			overflow-wrap/overflow-wrap-cluster-002.html
			overflow-wrap/overflow-wrap-shaping-002.html
			white-space/break-spaces-before-first-char-009.html
			white-space/break-spaces-before-first-char-013.html
			white-space/break-spaces-before-first-ideographic-char-009.html
			white-space/break-spaces-before-first-ideographic-char-013.html
			word-break/word-break-min-content-001.html
			word-break/word-break-min-content-002.html
			word-break/word-break-min-content-003.html
			word-break/word-break-min-content-004.html
			word-break/word-break-min-content-005.html
			word-break/word-break-min-content-006.html
			white-space/pre-wrap-009.html
			white-space/pre-wrap-010.html
			white-space/break-spaces-with-overflow-wrap-002.html
			white-space/break-spaces-with-overflow-wrap-004.html
			white-space/break-spaces-with-overflow-wrap-006.html
			white-space/break-spaces-with-overflow-wrap-008.html
			white-space/break-spaces-with-overflow-wrap-010.html
			white-space/text-wrap-balance-overflow-002.html
			</wpt>

			In the case of ''word-break: auto-phrase'',
			these additional [=soft wrap opportunities=] are only introduced
			if relaxing the restrictions introduced by ''word-break: auto-phrase''
			as described in ''overflow-wrap: normal''
			is insufficient to prevent overflow.

		<dt><dfn>break-word</dfn>
		<dd>
			As for ''overflow-wrap/anywhere''
			except that
			<a>soft wrap opportunities</a> introduced by ''overflow-wrap/break-word''
			are <em>not</em> considered
			when calculating [=min-content size|min-content intrinsic sizes=].

			<wpt>
			overflow-wrap/overflow-wrap-001.html
			overflow-wrap/overflow-wrap-break-word-001.html
			overflow-wrap/overflow-wrap-break-word-003.html
			overflow-wrap/overflow-wrap-break-word-008.html
			overflow-wrap/overflow-wrap-break-word-009.html
			overflow-wrap/overflow-wrap-break-word-010.html
			overflow-wrap/overflow-wrap-min-content-size-004.html
			overflow-wrap/overflow-wrap-min-content-size-006.html
			overflow-wrap/overflow-wrap-min-content-size-008.html
			overflow-wrap/overflow-wrap-break-word-fit-content-001.html
			overflow-wrap/overflow-wrap-cluster-001.html
			overflow-wrap/overflow-wrap-shaping-001.html
			white-space/break-spaces-before-first-char-008.html
			white-space/break-spaces-before-first-char-012.html
			white-space/break-spaces-before-first-ideographic-char-008.html
			white-space/break-spaces-before-first-ideographic-char-012.html
			overflow-wrap/overflow-wrap-break-word-keep-all-001.html
			white-space/break-spaces-with-overflow-wrap-001.html
			white-space/break-spaces-with-overflow-wrap-003.html
			white-space/break-spaces-with-overflow-wrap-005.html
			white-space/break-spaces-with-overflow-wrap-007.html
			white-space/break-spaces-with-overflow-wrap-009.html
			white-space/trailing-ideographic-space-013.html
			white-space/trailing-ideographic-space-014.html
			white-space/trailing-ideographic-space-015.html
			white-space/trailing-ideographic-space-016.html
			white-space/text-wrap-balance-overflow-001.html
			</wpt>
	</dl>

	Issue: Do we need to add a <code>none</code> value to 'overflow-wrap'
	to opt out of relaxing the ''keep-all'' and ''word-break/auto-phrase'' restrictions
	as allowed by ''overflow-wrap: normal''?

	For legacy reasons, UAs must treat <dfn property>word-wrap</dfn>
	as a [=legacy name alias=] of the 'overflow-wrap' property.

	<wpt>
	overflow-wrap/word-wrap-alias.html
	overflow-wrap/word-wrap-001.html
	overflow-wrap/word-wrap-002.html
	overflow-wrap/word-wrap-004.html
	</wpt>

<h3 id="line-break-details">
Line Breaking Details</h3>

	<wpt title="
		This section has partial test coverage.

		Missing tests:

		* For soft wrap opportunities 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.
		* Line breaking classes CM and SG must be honored

		Untestable(?):

		* UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints. […]"></wpt>

	When determining [=line breaks=]:

	<ul>
		<li id=line-breaking-bidi>
			The interaction of [=line breaking=] and bidirectional text is defined by
			[[css-writing-modes-4#bidi-algo]]
			and the <cite>Unicode Bidirectional Algorithm</cite>
			(<a href="http://unicode.org/reports/tr9/#Reordering_Resolved_Levels">UAX9&sect;3.4 Reordering Resolved Levels</a> in particular).
			[[!CSS-WRITING-MODES-4]]
			[[!UAX9]]

			<wpt pathprefix="/css/CSS2/bidi-text/">
			bidi-breaking-001.xht
			bidi-breaking-002.xht
			bidi-breaking-003.xht
			</wpt>

		<li id=unicode-forced-breaks>
			Preserved [=segment breaks=], and--
			regardless of the 'white-space' values--
			any Unicode character with the <code>BK</code> and <code>NL</code> line breaking class,
			must be treated as [=forced line breaks=].
			[[!UAX14]]

			<wpt>
			line-breaking/line-breaking-022.html
			</wpt>

			Note: The bidi implications of such [=forced line breaks=]
			are defined by the <a href="https://www.unicode.org/reports/tr9/"><cite>Unicode Bidirectional Algorithm</cite></a>.
			[[!UAX9]]

		<li id=unicode-glue>
			Except where explicitly defined otherwise
			(e.g. for ''line-break: anywhere'' or ''overflow-wrap: anywhere'')
			line breaking behavior defined for
			the <code>CM</code>,
			and <code>SG</code>,
			<code>WJ</code>,
			<code>ZW</code>,
			<code>GL</code>,
			and <code>ZWJ</code>
			Unicode line breaking classes
			must be honored.
			[[!UAX14]]

			<wpt>
			word-break/word-break-normal-001.html
			line-breaking/line-breaking-001.html
			line-breaking/line-breaking-002.html
			line-breaking/line-breaking-003.html
			line-breaking/line-breaking-004.html
			line-breaking/line-breaking-005.html
			line-breaking/line-breaking-006.html
			line-breaking/line-breaking-007.html
			line-breaking/line-breaking-008.html
			line-breaking/line-breaking-021.html
			i18n/css3-text-line-break-baspglwj-001.html
			i18n/css3-text-line-break-baspglwj-002.html
			i18n/css3-text-line-break-baspglwj-120.html
			i18n/css3-text-line-break-baspglwj-121.html
			i18n/css3-text-line-break-baspglwj-122.html
			i18n/css3-text-line-break-baspglwj-123.html
			i18n/css3-text-line-break-baspglwj-124.html
			i18n/css3-text-line-break-baspglwj-125.html
			i18n/css3-text-line-break-baspglwj-126.html
			i18n/css3-text-line-break-baspglwj-127.html
			i18n/css3-text-line-break-baspglwj-128.html
			i18n/css3-text-line-break-baspglwj-130.html
			i18n/css3-text-line-break-baspglwj-131.html
			word-break/word-break-break-all-018.html
			word-break/word-break-break-all-021.html
			word-break/word-break-break-all-022.html
			</wpt>

		<li id=unicode-unbreakable>
			CSS never allows [=soft wrap opportunities=]
			within [=typographic character units=].
			Thus, the <code>CM</code> and <code>SG</code>
			Unicode line breaking classes must always be honored.
			[[UAX14]]

		<li id=break-prioritization>
			UAs that allow wrapping at punctuation
			other than [=word separators=]
			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 [=word separators=]
			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 'line-break' value,
			and other factors in assigning priorities:
			CSS does not define prioritization of [=soft wrap opportunities=].
			Prioritization of [=word separators=] is not expected,
			however,
			if ''word-break: break-all'' is specified
			(since this value explicitly requests line breaking behavior
			not based on breaking at [=word separators=])--
			and is forbidden under ''line-break: anywhere''.

		<li id=ignored-boxes>
			[=Out-of-flow boxes=]
			and [=inline box=] boundaries
			do not introduce a [=forced line break=]
			or [=soft wrap opportunity=] in the flow.

			<wpt>
			line-breaking/line-breaking-012.html
			line-breaking/line-breaking-015.html
			line-breaking/line-breaking-016.html
			line-breaking/line-breaking-017.html
			line-breaking/line-breaking-018.html
			line-breaking/line-breaking-019.html
			</wpt>

		<li id=atomic-compat-wrap>
			For Web-compatibility
			there is a [=soft wrap opportunity=]
			before and after each replaced element or other [=atomic inline=],
			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 [=soft wrap opportunity=]
			between [=atomic inlines=] and adjacent characters
			belonging to the Unicode GL, WJ, or ZWJ line breaking classes.
			[[UAX14]]

			<wpt>
			line-breaking/line-breaking-atomic-001.html
			line-breaking/line-breaking-atomic-002.html
			line-breaking/line-breaking-atomic-003.html
			line-breaking/line-breaking-atomic-004.html
			line-breaking/line-breaking-atomic-005.html
			line-breaking/line-breaking-atomic-006.html
			line-breaking/line-breaking-atomic-007.html
			line-breaking/line-breaking-atomic-008.html
			line-breaking/line-breaking-atomic-009.html
			line-breaking/line-breaking-atomic-010.html
			line-breaking/line-breaking-atomic-011.html
			line-breaking/line-breaking-atomic-012.html
			line-breaking/line-breaking-atomic-013.html
			line-breaking/line-breaking-atomic-014.html
			line-breaking/line-breaking-atomic-015.html
			line-breaking/line-breaking-atomic-016.html
			line-breaking/line-breaking-atomic-017.html
			line-breaking/line-breaking-atomic-018.html
			line-breaking/line-breaking-atomic-019.html
			line-breaking/line-breaking-atomic-020.html
			line-breaking/line-breaking-atomic-021.html
			line-breaking/line-breaking-atomic-022.html
			line-breaking/line-breaking-atomic-023.html
			line-breaking/line-breaking-atomic-024.html
			line-breaking/line-breaking-atomic-025.html
			line-breaking/line-breaking-atomic-026.html
			line-breaking/line-breaking-atomic-027.html
			line-breaking/line-breaking-replaced-001.html
			line-breaking/line-breaking-replaced-002.html
			line-breaking/line-breaking-replaced-003.html
			line-breaking/line-breaking-replaced-004.html
			line-breaking/line-breaking-replaced-005.html
			line-breaking/line-breaking-replaced-006.html
			line-breaking/line-breaking-atomic-nowrap-001.html
			</wpt>

		<li id=line-breaking-scope>
			For [=soft wrap opportunities=] 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 [=soft wrap opportunities=] defined by the boundary between two characters or [=atomic inlines=],
			the 'white-space' property
			on the nearest common ancestor of the two characters
			controls breaking;
			<!-- http://lists.w3.org/Archives/Public/www-style/2008Dec/0043.html -->
			which elements’ 'line-break', 'word-break', and 'overflow-wrap' properties
			control the determination of [=soft wrap opportunities=]
			at such boundaries
			is undefined in this level.

			<wpt>
			line-breaking/line-breaking-009.html
			line-breaking/line-breaking-010.html
			line-breaking/line-breaking-011.html
			line-breaking/line-breaking-ic-001.html
			line-breaking/line-breaking-ic-002.html
			line-breaking/line-breaking-ic-003.html
			white-space/white-space-wrap-after-nowrap-001.html
			word-break/break-boundary-2-chars-001.html

			overflow-wrap/overflow-wrap-anywhere-inline-002.tentative.html
			overflow-wrap/overflow-wrap-anywhere-inline-003.tentative.html
			overflow-wrap/overflow-wrap-anywhere-inline-004.tentative.html
			word-break/word-break-break-all-inline-004.tentative.html
			word-break/word-break-break-all-inline-007.tentative.html
			word-break/word-break-break-all-inline-010.tentative.html

			line-breaking/line-breaking-030.html
			line-breaking/line-breaking-031.html
			line-breaking/line-breaking-032.html
			</wpt>

		<li id=line-breaking-box-edges>
			For [=soft wrap opportunities=] 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 id=line-breaking-ruby>
			Line breaking in/around Ruby is defined
			in [[css-ruby-1#line-breaks]].
			[[!CSS-RUBY-1]]

		<li id=word-break-shaping>
			When shaping scripts such as Arabic
			[=wrap=] at unforced [=soft wrap opportunities=] within words
			(such as when breaking due to
			''word-break: break-all'',
			''line-break: anywhere'',
			''overflow-wrap: break-word'',
			''overflow-wrap: anywhere'',
			or when [=hyphenating=])
			the characters must still be shaped
			(their joining forms chosen)
			as if the word were still whole.

			<wpt>
			hyphens/hyphens-shaping-001.html
			hyphens/hyphens-shaping-002.html
			line-break/line-break-shaping-001.html
			overflow-wrap/overflow-wrap-shaping-001.html
			overflow-wrap/overflow-wrap-shaping-002.html
			word-break/word-break-break-all-004.html
			</wpt>

			<div class="example">
				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>
	</ul>

<h2 id="justification">
Alignment and Justification</h2>

	<wpt title="Tests only needed in subsections."></wpt>

	Alignment and justification controls
	how inline content is distributed within a line box.

<h3 id="text-align-property">
Text Alignment: the 'text-align' shorthand</h3>

	<wpt title="
		This section has partial test coverage.

		Missing tests:
		* tests for the <<string>> value
		* If (after justification, if any) the inline contents of a line box are too long to fit within it, then the contents are start-aligned: any content that doesn’t fit overflows the line box’s end edge.
		* “Values other than justify-all or match-parent are assigned to text-align-all and reset text-align-last to auto.”, and being a shorthand in general"></wpt>

	<pre class="propdef shorthand">
	Name: text-align
	Value: start | end | left | right | center | <<string>> | justify | match-parent | justify-all
	Initial: start
	Applies to: block containers
	Inherited: yes
	Canonical order: n/a
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/text-align-valid.html
	parsing/text-align-invalid.html
	parsing/text-align-computed.html
	text-align/text-align-webkit-match-parent.html
	</wpt>

	<wpt pathprefix="/css/CSS2/css1">
	c546-txt-align-000.xht
	</wpt>

	<wpt pathprefix="/css/CSS2/text">
	text-align-005.xht
	text-align-applies-to-001.xht
	text-align-applies-to-002.xht
	text-align-applies-to-003.xht
	text-align-applies-to-005.xht
	text-align-applies-to-006.xht
	text-align-applies-to-007.xht
	text-align-applies-to-008.xht
	text-align-applies-to-009.xht
	text-align-applies-to-010.xht
	text-align-applies-to-011.xht
	text-align-applies-to-012.xht
	text-align-applies-to-013.xht
	text-align-applies-to-014.xht
	text-align-applies-to-015.xht
	text-align-inherit-001.xht
	text-align-bidi-011.xht
	</wpt>

	This [=shorthand property=]
	sets the 'text-align-all' and 'text-align-last' 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 ''justify-all'' or ''match-parent'' are assigned to 'text-align-all'
	and reset 'text-align-last' to ''text-align-last/auto''.

	Values have the following meanings:

	<dl dfn-for=text-align dfn-type=value>
		<dt><dfn>start</dfn>
		<dd>
			Inline-level content is aligned
			to the <a spec=css-writing-modes-4>start</a> edge of the line box.

			<wpt>
			text-align/text-align-006.html
			text-align/text-align-start-001.html
			text-align/text-align-start-002.html
			text-align/text-align-start-003.html
			text-align/text-align-start-004.html
			text-align/text-align-start-005.html
			text-align/text-align-start-006.html
			text-align/text-align-start-007.html
			text-align/text-align-start-008.html
			text-align/text-align-start-009.html
			text-align/text-align-start-010.html
			text-align/text-align-start-014.html
			text-align/text-align-start-015.html
			text-align/text-align-start-016.html
			text-align/text-align-start-017.html
			text-align/text-align-start-018.html
			text-align/text-align-start-019.html
			text-align/text-align-start-020.html
			text-align/text-align-start-021.html
			</wpt>

		<dt><dfn>end</dfn>
		<dd>
			Inline-level content is aligned
			to the <a spec=css-writing-modes-4>end</a> edge of the line box.

			<wpt>
			text-align/text-align-007.html
			text-align/text-align-end-001.html
			text-align/text-align-end-002.html
			text-align/text-align-end-003.html
			text-align/text-align-end-004.html
			text-align/text-align-end-005.html
			text-align/text-align-end-006.html
			text-align/text-align-end-007.html
			text-align/text-align-end-008.html
			text-align/text-align-end-009.html
			text-align/text-align-end-010.html
			text-align/text-align-end-014.html
			text-align/text-align-end-015.html
			text-align/text-align-end-016.html
			text-align/text-align-end-017.html
			text-align/text-align-end-018.html
			text-align/text-align-end-019.html
			text-align/text-align-end-020.html
			text-align/text-align-end-021.html
			</wpt>

		<dt><dfn>left</dfn>
		<dd>
			Inline-level content is aligned
			to the [=line-left=] edge of the line box.
			(In vertical writing modes,
			this can be either the physical top or bottom,
			depending on 'writing-mode'.)
			[[CSS-WRITING-MODES-4]]

			<wpt pathprefix="/css/CSS2/text">
			text-align-001.xht
			text-align-bidi-001.xht
			text-align-bidi-006.xht
			text-align-bidi-007.xht
			</wpt>

		<dt><dfn>right</dfn>
		<dd>
			Inline-level content is aligned
			to the [=line-right=]
			edge of the line box.
			(In vertical writing modes,
			this can be either the physical top or bottom,
			depending on 'writing-mode'.)
			[[CSS-WRITING-MODES-4]]

			<wpt pathprefix="/css/CSS2/text">
			text-align-002.xht
			text-align-bidi-005.xht
			</wpt>

		<dt><dfn>center</dfn>
		<dd>
			Inline-level content is centered within the line box.

			<wpt pathprefix="/css/CSS2/text">
			text-align-003.xht
			text-align-bidi-002.xht
			text-align-bidi-003.xht
			text-align-bidi-004.xht
			text-align-inherit-001.xht
			</wpt>

			<wpt>
			text-align/text-align-center-last-center.html
			</wpt>

		<dt><dfn><<string>></dfn></dt>
		<dd>
			The string must be a single character;
			otherwise the declaration is invalid and must be
			<a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a>.
			When applied to a table cell, specifies the <dfn>alignment character</dfn>
			around which the cell's contents will align.
			See <a href="#character-alignment">below</a> for further details
			and how this value combines with keywords.

		<dt><dfn>justify</dfn>
		<dd>
			Text is justified
			according to the method specified by the 'text-justify' property,
			in order to exactly fill the line box.
			Unless otherwise specified by 'text-align-last',
			the last line before a [=forced line break=]
			is ''text-align/start''-aligned.

			<wpt>
			text-align/text-align-justify-001.html
			text-align/text-align-justify-002.html
			text-align/text-align-justify-003.html
			text-align/text-align-justify-004.html
			text-align/text-align-justify-005.html
			text-align/text-align-justify-006.html
			text-align/text-align-justify-shy-001.html
			text-align/text-align-justify-bidi-control.html
			</wpt>

			<wpt pathprefix="/css/CSS2/text">
			letter-spacing-justify-001.xht
			text-align-004.xht
			text-align-bidi-008.xht
			text-align-bidi-009.xht
			text-align-bidi-010.xht
			text-align-bidi-012.xht
			text-align-bidi-013.xht
			text-align-white-space-002.xht
			text-align-white-space-004.xht
			text-align-white-space-006.xht
			text-align-white-space-008.xht
			word-spacing-justify-001.xht
			</wpt>

		<dt><dfn>justify-all</dfn>
		<dd>
			Sets both 'text-align-all'
			and 'text-align-last'
			to ''text-align/justify'',
			forcing the last line to justify as well.

			<wpt>
			text-align/text-align-justifyall-001.html
			text-align/text-align-justifyall-002.html
			text-align/text-align-justifyall-003.html
			text-align/text-align-justifyall-004.html
			text-align/text-align-justifyall-005.html
			text-align/text-align-justifyall-006.html
			letter-spacing/letter-spacing-bidi-003.xht
			</wpt>

		<dt><dfn>match-parent</dfn>
		<dd>
			This value behaves the same as ''inherit''
			(computes to its parent’s computed value)
			except that an [=inherited value=] of
			''text-align/start'' or ''text-align/end''
			is interpreted against the parent’s
			'direction' value
			and results in a computed value of either
			''text-align/left'' or ''text-align/right''.
			Computes to ''text-align/start''
			when specified on the [=root element=].
			<!-- ideally it would compute against the root writing mode
			     and inherit as `left` or `right` for consistency in descendants,
			     but since this is complicated due to propagation
			     and match-parent has basically no real use case on root,
			     we're doing this instead because it's easy -->

			<wpt>
			text-align/text-align-match-parent-001.html
			text-align/text-align-match-parent-002.html
			text-align/text-align-match-parent-01.html
			text-align/text-align-match-parent-02.html
			text-align/text-align-match-parent-03.html
			text-align/text-align-match-parent-04.html
			text-align/text-align-match-parent-root-ltr.html
			text-align/text-align-match-parent-root-rtl.html
			text-align/text-align-match-parent-root-logical.html
			</wpt>

			When specified on the 'text-align' shorthand,
			sets both 'text-align-all' and 'text-align-last' to ''text-align/match-parent''.

			<wpt>
			text-align/text-align-match-parent-05.html
			</wpt>

	</dl>

	A block of text
	is a stack of [=line boxes=].
	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
	[[CSS2/visuren#viewport|viewport]]
	or containing block.

	In the case of ''justify'',
	the UA may stretch or shrink any inline boxes
	by [[#text-justify-property|adjusting]] their text.
	(See 'text-justify'.)
	If an element’s [=white space=] is not [=collapsible=],
	then the UA is not required to adjust its text
	for the purpose of justification
	and may instead treat the text
	as having no [=justification opportunities=].
	If the UA chooses to adjust the text,
	then it must ensure
	that <a>tab stops</a> continue to line up as required by the
	[[#white-space-rules|white space processing rules]].

	<wpt pathprefix="/css/CSS2/text">
	text-align-white-space-001.xht
	text-align-white-space-005.xht
	</wpt>
	<wpt>
		text-align/text-align-justify-tabs-001.html
		text-align/text-align-justify-tabs-002.html
		text-align/text-align-justify-tabs-003.html
		text-align/text-align-justify-tabs-004.html
	</wpt>

	If (after justification, if any)
	the inline contents of a line box are too long to fit within it,
	then the contents are <a spec=css-writing-modes-4>start</a>-aligned:
	any content that doesn’t fit
	overflows the line box’s <a spec=css-writing-modes-4>end</a> edge.

	See [[#bidi-linebox]] for details on how to determine
	the <a spec=css-writing-modes-4>start</a> and <a spec=css-writing-modes-4>end</a> edges
	of a line box.

<h3 id="character-alignment">
Character-based Alignment in a Table Column</h3>

	<wpt title="This section lacks tests."></wpt>

	When multiple cells in a column have an alignment character specified,
	the alignment character of each such cell in the column
	is centered along a single column-parallel axis
	and the rest of the text in the column shifted accordingly.
	(Note that the strings do not have to be the same for each cell,
	although they usually are.)

	<p class="issue">Is this intended to say that it's the centers
	of the alignment characters that should be aligned?
	It's not clear that's what it says,
	but that (or a different behavior) needs to be specified,
	to describe what happens
	when different occurrences of the alignment character
	are in different fonts.
	(Further, is that the intended behavior?  Probably the most
	significant use case to consider is bold vs. non-bold text,
	which only varies slightly in width.)
	[<a href="https://lists.w3.org/Archives/Public/www-style/2016Jan/0233.html">feedback</a>]
	[minutes face-to-face 2016-02-02 10:00 AM]


	<div class="example">

		The following style sheet:

		<pre>
			TD { text-align: "." center }
		</pre>

		will cause the column of dollar figures in the following HTML table:

		<pre class="html-example">
			&lt;TABLE&gt;
			&lt;COL width="40"&gt;
			&lt;TR&gt; &lt;TH&gt;Long distance calls
			&lt;TR&gt; &lt;TD&gt; $1.30
			&lt;TR&gt; &lt;TD&gt; $2.50
			&lt;TR&gt; &lt;TD&gt; $10.80
			&lt;TR&gt; &lt;TD&gt; $111.01
			&lt;TR&gt; &lt;TD&gt; $85.
			&lt;TR&gt; &lt;TD&gt; N/A
			&lt;TR&gt; &lt;TD&gt; $.05
			&lt;TR&gt; &lt;TD&gt; $.06
			&lt;/TABLE&gt;
		</pre>

		to align along the decimal point. The table might be rendered as
		follows:

		<pre>
			+---------------------+
			| Long distance calls |
			+---------------------+
			|         $1.30       |
			|         $2.50       |
			|        $10.80       |
			|       $111.01       |
			|        $85.         |
			|        N/A          |
			|          $.05       |
			|          $.06       |
			+---------------------+
		</pre>
	</div>

	A keyword value may be specified in conjunction with the <<string>> value;
	if it is not given, it defaults to ''text-align/right''.
	This value is used:

	<ul>
		<li>
			when character-based alignment is applied
			to boxes that are not table cells.
		<li>
			when the text wraps to multiple lines (at unforced break points).
		<li>
			when a character-aligned cell spans more than one column.
			In this case the keyword alignment value is used
			to determine which column's axis to align with:
			the leftmost column for ''text-align/left'',
			the rightmost column for ''text-align/right'' and ''text-align/center'',
			the startmost column for ''text-align/start'',
			the endmost column for ''text-align/end''.
		<li>
			when the column is wide enough that the character alignment alone
			does not determine the positions of its character-aligned contents.
			In this case the keyword alignment of the first cell in the column
			with a specified alignment character
			is used to slide the position of the character-aligned contents
			to match the keyword alignment
			insofar as possible without changing the width of the column.
			For ''text-align/center'',
			the UA may center the aligned contents using its extremes,
			center the alignment axis itself (insofar as possible),
			or optically center the aligned contents some other way
			(such as by taking a weighted average
			of the extent of the cells' contents to either side of the axis).
	</ul>

	Note: Right alignment is used by default for character-based alignment
	because numbering systems are almost all left-to-right
	even in right-to-left writing systems,
	and the primary use case of character-based alignment
	is for numerical alignment.

	If the alignment character appears more than once in the text,
	the first instance is used for alignment.
	If the alignment character does not appear in a cell at all,
	the string is aligned as if
	the alignment character had been inserted at the end of its contents.

	<p class="issue">This needs to specify what text is searched
	for the alignment character.
	Is it only in-flow text whose containing block is the cell?
	Or is text within any in-flow descendants
	in the block formatting context established by the cell considered?
	If so, is it considered only as long as its 'text-align' property
	is consistent with the cell's?
	(Consistent in the alignment character, or fully consistent?)

	<p class="issue">This behavior of aligning as though the alignment character
	had been inserted at the end of the contents of the cell,
	combined with center-of-character alignment,
	will produce gaps on the end-side of lines
	that are alone on a line with <<string>> text-alignment,
	when none of the lines of the column has the alignment character,
	or, more importantly, when some of the lines
	do have the alignment character,
	but the column is not laid out at its max-content width.
	This is probably undesirable.

	<p class="issue">When the alignment character is inserted
	at the end of the contents,
	which font is used?
	(In particular, if the alignment character might be within a descendant block,
	is it the font of the block or the font of the table cell?
	Or if the insertion is at a forced break within an inline,
	does it use the font of the inline or the font of the block or cell?)

	Character-based alignment occurs before table cell width computation
	so that auto width computations can leave enough space for alignment.
	Whether column-spanning cells participate in the alignment
	prior to or after width computation is undefined.
	If width constraints on the cell contents prevent
	full alignment throughout the column,
	the resulting alignment is undefined.

	<p class="issue">This should have a formal definition
	of how character alignment affects
	the min-content and max-content intrinsic widths
	(of table columns and all content that can be inside table columns).
	Max-content intrinsic widths need to be split
	into three numbers (assuming that it's the centers of the
	alignment character that are aligned):
	one for widths without alignment characters,
	one for widths on the inline-start side
	of the center of the alignment character,
	one for widths on the inline-end side
	of the center of the alignment character.
	This operates based on all segments of text
	between forced breaks for max-content widths.
	For min-content widths, segments of text between forced breaks
	that contain optional breaks within them should clearly contribute
	only to the without-alignment-character width.
	However, it's less clear
	whether all min-content widths should work this way,
	or whether segments between forced breaks
	that do not have optional breaks
	(and perhaps only those that actually contain the alignment character)
	should contribute to start-side-of-alignment-character
	and end-side-of-alignment-character min-content widths instead;
	this choice is a tradeoff between the meaning of min-content
	sizing of a table meaning the narrowest reasonable size versus
	honoring alignment characters in more cases.
	Another option might be to use whether line-breaking of optional breaks
	is allowed as a control for which behavior to use.

	<p class="issue">Formally defining the intrinsic width contributions
	of column-spanning cells with <<string>> values of
	'text-align' is a complicated (although straightforward) extension
	of the decisions made for intrinsic width contributions
	of non-column-spanning cells;
	this should also be formally defined.
	Contributions end up being made to the split intrinsic widths
	of the startmost or endmost column (whichever is used for alignment),
	and to the without-alignment-character intrinsic widths
	of the other spanned columns.

<h3 id="text-align-all-property" oldids="text-align-all">
Default Text Alignment: the 'text-align-all' property</h3>

	<wpt title="This section lacks tests."></wpt>

	<pre class="propdef">
	Name: text-align-all
	Value: start | end | left | right | center | <<string>> | justify | match-parent
	Initial: start
	Applies to: block containers
	Inherited: yes
	Computed value: keyword as specified, except for ''match-parent'' which computes as defined above
	Canonical order: n/a
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/text-align-all-valid.html
	parsing/text-align-all-invalid.html
	</wpt>

	This longhand of the 'text-align' [=shorthand property=]
	specifies the inline alignment of all lines of inline content in the block container,
	except for last lines
	overridden by a non-''text-align-last/auto'' value of 'text-align-last'.
	See 'text-align' for a full description of values.

	<p class="advisement">
	Authors should use the 'text-align' shorthand instead of this property.

<h3 id="text-align-last-property" caniuse="css-text-align-last" oldids="text-align-last">
Last Line Alignment: the 'text-align-last' property</h3>

	<wpt title="
			This section has fairly good test coverage:
			all value combinations for text-align / text-align-last are exercised,
			except for text-align-last: match-parent (which is exercised, but in a more limited way).

			Missing tests:
			* tests for Animation type

			"></wpt>

	<pre class="propdef">
	Name: text-align-last
	Value: auto | start | end | left | right | center | justify | match-parent
	Initial: auto
	Applies to: block containers
	Inherited: yes
	Canonical order: n/a
	Computed value: keyword as specified, except for ''match-parent'' which computes as defined above
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/text-align-last-valid.html
	parsing/text-align-last-invalid.html
	parsing/text-align-last-computed.html
	text-align/text-align-last-013.html
	text-align/text-align-last-014.html
	text-align/text-align-last-justify-br.html
	</wpt>

	This property describes how the last line of a block or a line
	right before a [=forced line break=]
	is aligned.

	<wpt>
	text-align/text-align-last-001.html
	text-align/text-align-last-002.html
	text-align/text-align-last-003.html
	text-align/text-align-last-004.html
	text-align/text-align-last-005.html
	text-align/text-align-last-006.html
	text-align/text-align-last-010.html
	text-align/text-align-last-011.html
	text-align/text-align-last-012.html
	text-align/text-align-last-wins-001.html
	</wpt>

	If <dfn dfn-for=text-align-last dfn-type=value>auto</dfn> is specified,
	content on the affected line is aligned per 'text-align-all'
	unless 'text-align-all' is set to ''justify'',
	in which case it is ''text-align/start''-aligned.
	All other values are interpreted as described for 'text-align'.

	<wpt>
	text-align/text-align-last-007.html
	text-align/text-align-last-008.html
	text-align/text-align-last-009.html
	text-align/text-align-center-last-center.html
	text-align/text-align-center-last-default.html
	text-align/text-align-center-last-end.html
	text-align/text-align-center-last-justify.html
	text-align/text-align-center-last-start.html
	text-align/text-align-default-last-default.html
	text-align/text-align-end-last-center.html
	text-align/text-align-end-last-default.html
	text-align/text-align-end-last-end.html
	text-align/text-align-end-last-justify.html
	text-align/text-align-end-last-start.html
	text-align/text-align-inline-end-crash.html
	text-align/text-align-justify-last-center.html
	text-align/text-align-justify-last-default.html
	text-align/text-align-justify-last-end.html
	text-align/text-align-justify-last-justify.html
	text-align/text-align-justify-last-start.html
	text-align/text-align-last-center.html
	text-align/text-align-last-end.html
	text-align/text-align-last-interpolation.html
	text-align/text-align-last-justify-rtl.html
	text-align/text-align-last-justify.html
	text-align/text-align-last-simple.html
	text-align/text-align-last-start.html
	text-align/text-align-start-last-center.html
	text-align/text-align-start-last-default.html
	text-align/text-align-start-last-end.html
	text-align/text-align-start-last-justify.html
	text-align/text-align-start-last-start.html
	text-align/text-align-match-parent-05.html
	text-align/text-align-last-015.html
	</wpt>

<h3 id="text-justify-property" caniuse="css-text-justify" oldids="text-justify">
Justification Method: the 'text-justify' property</h3>

	<wpt title="
		This section has light test coverage.
		All values (other than auto) are tested,
		but the tests are minimal.
		Not sure we can do better though.

		Missing tests:
		* Applies to text
		* no-compress
		* ruby

		Untestable(?):
		* behavior of auto"></wpt>

	<pre class="propdef">
	Name: text-justify
	Value: [ auto | none | inter-word | inter-character | ruby ] || no-compress
	Initial: auto
	Applies to: text
	Inherited: yes
	Canonical order: n/a
	Computed value: specified keyword (except for the ''distribute'' legacy value)
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/text-justify-valid.html
	parsing/text-justify-invalid.html
	parsing/text-justify-computed.html
	text-justify/text-justify-006.html
	text-justify/text-justify-interpolation.html
	</wpt>

	This property selects the justification method
	used when a line’s alignment is set to ''justify''
	(see 'text-align').
	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:

	<wpt>
	text-justify/text-justify-006.html
	</wpt>

	<dl dfn-for=text-justify dfn-type=value>
		<dt><dfn>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 [=writing system=]
			and [=content language|language=],
			UAs should, where possible,
			use a justification algorithm appropriate to the text.

			<wpt pathprefix="/css/CSS2">
			text/letter-spacing-justify-001.xht
			text/word-spacing-justify-001.xht
			</wpt>

			<div class="example">
				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 [=word separators=]
				and between CJK [=typographic letter units=]
				along with secondarily expanding
				between Southeast Asian [=typographic letter units=].
				Then, in cases where the [=content language=] 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 [[JLREQ]],
				using cursive elongation for Arabic,
				using ''inter-word'' for German,
				etc.
			</div>

			<figure id="fig-text-justify-cursive">

				<img alt="Two lines of calligraphic Arabic end together
				          due to a mix of compressed and swash forms."
				     title="Swash forms elongate the first line
				            while a compressed contextual ligature shortens the second,
				            allowing both to end precisely together."
				            src="images/text-justify-cursive.png">

				<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."
				     src="images/text-justify-compromise.png">

				<figcaption>
					Mixed-script text with ''text-justify: auto'':
					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>none</dfn>
		<dd>
			Justification is disabled:
			there are no [=justification opportunities=] within the text.

			<wpt>
			text-justify/text-justify-001.html
			text-justify/text-justify-006.html
			</wpt>

			<wpt pathprefix="/css/css-text/text-justify">
			text-justify-none-001.html
			</wpt>

			<figure id="fig-text-justify-none">
				<img alt="No extra space is inserted."
				     src="images/text-justify-none.png">

				<figcaption>
					Mixed-script text with ''text-justify: none''
				</figcaption>
			</figure>

			Note: This value is intended for use in user stylesheets
			to improve readability or for accessibility purposes.

		<dt><dfn>inter-word</dfn>
		<dd>
			Justification adjusts spacing at [=word separators=] only
			(effectively varying the used 'word-spacing' on the line).
			This behavior is typical for languages that separate words using spaces,
			like English or Korean.

			<wpt pathprefix="/css/css-text/text-justify/">
			text-justify-inter-word-001.html
			text-justify-word-separators.html
			</wpt>

			<figure id="fig-text-justify-interword">
				<img alt="Extra space is equally distributed mainly to spaces."
				     src="images/text-justify-interword.png">

				<figcaption>
					Mixed-script text with ''text-justify: inter-word''
				</figcaption>
			</figure>

		<dt><dfn>inter-character</dfn>
		<dd>
			Justification adjusts spacing
			between each pair of adjacent [=typographic character units=]
			(effectively varying the used 'letter-spacing' on the line).
			This value is sometimes used in East Asian systems such as Japanese.

			<wpt>
			text-justify/text-justify-002.html
			</wpt>

			<wpt pathprefix="/css/css-text/text-justify/">
			text-justify-inter-character-001.html
			</wpt>

			<figure id="fig-text-justify-distribute">
				<img alt="Extra space is equally distributed
				          at points between spaces and letters of all writing systems."
				     src="images/text-justify-distribute.png">

				<figcaption>
					Mixed-script text with ''text-justify: inter-character''
				</figcaption>
			</figure>

			For legacy reasons,
			UAs must also support the alternate keyword <dfn>distribute</dfn>
			which must compute to ''inter-character'',
			thus having the exact same meaning and behavior.
			UAs may treat this as a [=legacy value alias=].

			<wpt>
			text-justify/text-justify-003.html
			parsing/text-justify-computed-legacy.html
			text-justify/text-justify-distribute-001.html
			</wpt>

		<dt><dfn>ruby</dfn>
		<dd>
			Justification adjusts spacing as for ''text-justify/auto'' <em>except</em>:
			* [=Justification opportunities=] are disabled at [=word separators=].
			* [=Justification opportunities=] are disabled between [=Bopomofo characters=]

			Note: This value is intended for use in [=ruby annotations=],
			providing a reasonable default alignment.
			See [[CSS-RUBY-1]].

		<dt><dfn>no-compress</dfn>
		<dd>
			Justification must not compress spacing controlled by
			'text-spacing-trim' or 'text-autospace'.
			(If this value is not specified,
			the justification process may reduce such spacing
			except when the spacing is at the start or end of the line.)

			Note: An example of compression rules is given for Japanese
			in 3.8 Line Adjustment in [[JLREQ]].

			Issue(7079): This keyword used to be part of 'text-spacing';
			it might need renaming to be more specific now that it's here,
			as it implies that e.g. U+0020 cannot be compressed.
	</dl>

	<p class="advisement">
	Since optimal justification is [=content language|language=]-sensitive,
	authors should correctly language-tag their content for the best results.

	Note: 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.

<h4 id="expanding-text">
Expanding and Compressing Text</h4>

	<wpt title="
		This section lacks tests.

		Missing tests:
		* whether a typographic character unit provides a justification opportunity is controlled by the text-justify value of its parent;
		* whether a justification opportunity exists between two consecutive typographic character units is determined by the text-justify value of their nearest common ancestor.
		* UAs must not break required ligatures or otherwise disable features required to correctly shape complex scripts
		* … and maybe more"></wpt>

	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.

	A <dfn export oldids="expansion-opportunity">justification opportunity</dfn> is a point
	where the justification algorithm may alter spacing within the text.
	A justification opportunity can be provided by a single [=typographic character unit=]
	(such as a [=word separator=]),
	or by the juxtaposition of two [=typographic character units=].
	As with controls for [[#line-break-details|soft wrap opportunities]],
	whether a [=typographic character unit=] provides a [=justification opportunity=]
	is controlled by the 'text-justify' value of its parent;
	similarly,
	whether a [=justification opportunity=] exists
	between two consecutive [=typographic character units=]
	is determined by the 'text-justify' value of their nearest common ancestor.

	Space distributed by justification is <em>in addition to</em>
	the spacing defined by the 'letter-spacing' or 'word-spacing' properties.
	When such additional space is distributed
	to a [=word separator=] [=justification opportunity=],
	it is applied under the same rules as for 'word-spacing'.
	Similarly, when space is distributed
	to a [=justification opportunity=] between two [=typographic character units=],
	should be applied under the same rules as for 'letter-spacing'.

	A justification algorithm may divide [=justification opportunities=]
	into different priority levels.
	All [=justification opportunities=] within a given level
	are expanded or compressed at the same priority,
	regardless of which [=typographic character units=] created that opportunity.
	For example,
	if [=justification opportunities=] between two Han characters
	and between two Latin letters
	are defined to be at the same level
	(as they are in the ''inter-character'' justification style),
	they are not treated differently
	because they originate from different [=typographic character units=].
	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 [=justification opportunities=] within the line.

	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.

	If a [=justification opportunity=] exists within a line,
	and [[#text-align-property|text alignment]] specifies full justification
	(''text-align/justify'')
	for that line,
	it must be justified.

<h4 id="justify-symbols">
Handling Symbols and Punctuation</h4>

	<wpt title="This section lacks tests. Not sure what is testable though."></wpt>

	When determining [=justification opportunities=],
	a [=typographic character unit=]
	from the Unicode Symbols (S*) and Punctuation (P*) classes
	is generally treated the same as a [=typographic letter unit=] of the same script
	(or, if the character’s script property is Common,
	then as a [=typographic letter unit=] of the dominant script).

	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 [=justification opportunities=] involving symbols and punctuation.

	<div class="example">
		For example, there are traditionally no [=justification opportunities=]
		between consecutive
		U+2014 — EM DASH,
		U+2015 ― HORIZONTAL BAR,
		U+2026 … HORIZONTAL ELLIPSIS,
		or U+2025 ‥ TWO DOT LEADER
		characters [[JLREQ]];
		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 [=justification opportunity=] in Japanese.
		The UA might therefore assign these characters to a higher prioritization
		level than the opportunities between ideographic characters.
	</div>

<h4 id="justify-limits">
Unexpandable Text</h4>

	<wpt title="
		This section has basic test coverage.

		Missing tests:
		* Values of text-align-last other than justify
		* A broader range of non-stretchable content that just an empty span with padding"></wpt>

	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 'text-align-last' property.
	(If 'text-align-last' is ''justify'',
	then they must be aligned as for ''text-align/center''.)

	<wpt>
	text-align/text-align-last-empty-inline.html
	</wpt>

<h4 id="justify-cursive">
Cursive Scripts</h4>

	<wpt title="This section lacks automated tests."></wpt>

	Justification <em>must not</em> introduce gaps
	between the joined [=typographic letter units=]
	of [=cursive scripts=] such as Arabic.
	If it is able,
	the UA <em>may</em> translate space distributed to [=justification opportunities=]
	within a run of such [=typographic letter units=]
	into some form of cursive elongation for that run.
	It otherwise <em>must</em> assume that no [=justification opportunity=] exists
	between any pair of [=typographic letter units=] in [=cursive script=]
	(regardless of whether they join).

	<wpt>
	text-justify/text-justify-004.html
	text-justify/text-justify-005.html
	</wpt>

	<div class="example">
		The following are examples of unacceptable justification:

		<figure>
			<img alt="" src="images/arabic-stretch-spaced.png">

			<figcaption>
				Adding gaps between every pair of Arabic letters
			</figcaption>
		</figure>

		<figure>
			<img alt="" src="images/arabic-stretch-unjoined.png">

			<figcaption>
				Adding gaps between every pair of unjoined Arabic letters
			</figcaption>
		</figure>
	</div>

	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.

<h4 id="justify-algos">
Minimum Requirements for ''text-justify/auto'' Justification</h4>

	<wpt title="This section lacks tests."></wpt>

	For ''text-justify/auto'' justification,
	this specification does not define
	what all of the [=justification opportunities=] are,
	how they are prioritized,
	or when and how multiple levels of [=justification opportunities=] interact.
	However, it does require that:

	<ul>
		<li>
			Unless contraindicated by the typographic traditions
			of the [=content language=]
			or adjacent symbols/punctuation,
			each of the following provides a [=justification opportunity=]:

			<ul>
				<li>
					[=Word separators=]

				<li>
					The boundary between a [=typographic character unit=]
					of any [=block scripts=]
					and any other [=typographic character unit=]

				<li>
					The boundary between a [=typographic character unit=]
					of any [=clustered scripts=]
					and any other [=typographic character unit=]
			</ul>
		<li>
			All [=letters=] belonging to all [=block scripts=] are treated the same,
			and all [=letters=] belonging to all [=clustered scripts=] 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>

	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>.
	[[JUSTIFY]]

<h3 id="text-group-align-property">
Aligning a block of text within its container: the 'text-group-align' property</h3>

	<wpt title="
		This section has basic coverage.

		Missing tests:
		* not inherited
		* animation type
		* the contents of descendants that establish independent formatting contexts are skipped.
		* works accross block containers within a single formatting context
		* interaction with floats
		* interaction with indents
	"></wpt>

	<pre class="propdef">
	Name: text-group-align
	Value: none | start | end | left | right | center
	Initial: none
	Applies to: <a>block containers</a>
	Inherited: no
	Percentages: N/A
	Computed value: specified keyword
	Animation type: discrete
	</pre>

	<wpt>
		parsing/text-group-align-invalid.html
		parsing/text-group-align-valid.html
	</wpt>

	This property aligns the contents of the line boxes as a group
	while maintaining their text alignment.

	<dfn lt="group alignment | group-align | group-aligned">Group alignment</dfn>
	is performed by finding the line box with the shortest remaining space
	and adding that amount of space as padding to one or both sides of the line box,
	reducing the amount of space available for its contents;
	<a href="#text-align-property">text alignment</a> is then applied
	to its contents within the remaining space.
	All descendant [=in-flow=] line boxes within the same [=block formatting context=]
	are considered
	both when searching for the shortest remaining space
	and when adding the padding;
	the contents of descendants that establish [=independent formatting contexts=]
	are skipped.

	<wpt>
		text-group-align/text-group-align-center-vlr.html
		text-group-align/text-group-align-center.html
		text-group-align/text-group-align-end-vlr.html
		text-group-align/text-group-align-end.html
		text-group-align/text-group-align-left-vlr.html
		text-group-align/text-group-align-left.html
		text-group-align/text-group-align-right-vlr.html
		text-group-align/text-group-align-right.html
		text-group-align/text-group-align-start-vlr.html
		text-group-align/text-group-align-start.html
	</wpt>

	Issue: A variant of this property is inherited,
	and applies on each block container individually,
	only affecting the line boxes that are direct children of that block.
	This is less useful, but probably easier to implement.

	Issue: Somehow also moving the floats that originate in the same block container
	by the same amount
	would make things line up more nicely,
	which would be especially valuable in CJK layout.
	Exactly how that works, and how it interacts with intruding floats
	from ancestor elements is left as an exercise for the reader.

	Values have the following meanings:

	<dl dfn-for=text-group-align dfn-type=value>
		<dt><dfn>none</dfn>
		<dd>
			Text alignment happens normally: [=group alignment=] is not performed.

		<dt><dfn>start</dfn>
		<dd>
			Inline-level content is [=group-aligned=] to the [=inline start=] side,
			by padding the [=inline end=] side of each line box.

			<wpt>
				text-group-align/text-group-align-start-vlr.html
				text-group-align/text-group-align-start.html
			</wpt>

		<dt><dfn>end</dfn>
		<dd>
			Inline-level content is [=group-aligned=] to the [=inline end=] side,
			by padding the [=inline start=] side of each line box.

			<wpt>
				text-group-align/text-group-align-end-vlr.html
				text-group-align/text-group-align-end.html
			</wpt>

		<dt><dfn>left</dfn>
		<dd>
			Inline-level content is [=group-aligned=] to the [=line-left=] side,
			by padding the [=line-right=] side of each line box.

			<wpt>
				text-group-align/text-group-align-left-vlr.html
				text-group-align/text-group-align-left.html
			</wpt>

		<dt><dfn>right</dfn>
		<dd>
			Inline-level content is [=group-aligned=] to the [=line-right=] side,
			by padding the [=line-left=] side of each line box.

			<wpt>
				text-group-align/text-group-align-right-vlr.html
				text-group-align/text-group-align-right.html
			</wpt>

		<dt><dfn>center</dfn>
		<dd>
			Inline-level content is [=group-aligned=] to the center,
			by padding both sides of each line box,
			half the spacing to each side.

			<wpt>
				text-group-align/text-group-align-center-vlr.html
				text-group-align/text-group-align-center.html
			</wpt>
	</dl>

<h2 id="spacing">
Spacing</h2>

	<wpt title="Tests only needed in subsections."></wpt>

	CSS offers control over regular text spacing
	via the 'word-spacing', 'letter-spacing', and 'line-padding' properties,
	which specify additional space
	around [=word separators=]
	between [=typographic character units=],
	or at the start/end of the line,
	respectively.
	It also provides contextual control over spacing
	via the 'text-spacing-trim' property,
	which allows for contextual fullwidth vs halfwidth setting of CJK punctuation;
	and the 'text-autospace' property,
	which allows automatic insertion of extra space
	at script changes or around punctuation.

<h3 id="word-spacing-property" oldids="word-spacing">
Word Spacing: the 'word-spacing' property</h3>

	<wpt title="
		This section has limited test coverage.

		Missing tests:
		* Applies to text
		* inherit lengths as absolute
		* values may be negative
		* computed / resolved value of normal
		* should be applied half on each side of the character unless otherwise dictated by typographic tradition.
		* doesn’t do anything between words defined by text analysis like in Thai, only on actual word separators
		* works on  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).
		* word-spacing and bidi "></wpt>

	<pre class="propdef">
	Name: word-spacing
	Value: normal | <<length-percentage>>
	Initial: normal
	Applies to: text
	Inherited: yes
	Percentages: relative to used 'font-size'
	Computed value: an absolute length and/or a percentage
	Animation type: by computed value type
	Canonical order: n/a
	</pre>

	<wpt>
	inheritance.html
	parsing/word-spacing-valid.html
	parsing/word-spacing-invalid.html
	parsing/word-spacing-computed.html
	animations/word-spacing-interpolation.html
	animations/word-spacing-composition.html
	</wpt>

	<wpt pathprefix="/css/CSS2/css1">
	c541-word-sp-000.xht
	c541-word-sp-001.xht
	</wpt>

	<wpt pathprefix="/css/CSS2/text">
	word-spacing-101.xht
	word-spacing-applies-to-001.xht
	word-spacing-applies-to-002.xht
	word-spacing-applies-to-003.xht
	word-spacing-applies-to-005.xht
	word-spacing-applies-to-006.xht
	word-spacing-applies-to-007.xht
	word-spacing-applies-to-008.xht
	word-spacing-applies-to-009.xht
	word-spacing-applies-to-010.xht
	word-spacing-applies-to-011.xht
	word-spacing-applies-to-012.xht
	word-spacing-applies-to-013.xht
	word-spacing-applies-to-014.xht
	word-spacing-applies-to-015.xht
	word-spacing-justify-001.xht
	</wpt>

	This property specifies additional spacing
	between &ldquo;words&rdquo;.
	Values are interpreted as defined below:

	<dl dfn-for=word-spacing dfn-type=value>
		<dt><dfn>normal</dfn>
		<dd>
			No additional spacing is applied.
			Computes to zero.

			<wpt pathprefix="/css/CSS2/text">
			word-spacing-100.xht
			</wpt>
			<wpt>
			word-spacing/word-spacing-computed-001.html
			</wpt>

		<dt><dfn>&lt;length-percentage&gt;</dfn>
		<dd>
			Specifies extra spacing
			<em>in addition to</em> the intrinsic inter-word spacing
			defined by the font.

			<wpt>
			word-spacing/word-spacing-001.html
			word-spacing/word-spacing-002.html
			word-spacing/word-spacing-percent-001.html
			tab-size/tab-size-spacing-001.html
			</wpt>

			Note: Percentages inherit intact,
			and are resolved against
			the used 'font-size' of the current element
			(and thus represent a size relative to
			the size of the text to which they apply),
			unlike ''em'' units which are resolved against
			the computed 'font-size' of the element from which they inherit,
			as an absolute length.

			<wpt pathprefix="/css/CSS2/text">
			word-spacing-004.xht
			word-spacing-005.xht
			word-spacing-006.xht
			word-spacing-007.xht
			word-spacing-008.xht
			word-spacing-016.xht
			word-spacing-017.xht
			word-spacing-018.xht
			word-spacing-019.xht
			word-spacing-020.xht
			word-spacing-028.xht
			word-spacing-029.xht
			word-spacing-030.xht
			word-spacing-031.xht
			word-spacing-032.xht
			word-spacing-040.xht
			word-spacing-041.xht
			word-spacing-042.xht
			word-spacing-043.xht
			word-spacing-044.xht
			word-spacing-052.xht
			word-spacing-053.xht
			word-spacing-054.xht
			word-spacing-055.xht
			word-spacing-056.xht
			word-spacing-064.xht
			word-spacing-065.xht
			word-spacing-066.xht
			word-spacing-067.xht
			word-spacing-068.xht
			word-spacing-076.xht
			word-spacing-077.xht
			word-spacing-078.xht
			word-spacing-079.xht
			word-spacing-080.xht
			word-spacing-088.xht
			word-spacing-089.xht
			word-spacing-090.xht
			word-spacing-091.xht
			word-spacing-092.xht
			word-spacing-097.xht
			word-spacing-098.xht
			word-spacing-099.xht
			</wpt>
	</dl>

	Additional spacing is applied to each [=word separator=] left in the text
	after the [[#white-space-rules|white space processing rules]] 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.

	<wpt pathprefix="/css/CSS2/text">
	word-spacing-remove-space-001.xht
	word-spacing-remove-space-002.xht
	word-spacing-remove-space-003.xht
	word-spacing-remove-space-004.xht
	word-spacing-remove-space-005.xht
	word-spacing-remove-space-006.xht
	</wpt>
	<wpt>
	word-spacing/word-spacing-negative-value-001.html
	</wpt>

	<dfn export id="word-separator" lt="word-separator character | word separator">Word-separator characters</dfn>
	are [=typographic character units=]
	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).
	[[UNICODE]]

	<wpt pathprefix="/css/CSS2/text">
	word-spacing-characters-001.xht
	</wpt>

	Note: Neither punctuation in general,
	nor fixed-width spaces (such as U+3000 and U+2000 through U+200A),
	are considered [=word-separator characters=],
	because even though they frequently happen to separate words,
	their primary purpose is not to separate words.

	<wpt pathprefix="/css/CSS2/text">
	word-spacing-characters-002.xht
	</wpt>

	If there are no [=word-separator characters=],
	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.

	<wpt pathprefix="/css/CSS2/text">
	word-spacing-characters-003.xht
	</wpt>

<h3 id="letter-spacing-property" caniuse="css-letter-spacing" oldids="letter-spacing">
Tracking: the 'letter-spacing' property</h3>

	<wpt title="
		This section has partial test coverage.

		Missing tests:
		* Applies to text
		* Due to <a href=https://github.com/w3c/csswg-drafts/issues/1518>issue 1518</a>, some/many tests in this section should be converted from MUST to SHOULD.
		* inherit lengths as absolute
		* For legacy reasons, a computed letter-spacing of zero yields a resolved value (getComputedStyle() return value) of normal.
		* However, ligatures and other font features specified via the low-level font-feature-settings property take precedence over this rule"></wpt>

	<pre class="propdef">
	Name: letter-spacing
	Value: normal | <<length-percentage>>
	Initial: normal
	Applies to: <a>inline boxes</a> and text
	Inherited: yes
	Percentages: relative to used 'font-size'
	Computed value: an absolute length and/or a percentage
	Animation type: by computed value type
	Canonical order: n/a
	</pre>

	<wpt>
	inheritance.html
	parsing/letter-spacing-valid.html
	parsing/letter-spacing-invalid.html
	parsing/letter-spacing-computed.html
	animations/letter-spacing-interpolation.html
	animations/letter-spacing-composition.html
	letter-spacing/letter-spacing-nesting-003.xht
	letter-spacing/letter-spacing-bidi-003.xht
	letter-spacing/letter-spacing-bidi-004.xht
	letter-spacing/letter-spacing-bidi-005.xht
	letter-spacing/letter-spacing-200.html
	letter-spacing/letter-spacing-201.html
	letter-spacing/letter-spacing-203.html
	letter-spacing/letter-spacing-206.html
	letter-spacing/letter-spacing-end-of-line-002.html
	</wpt>

	<wpt pathprefix="/css/CSS2/css1">
	c542-letter-sp-000.xht
	c542-letter-sp-001.xht
	</wpt>

	<wpt pathprefix="/css/CSS2/text">
	letter-spacing-applies-to-001.xht
	letter-spacing-applies-to-002.xht
	letter-spacing-applies-to-003.xht
	letter-spacing-applies-to-005.xht
	letter-spacing-applies-to-006.xht
	letter-spacing-applies-to-007.xht
	letter-spacing-applies-to-008.xht
	letter-spacing-applies-to-009.xht
	letter-spacing-applies-to-010.xht
	letter-spacing-applies-to-011.xht
	letter-spacing-applies-to-012.xht
	letter-spacing-applies-to-013.xht
	letter-spacing-applies-to-014.xht
	letter-spacing-applies-to-015.xht
	</wpt>

	This property specifies additional spacing
	(commonly called <dfn export>tracking</dfn>)
	between adjacent [=typographic character units=].
	Letter-spacing is applied after
	[[css-writing-modes-4#text-direction|bidi reordering]]
	and is in addition to [[css-fonts-3#font-kerning-prop|kerning]]
	and 'word-spacing'.
	[[CSS-WRITING-MODES-4]]
	[[CSS-FONTS-3]]
	Depending on the justification rules in effect,
	user agents may further increase or decrease the space
	between [=typographic character units=]
	in order to [[#text-justify-property|justify text]].

	<wpt>
	letter-spacing/letter-spacing-bidi-001.html
	letter-spacing/letter-spacing-bidi-004.xht
	letter-spacing/letter-spacing-nesting-003.xht
	letter-spacing/letter-spacing-bidi-003.xht
	letter-spacing/letter-spacing-bidi-004.xht
	letter-spacing/letter-spacing-bidi-005.xht
	letter-spacing/letter-spacing-206.html
	letter-spacing/letter-spacing-211.html
	letter-spacing/letter-spacing-212.html
	letter-spacing/letter-spacing-bengali-yaphala-001.html
	</wpt>

	<wpt pathprefix="/css/CSS2">
	bidi-005.xht
	bidi-006.xht
	bidi-007.xht
	bidi-008.xht
	bidi-009.xht
	bidi-010.xht
	bidi-text/bidi-005a.xht
	bidi-text/bidi-005b.xht
	bidi-text/bidi-006a.xht
	bidi-text/bidi-006b.xht
	bidi-text/bidi-007b.xht
	bidi-text/bidi-008b.xht
	bidi-text/bidi-009b.xht
	bidi-text/bidi-010b.xht
	text/letter-spacing-justify-001.xht
	</wpt>

	Values have the following meanings:

	<dl dfn-for=letter-spacing dfn-type=value>
		<dt><dfn>normal</dfn>
		<dd>
			No additional spacing is applied. Computes to zero.

			<wpt pathprefix="/css/CSS2/text">
			letter-spacing-100.xht
			</wpt>

		<dt><dfn>&lt;length-percentage&gt;</dfn>
		<dd>
			Specifies <em>additional</em> spacing
			between [=typographic character units=].
			Values may be negative,
			but there may be implementation-dependent limits.

			<wpt>
			tab-size/tab-size-spacing-001.html
			</wpt>

			Note: Percentages inherit intact,
			and are resolved against
			the used 'font-size' of the current element
			(and thus represent a size relative to
			the size of the text to which they apply),
			unlike ''em'' units which are resolved against
			the computed 'font-size' of the element from which they inherit,
			as an absolute length.

			<wpt pathprefix="/css/CSS2/text">
			letter-spacing-004.xht
			letter-spacing-005.xht
			letter-spacing-006.xht
			letter-spacing-007.xht
			letter-spacing-008.xht
			letter-spacing-016.xht
			letter-spacing-017.xht
			letter-spacing-018.xht
			letter-spacing-019.xht
			letter-spacing-020.xht
			letter-spacing-028.xht
			letter-spacing-029.xht
			letter-spacing-030.xht
			letter-spacing-031.xht
			letter-spacing-032.xht
			letter-spacing-040.xht
			letter-spacing-041.xht
			letter-spacing-042.xht
			letter-spacing-043.xht
			letter-spacing-044.xht
			letter-spacing-052.xht
			letter-spacing-053.xht
			letter-spacing-054.xht
			letter-spacing-055.xht
			letter-spacing-056.xht
			letter-spacing-064.xht
			letter-spacing-065.xht
			letter-spacing-066.xht
			letter-spacing-067.xht
			letter-spacing-068.xht
			letter-spacing-076.xht
			letter-spacing-077.xht
			letter-spacing-078.xht
			letter-spacing-079.xht
			letter-spacing-080.xht
			letter-spacing-088.xht
			letter-spacing-089.xht
			letter-spacing-090.xht
			letter-spacing-091.xht
			letter-spacing-092.xht
			letter-spacing-097.xht
			letter-spacing-098.xht
			letter-spacing-099.xht
			letter-spacing-101.xht
			letter-spacing-102.xht
			</wpt>
			<wpt>
			letter-spacing/letter-spacing-percent-001.html
			</wpt>
	</dl>

	For <a href="https://github.com/w3c/csswg-drafts/issues/1484">legacy reasons</a>,
	a computed 'letter-spacing' of zero
	yields a [=resolved value=]
	({{getComputedStyle()}} return value)
	of ''letter-spacing/normal''.

	For the purpose of 'letter-spacing',
	each consecutive run of [=atomic inlines=]
	(such as images and inline blocks)
	is treated as a single [=typographic character unit=].

	<wpt>
	letter-spacing/letter-spacing-204.html
	</wpt>

	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.

	<wpt>
	letter-spacing/letter-spacing-trim-start-001.html
	letter-spacing/letter-spacing-trim-start-002.html
	letter-spacing/letter-spacing-end-of-line-001.html
	tab-size/tab-size-spacing-001.html
	letter-spacing/letter-spacing-200.html
	letter-spacing/letter-spacing-201.html
	white-space/white-space-letter-spacing-001.html
	</wpt>

	<div class="example">
		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 highlight=css>
			p { letter-spacing: 1em; }
		</pre>

		<xmp highlight=html>
			<p>abc</p>
		</xmp>

		<p class="ls-ex good ls-fixed-width color-box" style="text-align: left">a&#x3000;b&#x3000;c</p>
		<p class="ls-ex good ls-fixed-width color-box" style="text-align: right">a&#x3000;b&#x3000;c</p>

		UAs therefore <em>really should not</em> [[RFC6919]]
		append letter spacing to the right or trailing edge of a line:

		<p class="ls-ex bad ls-fixed-width color-box" style="text-align: right">a&#x3000;b&#x3000;c&#x3000;</p>
	</div>

	Letter spacing between two [=typographic character units=]
	effectively “belongs” to the innermost element
	that contains the two [=typographic character units=]:
	the total letter spacing between two adjacent [=typographic character units=]
	(after bidi reordering)
	is specified by and rendered within the innermost element
	that <em>contains</em> the boundary
	between the two [=typographic character units=].
	However, the UA may instead attach letter-spacing at element boundaries
	to one or the other [=typographic character unit=]
	using the letter-spacing value pertaining to its containing element.

	Note: This secondary behavior is permitted in this level
	due to Web-compat concerns.

	<wpt>
	letter-spacing/letter-spacing-bidi-002.html
	letter-spacing/letter-spacing-bidi-004.xht
	letter-spacing/letter-spacing-bidi-005.xht
	letter-spacing/letter-spacing-nesting-001.html
	letter-spacing/letter-spacing-nesting-002.html
	letter-spacing/letter-spacing-nesting-003.xht
	letter-spacing/letter-spacing-203.html
	letter-spacing/letter-spacing-205.html
	</wpt>

	<div class="example">
		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 highlight=css>p { letter-spacing: 1em; }</pre>

		<xmp highlight=html><p>a<span>bb</span>c</p></xmp>

		<p class="ls-ex good">a&#x3000;<span class="color-box">b&#x3000;b</span>&#x3000;c</p>

		<p class="ls-ex bad">a&#x3000;<span class="color-box">b&#x3000;b&#x3000;</span>c</p>

		Consequently a given value of 'letter-spacing' is expected
		to only affect the spacing between characters
		completely contained within the element for which it is specified:

		<pre highlight=css>
			p    { letter-spacing: 1em; }
			span { letter-spacing: 2em; }
		</pre>

		<xmp highlight=html><p>a<span>bb</span>c</p></xmp>

		<p class="ls-ex">a&#x3000;<span class="color-box">b&#x3000;&#x3000;b</span>&#x3000;c</p>

		<p>This further implies that applying 'letter-spacing' to
		an element containing only a single character
		has no effect on the rendered result:

		<pre highlight=css>
			p    { letter-spacing: 1em; }
			span { letter-spacing: 2em; }
		</pre>

		<xmp highlight=html><p>a<span>b</span>c</p></xmp>

		<p class="ls-ex">a&#x3000;<span class="color-box">b</span>&#X3000;c</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 "&#x5d0;":

		<pre highlight=css>
			p    { letter-spacing: 1em; }
			span { letter-spacing: 2em; }
		</pre>

		<pre highlight=html>

			&lt;!-- abc followed by Hebrew letters alef (&#x5d0;), bet (&#x5d1;) and gimel (&#x5d2;) -->
			&lt;!-- Reordering will display these in reverse order. --&gt;
			<bdo dir=ltr>&lt;p>ab&lt;span>c&#x5d0;&lt;/span>&#x5d1;&#x5d2;&lt;/p></bdo>
		</pre>

		<p class="ls-ex">a&#x3000;b&#x3000;<span class="color-box">c</span>&#x3000;<span class="color-box">&#x5d0;</span>&#x3000;&#x5d1;&#x3000;&#x5d2;</p>
	</div>

	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.

	<wpt>
	letter-spacing/letter-spacing-control-chars-001.html
	letter-spacing/letter-spacing-202.html
	</wpt>

	<div class="example">
		For example, 'letter-spacing' applied to
		<code highlight=html>A&amp;#x200B;B</code> is identical to <code highlight=html>AB</code>,
		regardless of where any element boundaries might fall.
	</div>

	When the effective spacing between two characters is not zero
	(due to either [[#text-justify-property|justification]]
	or a non-zero value of 'letter-spacing'),
	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 'font-feature-settings' property
	take precedence over this rule.
	See [[css-fonts-3#feature-precedence]].

	<wpt>
	letter-spacing/letter-spacing-ligatures-001.html
	letter-spacing/letter-spacing-ligatures-002.html
	letter-spacing/letter-spacing-ligatures-003.html
	letter-spacing/letter-spacing-ligatures-004.html
	</wpt>

	<div class="example">
		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">ﬁlial</strong>
		</figure>
	</div>

	Note: 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.

<h4 id="cursive-tracking">
Cursive Scripts</h4>

	<wpt title="This section lacks tests. Not sure automated tests are possible."></wpt>

	If it is able,
	the UA <em>may</em> apply letter spacing to [=cursive scripts=]
	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 [=cursive script=]
	without breaking its cursive connections,
	it <em>must not</em> apply spacing
	between any pair of that script’s [=typographic letter units=] at all
	(effectively treating each word as a single [=typographic letter unit=]
	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.

	<div class="example">
		Below are some appropriate and inappropriate examples of spacing out Arabic text.

		<table class="data">
		<thead>
			<tr>
				<td><img src="images/arabic-stretch-original.png" alt="">
				<td>&mdash;
				<td>Original text
		<tbody>
			<tr>
				<td><img src="images/arabic-stretch-spaced.png" alt="">
				<td class="no">BAD
				<th>
					Even distribution of space between each letter.
					<em>Notice this breaks cursive joins!</em>
			<tr>
				<td><img src="images/arabic-stretch-kashida.png" alt="">
				<td class="ok">OK
				<th>
					Distributing &sum;<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 src="images/arabic-stretch-suppressed.png" alt="">
				<td class="ok">OK
				<th>
					Suppressing 'letter-spacing' between Arabic letters.
					<em>Notice 'letter-spacing' is nonetheless applied
					to non-Arabic characters (like [=spaces=]).</em>

			<tr>
				<td><img src="images/arabic-stretch-unjoined.png" alt="">
				<td class="no">BAD
				<th>
					Applying 'letter-spacing' only between non-joined letters.
					<em>This distorts typographic color and obfuscates word boundaries.</em>
		</table>
	</div>

	Note: 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 'letter-spacing' to cursive scripts
	unless they are prepared to accept non-interoperable results.

<h3 id="line-padding-property">
Line Start/End Padding: the 'line-padding' property</h3>

	<wpt title="This section lacks tests."></wpt>

	<pre class="propdef">
	Name: line-padding
	Value: <<length>>
	Initial: 0
	Applies to: <a>inline boxes</a>
	Inherited: yes
	Percentages: N/A
	Computed value: absolute length
	Animation type: by computed value type
	</pre>

	Whereas 'letter-spacing' adjusts spacing
	between <a>typographic character units</a>
	and does not apply at the start or end of a line,
	this property adjusts spacing only at the start/end of a line.
	The extra spacing is applied only
	by the <em>innermost</em> <a>inline box</a>
	at the start/end of the line box,
	and is inserted between that <a>inline box</a>’s content edge
	and the adjacent <a>inline-level</a> content
	([=text sequence|text=] <em>or</em> <a>atomic inline</a>).
	This extra space is not a <a>justification opportunity</a>.

	<div class="example">
		Given the following HTML and CSS:
		<xmp>
			p    { line-padding: 0.5em; line-height: 1; text-align: center }
			span { background: black; color: white; }
			em   { background: green; color: white; }

			<p><span>Here is <em>some text</em></span>
		</xmp>

		Line-padding will be inserted such that
		an extra 0.5em of inline background will be visible
		on each side of each line.
		If it renders such that there is a break between “some” and “text”,
		the additional padding will be:
		on the first line, black on the left and green on the right,
		and on the second line, green on both sides.

		<style>
			#line-padding-rendering         { line-height: 1; text-align: center; color: white; }
			#line-padding-rendering span    { background: black; padding-left: 0.5em; }
			#line-padding-rendering em      { background: green; padding-right: 0.5em; }
			#line-padding-rendering em + em { padding-left: 0.5em; }
		</style>
		<pre class="figure" id="line-padding-rendering">
			<span>Here is <em>some</em>
			<em>text</em></span>
		</pre>
	</div>

<h3 id="text-autospace-property">
Automatic Contextual Spacing: the 'text-autospace' property</h3>

	<wpt title="This section has spotty coverage."></wpt>

	<pre class="propdef">
	Name: text-autospace
	Value: normal | <<autospace>> | auto
	Initial: normal
	Applies to: text
	Inherited: yes
	Percentages: N/A
	Computed value: specified keyword(s)
	Animation type: discrete
	</pre>

	<wpt>
		parsing/text-autospace-computed.html
		parsing/text-autospace-invalid.html
		parsing/text-autospace-valid.html
		text-autospace/text-autospace-001.html
		text-autospace/text-autospace-break-001.html
	</wpt>

	Controls spacing between adjacent characters
	on the same line within the same [=inline formatting context=]
	using a set of character-class-based rules,
	allowing for automatic control over inter-script spacing
	and for spacing around punctuation.

	<wpt>
		text-autospace/text-autospace-vertical-combine-001.html
		text-autospace/text-autospace-vertical-upright-001.html
	</wpt>

	Values are defined as follows:

	<pre class=prod>
		<dfn><<autospace>></dfn> = no-autospace |
		              [ ideograph-alpha || ideograph-numeric || punctuation ]
		              || [ insert | replace ]
	</pre>

	<dl dfn-for=text-autospace dfn-type=value>
		<dt><dfn>normal</dfn>
		<dd>
			Same behavior as ''ideograph-alpha ideograph-numeric''.

			<wpt>
				text-autospace/text-autospace-break-001.html
				text-autospace/text-autospace-dynamic-001.html
				text-autospace/text-autospace-dynamic-text-001.html
				text-autospace/text-autospace-dynamic-text-002.html
				text-autospace/text-autospace-dynamic-text-003.html
				text-autospace/text-autospace-dynamic-text-004.html
				text-autospace/text-autospace-first-line-001.html
				text-autospace/text-autospace-ligature-001.html
				text-autospace/text-autospace-mixed-001.html
			</wpt>

		<dt><dfn>no-autospace</dfn>
		<dd>
			No automatic space is inserted.

			<wpt>
				text-autospace/text-autospace-001.html
				text-autospace/text-autospace-no-001.html
				text-autospace/text-autospace-dynamic-001.html
				text-autospace/text-autospace-ligature-001.html
				text-autospace/text-autospace-mixed-001.html
			</wpt>

		<dt><dfn>insert</dfn>
		<dd>
			The specified spacing is automatically inserted
			if there are no space characters of any kind ([=Unicode general category=] <code>Z</code>) already there.

			If neither ''text-autospace/insert'' nor ''text-autospace/replace'' are specified,
			the behavior is the same as ''text-autospace/insert''.

		<dt><dfn>replace</dfn>
		<dd>
			The specified spacing is automatically inserted
			even if there is already a [=space=] (U+0020) at that point;
			additionally, the [=space=] (U+0020) is removed.
			Other types of space characters ([=Unicode general category=] <code>Z</code>)
			suppress automatic spacing, as for ''text-autospace/insert''.

			Note: This is for correcting text which is using the easy-to-type U+0020
			instead of proper spacing.

		<dt><dfn>ideograph-alpha</dfn>
		<dd>
			Creates extra spacing between runs of
			<a>ideographs</a> and <a>non-ideographic letters</a>,
			see [[#inter-script-spacing]].

			<wpt>
				text-autospace/text-autospace-ideogram-alpha-001.html
			</wpt>

		<dt><dfn>ideograph-numeric</dfn>
		<dd>
			Creates extra spacing between runs of
			<a>ideographs</a> and <a>non-ideographic numerals</a>,
			see [[#inter-script-spacing]].

		<dt><dfn>punctuation</dfn>
		<dd>
			Creates extra non-breaking spacing around punctuation as required by language-specific typographic conventions.

			In this level, if the element's content language is French,
			narrow no-break space (U+202F) and no-break space (U+00A0) is inserted
			where required by <a href="https://web.archive.org/web/20201112013601/http://unicode.org/udhr/n/notes_fra.html">French typographic guidelines</a>.
			Otherwise this value has no effect.
			However future specifications may add automatic spacing behavior for other languages.

		<dt><dfn>auto</dfn>
		<dd>
			The user agent chooses a set of typographically high quality spacing values.
			Different user agents running on different platforms may pick different values.

			Note: These spacing values may or may not match OS platform conventions.
	</dl>

	This property is additive with the 'word-spacing' and 'letter-spacing' properties.
	That is, the amount of spacing contributed by the 'letter-spacing' setting (if any)
	is added to the spacing created by 'text-autospace'.
	The same applies to 'word-spacing'.

	At element boundaries, the amount of extra spacing introduced between characters
	is determined by and rendered within the innermost element that contains the boundary.

<h4 id="inter-script-spacing">
Inter-script Spacing</h4>

	<wpt title="
		This section does not need direct tests:
		the definition given here is exercised by
		''text-autospace: ideograph-alpha'' and
		''text-autospace: ideograph-numeric''.
		"></wpt>

	The ''ideograph-alpha'' and ''ideograph-numeric'' values
	introduce spacing at the boundary between particular classes of characters
	when they are directly adjoining on a line,
	i.e. without any intervening non-zero [=margin=], [=border=], or [=padding=]
	or intervening characters (such as a quotation mark or a space).
	The amount of space introduced by these keywords is 1/8 of the CJK advance measure,
	i.e ''0.125ic'' if the [=used value=] of 'font-size' is same as its [=computed value=].

	Note: Spacing conventions vary, but values typically range from 1/4ic to as low as 1/8ic,
	with 1/4ic being more common in historical contexts due to metal type limitations
	and 1/6ic or thinner being more common in proportional typesetting.
	Because these spaces are inserted by default
	(through the initial value, ''text-spacing/normal''),
	CSS uses 1/8ic in order to be conservative in its interference.
	A future level of this module may introduce control
	over the amount of spacing.

<h3 id="text-spacing-trim-property">
CJK Punctuation Spacing: the 'text-spacing-trim' property</h3>

	<wpt title="
		This section has spotty test coverage.

		The following aspects lack tests:
		* inheritance
		* animation type
		* applies to text
		* tests for end-of-line behavior for all values
		* tests for start-of-line behavior for all values other than normal, trim-start, and space-first
		* tests for adjacent pairs for all values other than the initial value"></wpt>

	<pre class="propdef">
	Name: text-spacing-trim
	Value: <<spacing-trim>> | auto
	Initial: normal
	Applies to: text
	Inherited: yes
	Percentages: N/A
	Computed value: specified keyword(s)
	Animation type: discrete
	</pre>

	<wpt>
		parsing/text-spacing-trim-computed.html
		parsing/text-spacing-trim-invalid.html
		parsing/text-spacing-trim-valid.html
		text-spacing-trim/text-spacing-trim-001.html
		text-spacing-trim/text-spacing-trim-colon-001.html
		text-spacing-trim/text-spacing-trim-combinations-001.html
		text-spacing-trim/text-spacing-trim-dot-001.html
	</wpt>

	Controls spacing around CJK punctuation characters
	on the same line within the same [=inline formatting context=]
	using a set of character-class-based rules,
	allowing them to be set halfwidth or fullwidth
	based on their position and neighbors within the line.

	Values are defined as follows:

	<pre class=prod>
		<dfn><<spacing-trim>></dfn> = space-all | normal | space-first | trim-start | trim-both | trim-all
	</pre>

	<wpt>
		parsing/text-spacing-trim-invalid.html
		parsing/text-spacing-trim-valid.html
	</wpt>

	<dl dfn-for=text-spacing-trim dfn-type=value>
		<dt><dfn>space-all</dfn>
		<dd>
			All fullwidth punctuation characters are set with full-width glyphs (spaced).

			<wpt>
				text-spacing-trim/text-spacing-trim-space-all-001.html
				text-spacing-trim/text-spacing-trim-dynamic-001.html
			</wpt>

		<dt><dfn>normal</dfn>
		<dd>
			Set <a>fullwidth opening punctuation</a> with full-width glyphs (spaced)
			at the start of each line;
			set <a>fullwidth closing punctuation</a> with half-width glyphs (flush)
			at the end of each line
			if it does not otherwise fit prior to justification,
			else set the punctuation with full-width glyphs;
			and collapse spacing between punctuation glyphs
			<a href="#fullwidth-collapsing">as described below</a>.

			<wpt>
			text-spacing-trim/text-spacing-trim-span-001.html
			text-spacing-trim/text-spacing-trim-subset-001.html
			</wpt>

		<dt><dfn>trim-both</dfn>
		<dd>
			Set <a>fullwidth opening punctuation</a> with half-width glyphs (flush)
			at the start of each line;
			set <a>fullwidth closing punctuation</a> with half-width glyphs (flush)
			at the end of each line;
			and collapse spacing between punctuation glyphs
			<a href="#fullwidth-collapsing">as described below</a>.

		<dt><dfn>space-first</dfn>
		<dd>
			Set <a>fullwidth opening punctuation</a> with full-width glyphs (spaced)
			on the first line of the [=block container=]
			and each line after a [=forced line break=].
			Otherwise as ''text-spacing/normal''.

			<wpt>
				text-spacing-trim/text-spacing-trim-001.html
				text-spacing-trim/text-spacing-trim-colon-001.html
				text-spacing-trim/text-spacing-trim-combinations-001.html
				text-spacing-trim/text-spacing-trim-dot-001.html
				text-spacing-trim/text-spacing-trim-quote-001.html
				text-spacing-trim/text-spacing-trim-start-001.html
				text-spacing-trim/text-spacing-trim-span-001.html
			</wpt>

			<details class="note">
				<summary>This value exists for compat requirements.</summary>

				This value exists to manage formatting of some existing Chinese and Japanese content,
				for which ''trim-both'' would have been appropriate typographically,
				except that they are already written
				to expect the first line to be set as for ''space-all''.

				Specifically,
				due to the lack of reliable 'hanging-punctuation' support across UAs,
				existing content (especially ePub content)
				uses U+3000 ideographic space in place of 'text-indent',
				but omits it when the paragraph begins with punctuation
				that is desired to hang in the indent
				in order to create the hanging punctuation effect.
				Using ''trim-both'' on the first line
				would thus trim away the effective indent in such content
				and thus obscure that line's distinction
				as the first line of a new paragraph.

				Note that this typesetting practice
				of using ideographic spaces for indentation
				(sometimes and not always)
				is contrary to the separation of content and style offered by HTML and CSS.
				Using 'hanging-punctuation' and 'text-indent'
				to control paragraph formatting
				rather than tweaking the text content of the document
				preserves the text’s true semantics in the document source
				and allows the style sheet designer
				to freely switch among the various spacing/indentation styles
				without needing to alter the content.
				See [[#japanese-start-edges]] for examples.

				Additionally, the behavior at the end of lines is aligned
				with the ''text-spacing-trim/normal'' and ''trim-start'' values
				rather than ''text-spacing-trim/trim-both'',
				in that it only trims the glyphs
				if they do not otherwise fit prior to justification.
				While improving the typography in fewer cases,
				it is closer to the legacy behavior of ''space-all''
				which reduces compatibility concerns.
			</details>

		<dt><dfn>trim-start</dfn>
		<dd>
			Set <a>fullwidth opening punctuation</a> with half-width glyphs (flush)
			at the start of each line.
			Otherwise as ''text-spacing-trimm/normal''.

			<wpt>
			text-spacing-trim/text-spacing-trim-start-001.html
			text-spacing-trim/text-spacing-trim-start-002.html
			text-spacing-trim/text-spacing-trim-end-001.html
			text-spacing-trim/text-spacing-trim-span-001.html
			</wpt>

		<dt><dfn>trim-all</dfn>
		<dd>
			Set <a>fullwidth opening punctuation</a>,
			<a>fullwidth closing punctuation</a>,
			and <a>fullwidth middle dot punctuation</a>
			with half-width glyphs,
			without regards for the position within the line
			nor for adjacent characters.

			<wpt>
				text-spacing-trim/text-spacing-trim-trim-all-001.html
			</wpt>

		<dt><dfn>auto</dfn>
		<dd>
			The user agent chooses a set of typographically high quality spacing values.
			Different user agents running on different platforms may pick different values.

			Note: These spacing values may or may not match OS platform conventions.

			ISSUE: Do we need ''text-spacing-trim/auto''? It would be weird for the author to choose platform-dependent behavior at the start of the first line, and it should otherwise use ''text-spacing-trim/trim-both''.
	</dl>

	<div class=note>
		Here is an informal summary of what the various values do:

		<table class="complex data">
		<thead>
			<tr>
				<th>Value
				<th>Trim at line start
				<th>Trim at line end
				<th>Trim adjacent pairs
				<th>Trim everywhere
		<tbody>
			<tr>
				<th>''space-all''
				<td colspan=4>no
			<tr>
				<th>''text-spacing-trim/normal''
				<td>no
				<td rowspan=3>only if would not fit
				<td rowspan=4>yes
				<td rowspan=4>no
			<tr>
				<th>''space-first''
				<td>yes except on the first line
			<tr>
				<th>''trim-start''
				<td rowspan=2>yes
			<tr>
				<th>''trim-both''
				<td>yes
			<tr>
				<th>''trim-all''
				<td colspan=4>yes
			<tr>
				<th>''text-spacing-trim/auto''
				<td colspan=4>user-agent specific / platform dependent
		</table>
	</div>


<h4 id="fullwidth-collapsing">
Fullwidth Punctuation Collapsing</h4>

	<wpt title="
		This section has basic test coverage.

		The following aspects lack tests:
		* The UA must not use the hwid feature or otherwise substitute halfwidth forms as switching to halfwidth glyphs can change the glyph shape which is not acceptable here.
		* changing font sizes"></wpt>

	Typically, fullwidth characters have glyphs with the same advance width
	as a standard Han character (e.g. 水 U+6C34).
	However, many fullwidth punctuation glyphs only take up part of the fullwidth design space.
	Thus such punctuation are not always set fullwidth.
	Several values of 'text-spacing-trim' allow the author to control
	when such characters are set half-width (typically half the width of an ideograph)
	and when they are set full-width.

	In order to set the text as specified, the UA will need to either
	<ul>
		<li>
			trim (kern) the blank half of the glyphs,
			if they are given full-width and must be set half-width, or
		<li>
			add space to the glyphs,
			if they are given half-width and must be set full-width.
	</ul>

	The UA <em>may</em> use the OpenType <code>halt</code> and <code>vhal</code> features
	if implemented by a font
	in order to perform the requisite trimming of a particular glyph.
	The UA <em>must not</em> use the <code>hwid</code> feature
	or otherwise substitute halfwidth forms
	as switching to halfwidth glyphs can change the glyph shape
	which is not acceptable here.

	Some fonts use proportional glyphs for fullwidth punctuation characters.
	If there is no support in the font for distinguishing
	fullwidth vs halfwidth glyph shapes
	(e.g. through font features),
	then for such proportional glyphs,
	the given advance width is considered
	simultaneously full-width and half-width:
	the UA must not add or remove space to these glyphs.

	<wpt>
		text-spacing-trim/text-spacing-trim-feature-001.html
	</wpt>

	Note: The advance width of a standard Han character
	can be determined either from font metrics
	such as the OpenType <code>ideo</code> and <code>idtp</code> baselines for the opposite writing mode,
	or by taking the advance width of a Han character such as 水 U+6C34.
	(The opposite writing mode must be used because some fonts are compressed
	so that the characters are not square.)
	More information on OpenType metrics can be found
	<a href="https://docs.microsoft.com/en-us/typography/opentype/spec/baselinetags#ideoembox">in the OpenType spec</a>.
	Note that if 水 U+6C34, 卜 U+535C, and 一 U+4E00 do not all have the same advance width,
	the font has proportional ideographs
	and the fullwidth advance width cannot be reliably determined by measuring glyphs.

	Some fonts have fullwidth punctuation characters
	whose blank are too small to trim (kern.)
	UA may choose not to trim (kern)
	when the UA determined the trimming (kerning) may cause
	glyph cut-offs, collisions, or excessive kerning
	through glyph bounding box, glyph metrics, or font features.

	If 'text-spacing-trim' is ''trim-all'',
	the UA must collapse the space typically associated with such full width glyphs
	regardless of the context in which they appear.
	Otherwise, unless 'text-spacing-trim' is set to ''space-all''
	(or the font has proportional fullwidth punctuation glyphs),
	the UA must collapse the space typically associated with such full width glyphs
	when placed adjacently on a line
	as follows:

	<ul>
		<li>
			Set <a>fullwidth opening punctuation</a> half-width if the previous character is any of:
			* a <a>fullwidth opening punctuation</a>
				<wpt>
					text-spacing-trim/text-spacing-trim-001.html
					text-spacing-trim/text-spacing-trim-colon-001.html
				</wpt>
			* a <a>fullwidth middle dot punctuation</a>
				<wpt>
					text-spacing-trim/text-spacing-trim-dot-001.html
				</wpt>
			* an ideographic space (U+3000)
				<wpt>
					text-spacing-trim/text-spacing-trim-001.html
				</wpt>
			* a <a>fullwidth closing punctuation</a> of an equivalent or larger 'font-size'
				<wpt>
					text-spacing-trim/text-spacing-trim-001.html
				</wpt>
			* a character belonging to Unicode [=general category=] <code>Ps</code>
				<wpt>
					text-spacing-trim/text-spacing-trim-quote-001.html
					text-spacing-trim/text-spacing-trim-narrow-001.html
				</wpt>

			Otherwise set it full-width.
		<li>
			Set <a>fullwidth closing punctuation</a> half-width if the next character is any of:
			* a <a>fullwidth closing punctuation</a>
				<wpt>
					text-spacing-trim/text-spacing-trim-001.html
				</wpt>
			* a <a>fullwidth middle dot punctuation</a>
				<wpt>
					text-spacing-trim/text-spacing-trim-dot-001.html
				</wpt>
			* an ideographic space (U+3000)
				<wpt>
					text-spacing-trim/text-spacing-trim-001.html
				</wpt>
			* a <a>fullwidth opening punctuation</a> of a larger 'font-size'
			* a character belonging to Unicode [=general category=] <code>Pe</code>
				<wpt>
					text-spacing-trim/text-spacing-trim-narrow-001.html
				</wpt>

			Otherwise set it full-width.
	</ul>

			<wpt>
				text-spacing-trim/text-spacing-trim-001.html
				text-spacing-trim/text-spacing-trim-colon-001.html
				text-spacing-trim/text-spacing-trim-combinations-001.html
				text-spacing-trim/text-spacing-trim-dot-001.html
			</wpt>

	<div class="example">
		The following example table lists the punctuation pairs
		affected by adjacent-pairs trimming.
		It uses halfwidth equivalents to approximate the trimming effect.

		<style>
			.char { border: 1px dotted gray; }
			.quarter { font-size: 25%; }
			samp[lang="ja"] { font-family: "MS Gothic", "Osaka-Mono", monospace }
		</style>
		<table class="data">
			<caption>Demonstration of adjacent-pairs punctuation trimming</caption>
			<thead>
				<tr><th>Combination
						<th>Sample Pair
						<th>Looks Like
			<tbody>
				<tr><th scope=row>Opening&#8212;Opening
						<td><samp lang="ja" class="char">〔</samp>+<samp lang="ja" class="char">（</samp>
						<td><samp lang="ja" class="char">〔</samp><samp lang="ja" class="char half-r">(</samp>
				<tr><th scope=row>Middle Dot&#8212;Opening
						<td><samp lang="ja" class="char">・</samp>+<samp lang="ja" class="char">（</samp>
						<td><samp lang="ja" class="char">・</samp><samp lang="ja" class="char">(</samp>
				<tr><th scope=row>Closing&#8212;Opening
						<td><samp lang="ja" class="char">〕</samp>+<samp lang="ja" class="char">（</samp>
						<td><samp lang="ja" class="char">〕</samp><samp lang="ja" class="char">(</samp>
				<tr><th scope=row>Ideographic Space&#8212;Opening
						<td><samp lang="ja" class="char">　</samp>+<samp lang="ja" class="char">（</samp>
						<td><samp lang="ja" class="char">　</samp><samp lang="ja" class="char">(</samp>
				<tr><th scope=row>Closing&#8212;Closing
						<td><samp lang="ja" class="char">）</samp>+<samp lang="ja" class="char">〕</samp>
						<td><samp lang="ja" class="char">)</samp><samp lang="ja" class="char">〕</samp>
				<tr><th scope=row>Closing&#8212;Middle Dot
						<td><samp lang="ja" class="char">）</samp>+<samp lang="ja" class="char">・</samp>
						<td><samp lang="ja" class="char">)</samp><samp lang="ja" class="char">・</samp>
				<tr><th scope=row>Closing&#8212;Ideographic Space
						<td><samp lang="ja" class="char">）</samp>+<samp lang="ja" class="char">　</samp>
						<td><samp lang="ja" class="char">)</samp><samp lang="ja" class="char">　</samp>
		</table>
	</div>

<h4 id="text-spacing-classes">
Text Spacing Character Classes</h4>

	<wpt title="
		This section is mostly definitions,
		which are tested through their use in other sections,
		rather than needing tests of their own.

		However, there are normative statements,
		so far untested,
		notably the classification
		of fullwidth colon punctuation and fullwidth dot punctuation
		under either the fullwidth closing punctuation category
		or the fullwidth middle dot punctuation category."></wpt>

	In the context of this property the following definitions apply:

	Issue(9503): Classes and Unicode code points are under review,
	and at least some changes are needed to accommodate more recent additions to Unicode.

	<dl>
		<dt><dfn>ideographs</dfn>
		<dd>Includes all [=typographic character units=] [[CSS-TEXT-3]] whose base character is listed below:
			<ul>
				<li>All characters in the range of U+3041 to U+30FF,
					except those that belong to Unicode Punctuation [P*] [=general category=].
				<li>CJK Strokes (U+31C0 to U+31EF).
				<li>Katakana Phonetic Extensions (U+31F0 to U+31FF).
				<li>All characters that have the Han [=script property=].
			</ul>

		<dt><dfn>non-ideographic letters</dfn>
		<dd>
			Includes all [=typographic character units=] that
			belong to Unicode Letters [L*] and Mark [M*] [=general category=],
			except when any of the following conditions are met:
			<ul>
				<li>is defined as <a>ideograph</a>.
				<li>is categorized as East Asian Fullwidth (F) by [[!UAX11]].
				<li>is upright in vertical text flow using the 'text-orientation' property
					or the 'text-combine-upright' property.

					<wpt>
						text-autospace/text-autospace-vertical-upright-001.html
						text-autospace/text-autospace-vertical-combine-001.html
					</wpt>
			</ul>

		<dt><dfn>non-ideographic numerals</dfn>
		<dd>
			Includes all [=typographic character=] units that
			belong to the Unicode Decimal Digit Number [Nd] [=general category=],
			except when any of the following conditions are met:
			<ul>
				<li>is categorized as East Asian Fullwidth (F) by [[!UAX11]].
				<li>is upright in vertical text flow using the 'text-orientation' property
					or the 'text-combine-upright' property.
			</ul>

		<dt><dfn>fullwidth opening punctuation</dfn>
		<dd>
			Includes any opening punctuation character (Unicode category <code>Ps</code>)
			that belongs to the CJK Symbols and Punctuation block (U+3000&#8211;U+303F)
			or is categorized as East Asian Fullwidth (F) by [[!UAX11]].
			Also includes LEFT SINGLE QUOTATION MARK (U+2018) and LEFT DOUBLE QUOTATION MARK (U+201C).
			When trimmed, the left (for horizontal text) or top (for vertical text) half is kerned.

		<dt><dfn>fullwidth closing punctuation</dfn>
		<dd>
			Includes any closing punctuation character (Unicode category <code>Pe</code>)
			that belongs to the CJK Symbols and Punctuation block (U+3000&#8211;U+303F)
			or is categorized as East Asian Fullwidth (F) by [[!UAX11]].
			Also includes RIGHT SINGLE QUOTATION MARK (U+2019) and RIGHT DOUBLE QUOTATION MARK (U+201D).
			May also include [=fullwidth colon punctuation=] and/or [=fullwidth dot punctuation=]
			(<a href="#fullwidth-ambiguous">see below</a>).
			When trimmed, the right (for horizontal text) or bottom (for vertical text) half is kerned.

		<dt><dfn>fullwidth middle dot punctuation</dfn>
		<dd>
			Includes MIDDLE DOT (U+00B7), HYPHENATION POINT (U+2027), and KATAKANA MIDDLE DOT (U+30FB).
			May also include [=fullwidth colon punctuation=] and/or [=fullwidth dot punctuation=]
			(<a href="#fullwidth-ambiguous">see below</a>).

		<dt><dfn>fullwidth colon punctuation</dfn>
		<dd>
			Includes FULLWIDTH COLON (U+FF1A) and FULLWIDTH SEMICOLON (U+FF1B).

		<dt><dfn>fullwidth dot punctuation</dfn>
		<dd>
			Includes
			IDEOGRAPHIC COMMA (U+3001),
			IDEOGRAPHIC FULL STOP (U+3002),
			FULLWIDTH COMMA (U+FF0C),
			FULLWIDTH FULL STOP (U+FF0E).
	</dl>

	<p id=fullwidth-ambiguous>
	Whether [=fullwidth colon punctuation=] and [=fullwidth dot punctuation=]
	should be considered [=fullwidth closing punctuation=] or [=fullwidth middle dot punctuation=]
	depends on where in the glyph's box the punctuation is drawn.
	If the punctuation is centered,
	then it should be considered middle dot punctuation.
	If the punctuation is drawn to one side (left in horizontal text, top in vertical text)
	and the other half is therefore blank
	then the punctuation should be considered closing punctuation and trimmed accordingly.

	The UA must classify [=fullwidth colon punctuation=] and [=fullwidth dot punctuation=]
	under either the [=fullwidth closing punctuation=] category or the [=fullwidth middle dot punctuation=] category
	as appropriate.
	The UA may rely on language conventions and the writing mode (horizontal vs. vertical),
	and/or font information to determine this categorization.
	The UA may also add additional characters to any category as appropriate.

	<div class="note">
		The following informative table summarizes language conventions
		for classifying fullwidth colon and dot punctuation:

		<table class="data">
			<colgroup class="header"></colgroup>
			<colgroup span=2></colgroup>
			<thead>
				<tr><td> <th>colon punctuation <th>dot punctuation
			<tbody>
				<tr><th>Simplified Chinese (horizontal) <td>closing <td>closing
				<tr><th>Simplified Chinese (vertical) <td>closing <td>closing
				<tr><th>Traditional Chinese <td>middle dot <td>middle dot
				<tr><th>Korean <td>middle dot <td>closing
				<tr><th>Japanese <td>middle dot <td>closing
		</table>

		Note that for Chinese fonts at least,
		the author observes that the standard convention is often not followed.
	</div>

<h4 id="japanese-start-edges">
Japanese Paragraph-start Conventions in CSS</h4>

	<wpt title="This section is an example, and doesn't need tests."></wpt>

	<div class="example">
		Japanese has three common start-edge typesetting schemes,
		which are distinguished by their handling of opening brackets.

		<div class="figure">
			<img src="images/opening-brackets-at-line-head.png"
			     width="646" height="360"
			     alt="The first scheme aligns opening brackets flush with the indent edge
			          on the first line and with the start edge of other lines.
			          The second scheme gives the opening bracket its full width,
			          so that it is effectively indented half an em from the indent edge
			          and from the start edge of other lines.
			          The third scheme aligns the opening brackets flush with the
			          start edge of lines, but hangs them inside the indent on the
			          first line (resulting in an effective half-em indent instead
			          of the full em for paragraphs that begin with an opening bracket).">
			<p class="caption">Positioning of opening brackets at line head [[JLREQ]]
		</div>

		Assuming a UA style sheet of <code>p { margin: 1em 0; }</code>,
		CSS can achieve the Japanese typesetting styles with the following rules:

		<ul>
			<li>
				Brackets flush with indent, flush with other lines (first scheme):
				<pre>
					p { /* Flush alignment */
						margin: 0;
						text-indent: 1em;
						text-spacing-trim: trim-both;
					}
				</pre>

			<li>
				Brackets preserve fullwidth spacing on all lines (second scheme):
				<pre>
					p { /* Fullwidth alignment */
						margin: 0;
						text-indent: 1em;
						text-spacing-trim: space-all;
					}
				</pre>

			<li>
				Brackets hang in indent, flush with other lines (third scheme):
				<pre>
					p { /* Hanging alignment */
						margin: 0;
						text-indent: 1em;
						text-spacing-trim: trim-both;
						hanging-punctuation: first;
					}
				</pre>

		</ul>
	</div>

<h3 id="text-spacing-property">
Character Class Spacing Shorthand: the 'text-spacing' property</h3>

	<wpt title="This section lacks tests."></wpt>

	<pre class="propdef shorthand">
	Name: text-spacing
	Value: none | auto | <<spacing-trim>> || <<autospace>>
	Initial: see individual properties
	Applies to: text
	Inherited: yes
	Percentages: N/A
	Computed value: specified keyword(s)
	Animation type: discrete
	</pre>

	<wpt>
		parsing/text-spacing-computed.html
		parsing/text-spacing-invalid.html
		parsing/text-spacing-valid.html
	</wpt>

	This property is a shorthand
	for setting 'text-spacing-trim' and 'text-autospace' in a single declaration.
	Values are defined as follows:

	<dl dfn-for=text-spacing dfn-type=value>
		<dt><dfn>none</dfn>
		<dd>
			Turns off all text-spacing features:
			sets 'text-spacing-trim' to ''space-all''
			and 'text-autospace' to ''no-autospace''.

		<dt><dfn>auto</dfn>
		<dd>
			Sets both 'text-spacing-trim' and 'text-autospace' to ''text-autospace/auto''.

		<dt><dfn><<spacing-trim>></dfn>
		<dd>
			Sets 'text-spacing-trim' to the specified value.
			If no <<autospace>> value is given,
			'text-autospace' is set to its [=initial value=].

		<dt><dfn><<autospace>></dfn>
		<dd>
			Sets 'text-autospace' to the specified value.
			If no <<spacing-trim>> value is given,
			'text-spacing-trim' is set to its [=initial value=].
	</dl>

	Note: As ''text-spacing-trim/normal'' is the initial value of both 'text-spacing-trim' and 'text-autospace',
	''text-spacing: normal'' resets both to their initial values.

<h3 id="boundary-shaping">
Shaping Across Element Boundaries</h3>

	<wpt title="This section has good test coverage."></wpt>

	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 [=typographic character units=]:

	<ul>
		<li>
			Any of 'margin'/'border'/'padding'
			separating the two [=typographic character units=] in the inline axis
			is non-zero.

			<wpt>
			shaping/shaping-009.html
			shaping/reference/shaping-009-ref.html
			shaping/shaping-010.html
			shaping/reference/shaping-010-ref.html
			shaping/shaping-011.html
			shaping/reference/shaping-011-ref.html
			boundary-shaping/boundary-shaping-003.html
			boundary-shaping/boundary-shaping-004.html
			boundary-shaping/boundary-shaping-005.html
			boundary-shaping/boundary-shaping-007.html
			boundary-shaping/boundary-shaping-009.html
			</wpt>

		<li>
			'vertical-align' is not ''vertical-align/baseline''.

			<wpt>
			boundary-shaping/boundary-shaping-002.html
			boundary-shaping/boundary-shaping-006.html
			</wpt>

		<li>
			The boundary is a [=bidi-isolates|bidi isolation boundary=].

			<wpt>
			shaping/shaping-012.html
			shaping/reference/shaping-012-ref.html
			shaping/shaping-013.html
			boundary-shaping/boundary-shaping-008.html
			</wpt>
	</ul>

	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>).

	<wpt>
	text-transform/text-transform-shaping-001.html
	text-transform/text-transform-shaping-002.html
	text-transform/text-transform-shaping-003.html
	shaping/shaping-000.html
	shaping/reference/shaping-000-ref.html
	shaping/shaping-004.html
	shaping/shaping-005.html
	shaping/shaping-006.html
	shaping/shaping-007.html
	shaping/shaping-014.html
	shaping/reference/shaping-014-ref.html
	shaping/shaping-016.html
	shaping/reference/shaping-016-ref.html
	shaping/shaping-022.html
	shaping/reference/shaping-022-ref.html
	shaping/shaping-025.html
	shaping/reference/shaping-025-ref.html
	shaping/shaping_lig-000.html
	boundary-shaping/boundary-shaping-001.html
	boundary-shaping/boundary-shaping-010.html
	</wpt>

	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.

	<wpt>
	shaping/shaping-001.html
	shaping/reference/shaping-001-ref.html
	shaping/shaping-002.html
	shaping/reference/shaping-002-ref.html
	shaping/shaping-003.html
	shaping/reference/shaping-003-ref.html
	shaping/shaping-008.html
	shaping/reference/shaping-008-ref.html
	shaping/shaping-017.html
	shaping/shaping-018.html
	shaping/shaping-020.html
	shaping/reference/shaping-020-ref.html
	shaping/shaping-021.html
	shaping/reference/shaping-021-ref.html
	shaping/shaping-023.html
	shaping/reference/shaping-023-ref.html
	shaping/shaping-024.html
	shaping/reference/shaping-024-ref.html
	boundary-shaping/boundary-shaping-009.html
	</wpt>

	<div class="example">
		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.

		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.

		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 (“&amp;”).

		<!--
			It’s simply not possible for the UA
			to create the effect of a partway-bold single glyph.
		-->
	</div>

<h2 id="edge-effects">
Edge Effects</h2>

	<wpt title="Tests only needed in subsections."></wpt>

	Edge effects control
	the indentation of lines with respect to other lines in the block ('text-indent')
	and how content is measured at the start and end edges of a line ('hanging-punctuation').

<h3 id="text-indent-property" caniuse="css-text-indent" oldids="text-indent">
First Line Indentation: the 'text-indent' property</h3>

	<wpt title="
		This section has adequate test coverage."></wpt>

	<pre class="propdef">
	Name: text-indent
	Value: [ <<length-percentage>> ] && hanging? && each-line?
	Initial: 0
	Applies to: block containers
	Inherited: yes
	Percentages: refers to block container’s own <a>inline-axis</a> <a>inner size</a>
	Computed value: computed <<length-percentage>> value, plus any specified keywords
	Animation type: by computed value type
	Canonical order: <abbr title="follows order of property value definition">per grammar</abbr>
	</pre>

	<wpt>
	inheritance.html
	parsing/text-indent-valid.html
	parsing/text-indent-invalid.html
	parsing/text-indent-computed.html
	animations/text-indent-interpolation.html
	animations/text-indent-composition.html
	text-indent/text-indent-long-line-crash.html
	text-indent/anonymous-flex-item-001.html
	text-indent/anonymous-grid-item-001.html
	</wpt>

	<wpt pathprefix="/css/CSS2/css1">
	c547-indent-000.xht
	c547-indent-001.xht
	</wpt>

	<wpt pathprefix="/css/CSS2/text/">
	text-indent-012.xht
	text-indent-013.xht
	text-indent-014.xht
	text-indent-112.xht
	text-indent-applies-to-001.xht
	text-indent-applies-to-002.xht
	text-indent-applies-to-003.xht
	text-indent-applies-to-005.xht
	text-indent-applies-to-006.xht
	text-indent-applies-to-007.xht
	text-indent-applies-to-008.xht
	text-indent-applies-to-009.xht
	text-indent-applies-to-010.xht
	text-indent-applies-to-011.xht
	text-indent-applies-to-012.xht
	text-indent-applies-to-013.xht
	text-indent-applies-to-014.xht
	text-indent-applies-to-015.xht
	text-indent-inherited-001.xht
	</wpt>

	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 spec=css-writing-modes-4>start</a> edge of the line box.

	<wpt pathprefix="/css/CSS2/text/">
	text-indent-010.xht
	text-indent-012.xht
	text-indent-013.xht
	text-indent-115.xht
	text-indent-on-blank-line-rtl-left-align.html
	text-indent-overflow-001.xht
	text-indent-overflow-002.xht
	text-indent-overflow-003.xht
	text-indent-overflow-004.xht
	text-indent-rtl-001.xht
	text-indent-rtl-002.xht
	</wpt>
	<wpt>
	text-indent/text-indent-min-max-content-001.html
	text-indent/text-indent-overflow.html
	text-indent/text-indent-text-align-end.html
	text-indent/below-float.html
	</wpt>

	Unless otherwise specified
	by the ''each-line'' and/or ''text-indent/hanging'' keywords,
	only lines that are the
	[=first formatted line=]
	of an element are affected.
	[[!CSS-PSEUDO-4]]
	For example, the first line of an anonymous block box is only affected
	if it is the first child of its parent element.

	<wpt pathprefix="/css/CSS2/text/">
	text-indent-014.xht
	text-indent-wrap-001.xht
	</wpt>

	<wpt>
	text-indent/text-indent-with-absolute-pos-child.html
	</wpt>

	Values have the following meanings:

	<dl dfn-for=text-indent dfn-type=value>
		<dt><dfn>&lt;length&gt;</dfn>
		<dd>
			Gives the amount of the indent as an absolute length.

			<wpt pathprefix="/css/CSS2/text/">
			text-indent-004.xht
			text-indent-005.xht
			text-indent-006.xht
			text-indent-007.xht
			text-indent-008.xht
			text-indent-010.xht
			text-indent-012.xht
			text-indent-013.xht
			text-indent-014.xht
			text-indent-016.xht
			text-indent-017.xht
			text-indent-018.xht
			text-indent-019.xht
			text-indent-020.xht
			text-indent-028.xht
			text-indent-029.xht
			text-indent-030.xht
			text-indent-031.xht
			text-indent-032.xht
			text-indent-040.xht
			text-indent-041.xht
			text-indent-042.xht
			text-indent-043.xht
			text-indent-044.xht
			text-indent-052.xht
			text-indent-053.xht
			text-indent-054.xht
			text-indent-055.xht
			text-indent-056.xht
			text-indent-064.xht
			text-indent-065.xht
			text-indent-066.xht
			text-indent-067.xht
			text-indent-068.xht
			text-indent-076.xht
			text-indent-077.xht
			text-indent-078.xht
			text-indent-079.xht
			text-indent-080.xht
			text-indent-088.xht
			text-indent-089.xht
			text-indent-090.xht
			text-indent-091.xht
			text-indent-092.xht
			text-indent-109.xht
			text-indent-110.xht
			text-indent-111.xht
			text-indent-113.xht
			text-indent-114.xht
			text-indent-115.xht
			text-indent-intrinsic-001.xht
			text-indent-intrinsic-002.xht
			text-indent-intrinsic-003.xht
			text-indent-intrinsic-004.xht
			text-indent-on-blank-line-rtl-left-align.html
			text-indent-overflow-001.xht
			text-indent-overflow-002.xht
			text-indent-overflow-003.xht
			text-indent-overflow-004.xht
			text-indent-rtl-001.xht
			text-indent-rtl-002.xht
			</wpt>
			<wpt>
			text-indent/text-indent-length-001.html
			text-indent/text-indent-length-002.html
			text-indent/text-indent-overflow.html
			text-indent/text-indent-text-align-end.html
			</wpt>

		<dt><dfn>&lt;percentage&gt;</dfn>
		<dd>
			Gives the amount of the indent
			as a percentage of the block container’s own <a>logical width</a>.

			<wpt pathprefix="/css/CSS2/text/">
			text-indent-011.xht
			text-indent-100.xht
			text-indent-101.xht
			text-indent-102.xht
			text-indent-103.xht
			text-indent-104.xht
			text-indent-percent-001.xht
			</wpt>

			Percentages must be treated as ''0''
			for the purpose of calculating [=intrinsic size contributions=],
			but are always resolved normally when performing layout.

			<wpt>
			text-indent/percentage-value-intrinsic-size.html
			text-indent/text-indent-percentage-001.xht
			text-indent/text-indent-percentage-002.html
			text-indent/text-indent-percentage-003.html
			text-indent/text-indent-percentage-004.html
			</wpt>

			Note: This can lead to the element overflowing.
			It is not recommended to use percentage indents and intrinsic sizing together.

		<dt><dfn>each-line</dfn>
		<dd>
			Indentation affects the first line of each block container
			and each line after a <a>forced line break</a>
			(but not lines after a <a>soft wrap break</a>).

			<!--
				We could probably say "first formatted line" here and not be incorrect,
				but that would also be unnecessarily specific, so keep it simple.
			-->

			<wpt>
			text-indent/text-indent-each-line-hanging.html
			</wpt>

		<dt><dfn>hanging</dfn>
		<dd>
			Inverts which lines are affected.

			<wpt>
			text-indent/text-indent-each-line-hanging.html
			</wpt>
	</dl>

	<div class="example">
		<p>If 'text-align' is ''text-align/start'' and 'text-indent' is ''5em'' 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&nbsp;
			to '5em'.
		</pre>

		If we add the ''text-indent/hanging'' keyword,
		then the first line will start flush,
		but other lines will be indented 5em:

		<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">
		Since the 'text-indent' 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>

		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, 'text-indent'
		is given a value of ''3em hanging each-line'',
		giving the third line of the poem a hanging indent
		where it soft-wraps at the block’s right boundary:

		<pre class="output">
			In a short line of text
			There need be no wrapping,
			But when we go on and on and on&nbsp;&nbsp;
			   and on,
			Sometimes a soft break
			Can help us stay on the page.
		</pre>
	</div>

	Note: Since the 'text-indent' property inherits,
	when specified on a block element, it will affect descendant
	inline-block elements.
	For this reason, it is often wise to specify ''text-indent: 0'' on
	elements that are specified ''display: inline-block''.

<h3 id="hanging">
Hanging Glyphs</h3>

	<wpt title="
		Test coverage TBD.
		Partly tested through [[#hanging-punctuation-property]]
		partly through [[#white-space-phase-2]]."></wpt>

	When a glyph at the start or end edge of a line <dfn lt="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 [=hanging=] glyph is also not taken into account
	when computing [=intrinsic sizes=] ([=min-content size=] and [=max-content size=]),
	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.)

	<wpt>
	white-space/full-width-leading-spaces-004.html
	white-space/white-space-intrinsic-size-005.html
	white-space/white-space-intrinsic-size-006.html
	overflow-wrap/overflow-wrap-min-content-size-009.html
	</wpt>

	A <dfn><a lt=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 [=hanging=] glyph character advance
	is re-interpreted as an additional negative margin
	on the affected edge of its parent [=inline box=];
	the line is otherwise laid out as usual.
	An overflowing [=hanging glyph=] should typically be considered
	[=ink overflow=]
	so as to avoid creating unnecessary scrollbars,
	but the UA may treat it as [=scrollable overflow=]
	when the content is editable
	or in other circumstances where treating it as [=scrollable overflow=]
	would be useful to the user.
	[[!CSS-OVERFLOW-3]]

	<wpt>
	hanging-punctuation/hanging-scrollable-001.html
	white-space/white-space-intrinsic-size-019.html
	white-space/white-space-intrinsic-size-020.html
	hanging-punctuation/hanging-punctuation-block-bound-001.html
	hanging-punctuation/hanging-punctuation-inline-bound-001.html
	white-space/trailing-space-and-text-alignment-001.html
	white-space/trailing-space-and-text-alignment-003.html
	white-space/trailing-space-and-text-alignment-005.html
	white-space/trailing-space-and-text-alignment-rtl-001.html
	white-space/trailing-space-and-text-alignment-rtl-003.html
	white-space/trailing-space-and-text-alignment-rtl-005.html
	white-space/white-space-pre-wrap-trailing-spaces-021.html
	white-space/white-space-pre-wrap-trailing-spaces-022.html
	white-space/white-space-pre-wrap-trailing-spaces-023.html
	text-justify/text-justify-and-trailing-spaces-001.html
	text-justify/text-justify-and-trailing-spaces-002.html
	text-justify/text-justify-and-trailing-spaces-003.html
	text-justify/text-justify-and-trailing-spaces-004.html
	text-justify/text-justify-and-trailing-spaces-005.html
	text-justify/text-justify-and-trailing-spaces-006.html
	</wpt>

	In some cases, a glyph at the end of a line
	can <dfn>conditionally hang</dfn>:
	it [=hangs=] 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 [=hang=].
	Glyphs that [=conditionally hang=] are not taken into account
	when computing [=min-content sizes=]
	and any sizes derived thereof,
	but they are taken into account for [=max-content sizes=]
	and any sizes derived thereof.

	<wpt>
	white-space/white-space-intrinsic-size-013.html
	white-space/white-space-intrinsic-size-014.html
	white-space/white-space-intrinsic-size-017.html
	</wpt>

	Non-zero inline-axis borders or padding between
	a [=hang=]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 [=hang=] at the end edge of a line.

	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 [=hang=] at each edge of the line).

<h4 id="hanging-punctuation-property" caniuse="css-hanging-punctuation" oldids="hanging-punctuation">
Hanging Punctuation: the 'hanging-punctuation' property</h4>

	<wpt title="
		This section has spotty test coverage.
		All values have tests.

		Missing tests:
		* No test of Animation type.
		* Applies to text
		* Affects intrinsic sizing
		* each value has a test, and checks with some characters, but there isn’t a test for every relevant unicode character
		* it is not considered when measuring the line’s contents for […] alignment
		* it is not considered when measuring the line’s contents for […] justification
		* Non-zero inline-axis borders or padding between a hangable mark and the edge of the line prevent the mark from hanging
		* At most one punctuation character may hang at each edge of the line.
		* should be treated as ink overflow"></wpt>

	<pre class="propdef">
	Name: hanging-punctuation
	Value: none | [ first || [ force-end | allow-end ] || last ]
	Initial: none
	Applies to: text
	Inherited: yes
	Canonical order: <abbr title="follows order of property value definition">per grammar</abbr>
	Computed value: specified keyword(s)
	Animation type: discrete
	</pre>

	<wpt>
	inheritance.html
	parsing/hanging-punctuation-valid.html
	parsing/hanging-punctuation-invalid.html
	hanging-punctuation/hanging-punctuation-inline-001.html
	</wpt>

	This property determines whether a punctuation mark,
	if one is present,
	[=hangs=] and may be placed outside the line box (or in the indent)
	at the start or at the end of a line of text.

	Note: If there is not sufficient padding on the
	block container, 'hanging-punctuation' can trigger overflow.

	Values have the following meanings:

	<dl dfn-for=hanging-punctuation dfn-type=value>
		<dt><dfn>none</dfn>
		<dd>
			No punctuation character is made to [=hang=].

		<dt><dfn>first</dfn>
		<dd>
			An opening bracket, quote, or ideographic space at the start
			of the [=first formatted line=]
			of an element [=hangs=].
			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.

			<wpt>
			hanging-punctuation/hanging-punctuation-first-001.xht
			hanging-punctuation/hanging-punctuation-first-002.html
			</wpt>

		<dt><dfn>last</dfn>
		<dd>
			A closing bracket or quote at the end
			of the last formatted line of an element [=hangs=].
			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.

			<wpt>
			hanging-punctuation/hanging-punctuation-last-001.xht
			</wpt>

		<dt><dfn>force-end</dfn>
		<dd>
			A [=stop or comma=] at the end of a line [=hangs=].

			<wpt>
			hanging-punctuation/hanging-punctuation-force-end-001.xht
			</wpt>

		<dt><dfn>allow-end</dfn>
		<dd>
			A [=stop or comma=] at the end of a line [=conditionally hangs=].

			<wpt>
			hanging-punctuation/hanging-punctuation-allow-end-001.xht
			</wpt>
	</dl>

	At most one punctuation character may [=hang=] at each edge of the line.

	<dfn lt="stop or comma">Stops and commas</dfn> allowed to [=hang=] include:
	<table class="data">
		<tr><td>U+002C <td>&#x002C; <td>COMMA
		<tr><td>U+002E <td>&#x002E; <td>FULL STOP
		<tr><td>U+060C <td>&#x060C; <td>ARABIC COMMA
		<tr><td>U+06D4 <td>&#x06D4; <td>ARABIC FULL STOP
		<tr><td>U+3001 <td>&#x3001; <td>IDEOGRAPHIC COMMA
		<tr><td>U+3002 <td>&#x3002; <td>IDEOGRAPHIC FULL STOP
		<tr><td>U+FF0C <td>&#xFF0C; <td>FULLWIDTH COMMA
		<tr><td>U+FF0E <td>&#xFF0E; <td>FULLWIDTH FULL STOP
		<tr><td>U+FE50 <td>&#xFE50; <td>SMALL COMMA
		<tr><td>U+FE51 <td>&#xFE51; <td>SMALL IDEOGRAPHIC COMMA
		<tr><td>U+FE52 <td>&#xFE52; <td>SMALL FULL STOP
		<tr><td>U+FF61 <td>&#xFF61; <td>HALFWIDTH IDEOGRAPHIC FULL STOP
		<tr><td>U+FF64 <td>&#xFF64; <td>HALFWIDTH IDEOGRAPHIC COMMA
	</table>

	The UA may include other characters as appropriate.

	Note: The CSS Working Group would appreciate if UAs including
	other characters would <a href="#sotd">inform the working group</a>
	of such additions.

	<div class="example">
		The ''hanging-punctuation/allow-end'' and ''force-end'' are two variations
		of hanging punctuation used in East Asia.

		<div>
			<figure class="sidefigure">
				<img src="images/hanging-punctuation-allow-end.png"
				     width="202" height="51"
				     alt="hanging-punctuation: allow-end">
			</figure>

			<pre highlight="css">
				p {
				  text-align: justify;
				  hanging-punctuation: allow-end;
				}
			</pre>

			<figure class="sidefigure">
				<img src="images/hanging-punctuation-force-end.png"
				     width="202" height="51"
				    alt="hanging-punctuation: force-end">
			</figure>

			<pre highlight="css">
				p {
				  text-align: justify;
				  hanging-punctuation: force-end;
				}
			</pre>
		</div>

		The punctuation at the end of the first line for ''hanging-punctuation/allow-end''
		does not hang, because it fits without hanging.
		However, if ''force-end'' 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.
	</div>

<h3 id="bidi-linebox">
Bidirectionality and Line Boxes</h3>

	<wpt title="This section lacks tests."></wpt>

	The <a spec=css-writing-modes-4>start</a>
	and <a spec=css-writing-modes-4>end</a> sides of a line box
	are determined by the [=inline base direction=] of the line box.
	Although they usually match,
	the [=inline base direction=] of a [=line box=]
	is distinct from the [=inline base direction=]
	of the [=containing block=] or the [=bidi paragraph=].
	The [=line box=]’s [=inline base direction=] affects
	'text-align-all', 'text-align-last', 'text-indent', and 'hanging-punctuation'--
	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>
	[[!UAX9]]
	[[CSS-WRITING-MODES-4]]).


	In most cases, a [=line box=]’s [=inline base direction=]
	is given by its [=containing block=]’s computed 'direction'.
	However,
	if its [=containing block=] has ''unicode-bidi: plaintext''
	[[!CSS-WRITING-MODES-4]]:

	<ul>
		<li>
			If the [=bidi paragraph=] to which the [=line box=] belongs
			(that is, the [=bidi paragraph=] for which the line box holds content)
			has strong directionality,
			the line box’s [=inline base direction=] is that direction.

			<wpt>
			bidi/bidi-lines-001.html
			bidi/bidi-lines-002.html
			</wpt>

		<li>
			If the [=line box=] is empty
			(i.e. contains no [=atomic inlines=] or
			characters other than the newline character, if any)
			or otherwise has no strong directionality
			(contains only weak or neutral characters),
			its [=inline base direction=] is taken
			from the preceding line box (if any),
			or, if this is the first line box in the containing block,
			from the 'direction' property of the containing block.
			(This can result in an RTL line box whose contents have an LTR base direction.)

			<wpt>
			bidi/bidi-lines-002.html
			</wpt>
	</ul>

	<div class="example">
		In the following example,
		assuming the <code>&lt;block&gt;</code>
		is a start-aligned preformatted block
		(''display: block; white-space: pre; text-align: start''),
		every other line is right-aligned:

		<xmp dir=auto highlight=html>
			<block style="unicode-bidi: plaintext">
			français
			فارسی
			français
			فارسی
			français
			فارسی
			</block>
		</xmp>
	</div>


	<div class="example">
		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 ''text-align: start''),
		as dictated by the first strong character, ‘h’:

		<xmp highlight=html>
			<para style="display: block; direction: rtl; unicode-bidi:plaintext">
			“<quote style="unicode-bidi:plaintext">שלום!</quote>”, they said.
			</para>
		</xmp>
	</div>

	<div class="example">
		<xmp highlight=html>
			<textarea style="direction: rtl; unicode-bidi:plaintext">

			Hello!

			</textarea>
		</xmp>

		Because of ''unicode-bidi: plaintext'',
		the “Hello!” is typeset LTR
		(i.e. with the exclamation mark on the right side)
		and left-aligned,
		ignoring the containing block’s RTL 'direction'.
		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.
	</div>

<h2 class="no-num" id="order">
Appendix A:
Text Processing Order of Operations</h2>

	<wpt title="Tests probably not needed for this section, as it is exercised through the rest of the specification."></wpt>

	<em>This appendix is normative.</em>

	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.)

	<ol>
		<li>
			[[#white-space-trim]]

		<li>
			[[#white-space-phase-1|white space processing]] part I (pre-wrapping)

		<li>
			[[#word-space-transform]] and
			[[#transforming|text transformation]]

			<wpt>
				word-space-transform/word-space-transform-007.html
				word-space-transform/word-space-transform-008.html
				word-space-transform/word-space-transform-009.html
				word-space-transform/word-space-transform-030.html
			</wpt>

		<li>
			[[css-writing-modes-4#text-combine-upright|text combination]] [[!CSS-WRITING-MODES-4]]

		<li>
			[[css-writing-modes-4#text-orientation|text orientation]] [[!CSS-WRITING-MODES-4]]

		<li>
			[=wrapping|text wrapping=] while applying per line:

			1. [[#text-indent-property|indentation]]
			2. [[css-writing-modes-4#text-direction|bidirectional reordering]] [[!CSS2]] / [[!CSS-WRITING-MODES-4]]
			3. [[#white-space-phase-2|white space processing]] part II
			4. 'line-padding', 'letter-spacing', 'word-spacing', and 'text-spacing'
			5. <a href="https://www.w3.org/TR/css-fonts-3/">font/glyph selection and positioning</a> [[!CSS-FONTS-3]]
			6. [[#hanging-punctuation-property|hanging punctuation]]

			Note: These operations can impact how much text fits on the line,
			and thus loop back to wrapping.

		<li>
			[[#justification|justification]]
			(which may affect glyph selection and/or text wrapping, looping back into that step)

		<li>[[#text-align-property|text alignment]]
		<li>[[#text-group-align-property|text group alignment]]
	</ol>

	<wpt>
	letter-spacing/letter-spacing-bidi-003.xht
	</wpt>

<h2 class="no-num" id="plaintext">
Appendix B:
Conversion to Plaintext</h2>

	<wpt title="This section lacks tests."></wpt>

	<em>This appendix is normative</em> for the purpose of plaintext copy-paste operations.

	<!--
		https://lists.w3.org/Archives/Public/www-style/2016Oct/0115.html
		https://lists.w3.org/Archives/Public/public-editing-tf/2016Apr/0005.html
	-->

	When a CSS-rendered document is converted to a plaintext format,
	it is expected that:

	<ul>
		<li>
			The 'text-transform' property has no effect.

		<li>
			'white-space-trim' and [[#white-space-phase-1]] is applied
			and any sequence of [=collapsible=] [=white space=]
			at the beginning of a [=block=]
			or immediately following a [=forced line break=]
			is removed.
	</ul>

<h2 class="no-num" id="default-stylesheet">
Appendix C:
Default UA Stylesheet</h2>

	<wpt title="Tests not needed for this section."></wpt>

	<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.

	<div class="example">
		<pre highlight=css>
			/* make option elements align together */
			option { text-align: match-parent; }

			/* do not allow white space to collapse in textarea */
			textarea { white-space-collapse: preserve !important; }

			/* preserve character grid in preformatted text */
			pre, code, kbd, samp, tt, listing, xmp, plaintext { text-spacing: none; }

			/* Avoid hanging punctuation inheriting into preformatted blocks */
			pre { hanging-punctuation: none; }
		</pre>
	</div>
	<!--
		Remove once https://github.com/whatwg/html/issues/6538 has been closed
	-->

<h2 class="no-num" id="script-groups">
Appendix D:
Scripts and Spacing</h2>

	<wpt title="
		Tests not needed for this section:
		these are definitions,
		they get tested through their application,
		not by themselves."></wpt>

	<em>This appendix is normative.</em>

	Typographic behavior varies somewhat by language,
	but varies drastically by writing system.
	This appendix categorizes some common [=Unicode script|scripts=] in Unicode 6.0
	according to their justification and spacing behavior.
	Category descriptions are descriptive, not prescriptive;
	the determining factor is the prioritization of [=justification opportunities=].

	<dl>
		<dt><dfn>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> [[!UAX11]]).
			The following [=Unicode scripts=] are included:
			Bopomofo, Han, Hangul, Hiragana, Katakana, and Yi.
			Characters of the [=East Asian Width property=]
			<code>Wide</code> and <code>Fullwidth</code> are also included,
			but <code>Ambiguous</code> characters are included
			only if the [=writing system=] is
			<a for=writing-system>Chinese</a>,
			<a for=writing-system>Korean</a>,
			or <a for=writing-system>Japanese</a>.

		<dt><dfn>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 [=Unicode scripts=]:
			Khmer,
			Lao,
			Myanmar,
			New Tai Lue,
			Tai Le,
			Tai Tham,
			Tai Viet,
			Thai

		<dt><dfn lt="cursive script">cursive scripts</dfn>
		<dd>
			Cursive scripts do not admit gaps
			between their letters for either justification or 'letter-spacing'.
			The following [=Unicode scripts=] are included:
			Arabic,
			Hanifi Rohingya,
			Mandaic,
			Mongolian,
			N’Ko,
			Phags Pa,
			Syriac

			Note: Indic scripts with baseline connectors
			(such as Devanagari and Gujarati)
			<em>are not</em> considered [=cursive scripts=],
			and <em>do</em> admit such gaps
			between [=typographic character units=].
			See <a href="https://www.w3.org/TR/ilreq/"><cite>Indic Layout Requirements</cite></a>.
			[[ILREQ]]
	</dl>

	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.

<h2 id="character-properties" class="no-num">
Appendix E:
Characters and Properties</h2>

	<wpt title="This section lacks tests."></wpt>

	<em>This appendix is normative.</em>

	Unicode defines four code point-level properties
	that are referenced in CSS typesetting:

	<dl export>
		<dt><dfn lt="Unicode East Asian Width|East Asian Width property">East Asian width property</dfn>
		<dd>
			Defined in <a href="http://www.unicode.org/reports/tr11/#Definitions">Unicode Standard Annex #11</a> [[!UAX11]] 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>
			[[!UAX44]].

		<dt><dfn lt="Unicode General Category|Unicode category|General Category">general category</dfn>
		<dd>
			Defined in <a href="http://www.unicode.org/reports/tr44/#General_Category_Values">Unicode Standard Annex #44</a> [[!UAX44]] 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>
			[[!UAX44]].

		<dt><dfn lt="Unicode Script|Script property">script property</dfn>
		<dd>
			Defined in <a href="http://www.unicode.org/reports/tr24/#Values">Unicode Standard Annex #24</a> [[!UAX24]] and given as the <code>Script</code> property
			in the <a href="https://www.unicode.org/reports/tr44/"><cite>Unicode Character Database</cite></a>
			[[!UAX44]].
			(UAs must include any ScriptExtensions.txt assignments in this mapping.)

		<dt><dfn lt="Unicode Vertical Orientation|Vertical Orientation">Vertical Orientation</dfn>
		<dd>
			Defined in <a href="http://www.unicode.org/reports/tr50/">Unicode Standard Annex #50</a> [[!UAX50]] as the Vertical_Orientation property
			in the <a href="https://www.unicode.org/reports/tr44/"><cite>Unicode Character Database</cite></a>
			[[!UAX44]].
	</dl>

	Unicode defines properties for individual code points,
	but sometimes it is necessary to determine the properties
	of a [=typographic character unit=].
	For the purposes of CSS Text,
	the properties of a [=typographic character unit=] are given
	by the base character of its first [=grapheme cluster=]--
	except in two cases:

	<ul>
		<li>
			[=Grapheme clusters=] 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>
			[=Grapheme clusters=] 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>

<!-- CUT SEGMENT BREAK TRANSFORM
<h2 id="space-discard-set" class="no-num">
Appendix F:
Space-Discarding Unicode Characters</h2>

	<em>This appendix is normative.</em></p>

	Characters belonging to the <dfn>space-discarding character set</dfn>
	bias adjacent [=segment breaks=] towards
	being discarded rather than being transformed into U+0020 SPACE
	when collapsing white space, see [[#line-break-transform]].
	Characters from the following blocks in Unicode 13.0 [[UNICODE]]
	are considered part of the [=space-discarding character set=]:

	<table class=data>
	<caption>Space-discarding Unicode Bocks</caption>
	<thead>
		<tr>
		<th>Codepoint Range
		<th>Block Name
	<tbody>
		<tr>
			<td>U+2E80..U+2EFF
			<td>CJK Radicals Supplement
		<tr>
			<td>U+2F00..U+2FDF
			<td>Kangxi Radicals
		<tr>
			<td>U+2FF0..U+2FFF
			<td>Ideographic Description Characters
		<tr>
			<td>U+3000..U+303F
			<td>CJK Symbols and Punctuation
		<tr>
			<td>U+3040..U+309F
			<td>Hiragana
		<tr>
			<td>U+30A0..U+30FF
			<td>Katakana
		<tr>
			<td>U+3130..U+318F
			<td>Kanbun
		<tr>
			<td>U+3190..U+319F
			<td>Kanbun
		<tr>
			<td>U+31C0..U+31EF
			<td>CJK Strokes
		<tr>
			<td>U+31F0..U+31FF
			<td>Katakana Phonetic Extensions
		<tr>
			<td>U+3300..U+33FF
			<td>CJK Compatibility
		<tr>
			<td>U+3400..U+4DBF
			<td>CJK Unified Ideographs Extension A
		<tr>
			<td>U+4E00..U+9FFF
			<td>CJK Unified Ideographs
		<tr>
			<td>U+A000..U+A48F
			<td>Yi Syllables
		<tr>
			<td>U+A490..U+A4CF
			<td>Yi Radicals
		<tr>
			<td>U+F900..U+FAFF
			<td>CJK Compatibility Ideographs
		<tr>
			<td>U+FE10..U+FE1F
			<td>Vertical Forms
		<tr>
			<td>U+FE30..U+FE4F
			<td>CJK Compatibility Forms
		<tr>
			<td>U+FE50..U+FE6F
			<td>Small Form Variants
		<tr>
			<td>U+FF00..U+FFEF
			<td>Halfwidth and Fullwidth Forms
		<tr>
			<td>U+1B000..U+1B0FF
			<td>Kana Supplement
		<tr>
			<td>U+1B100..U+1B12F
			<td>Kana Extended-A
		<tr>
			<td>U+1B130..U+1B16F
			<td>Small Kana Extension
		<tr>
			<td>U+20000..U+2A6DF
			<td>CJK Unified Ideographs Extension B
		<tr>
			<td>U+2A700..U+2B73F
			<td>CJK Unified Ideographs Extension C
		<tr>
			<td>U+2B740..U+2B81F
			<td>CJK Unified Ideographs Extension D
		<tr>
			<td>U+2B820..U+2CEAF
			<td>CJK Unified Ideographs Extension E
		<tr>
			<td>U+2CEB0..U+2EBEF
			<td>CJK Unified Ideographs Extension F
		<tr>
			<td>U+2F800..U+2FA1F
			<td>CJK Compatibility Ideographs Supplement
		<tr>
			<td>U+30000..U+3134F
			<td>CJK Unified Ideographs Extension G
	</table>

	For future revisions of Unicode,
	any new block whose initially-allocated contents comprise
	at least 50% codepoints belonging to the
	Han, Hiragana, Katakana, or Yi script
	shall also be considered part of the [=space-discarding character set=].
	[[UNICODE]]

	<details class="note">
		<summary>Wherefore this table of “space-discarding characters”?</summary>

		The purpose of the [[#line-break-transform|segment break transformation rules]]
		is to “unbreak” text that has been formatted
		with extra white space for source code readability,
		see [[#line-break-transform]].

		In most cases, “unbreaking” a line of text requires joining them with a space,
		but some writing systems don’t use spaces
		so such texts need to be joined without any space.
		CSS uses the characters before and after to determine
		whether to join lines with or without a space.

		For simplicity and for ease of implementation,
		the classification of characters as space-discarding or space-preserving
		is done by Unicode code block.
		Ideally, such a list would be maintained in The Unicode Standard,
		but the Unicode Technical Committee has yet
		to express any intention of taking on this task.
		[[UNICODE]]
		In the meantime, in the interest of bringing
		more of the text-processing facilities of CSS and HTML
		that are available to Western writing systems
		to Eastern writing systems as well,
		the CSSWG is maintaining this appendix
		and refining the rules in [[#line-break-transform]],
		and hopes that in the future,
		once CSS has demonstrated its viability,
		the Unicode Consortium will recognize the need for an “unbreaking” algorithm
		and take over maintenance of such.

		things that could use an unbreaking algorithm:

		* HTML/CSS
		* Markdown
		* TeX
		* text editors’ “unbreak lines” commands
	</details>
CUT SEGMENT BREAK TRANSFORM -->

<h2 id="script-tagging" class="no-num">
Appendix F:
Identifying the Content Writing System</h2>

	<wpt title="
		This section has partial test coverage.
		Each of the various properties
		that take the content language into account is tested,
		except tested on text-justification:auto,
		but probably not testable anyway.

		Missing tests:
		* if the writing system to specified to be one of the Hant, Hans, Hani, Hanb, or Bopo ISO15924 codes, then the writing system is Chinese.
		* if the writing system to specified to be one of the Jpan, Hira ISO15924 codes, then the writing system is Japanese.
		* if the writing system to specified to be one of the Kore, Hang, or Jamo ISO15924 codes, then the writing system is Korean."></wpt>

	<em>This appendix is normative.</em>

	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.

<!-- Tagging the Writing System -->

	In HTML or any other [=document language=]
	using <cite>BCP47</cite> tags for identifying languages to declare the [=content language=],
	authors can disambiguate or indicate the use of an atypical writing system
	with script subtags.
	[[BCP47]]
	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>.
	[[ISO15924]]

	<div class="example">
		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>

	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.
	[[BCP47]]
	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.

	Note: 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>.

<!-- Assuming the Writing System -->

	When no writing system is explicitly indicated,
	UAs should assume the most common writing system
	of the declared [=content language=]
	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.

	<wpt>
	writing-system/writing-system-font-001.html
	writing-system/writing-system-text-transform-001.html
	writing-system/writing-system-segment-break-001.html
	writing-system/writing-system-line-break-001.html
	writing-system/writing-system-line-break-002.html
	</wpt>

	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:

	<ul>
		<li>
			If the [=content language=] is Chinese and the [=writing system=] is unspecified,
			or for any [=content language=]
			if the [=writing system=] to specified to be one of the
			''Hant'',
			''Hans'',
			''Hani'',
			''Hanb'',
			or ''Bopo''
			ISO script codes,
			then the [=writing system=] is <dfn noexport for=writing-system>Chinese</dfn>.

		<li>
			If the [=content language=] is Japanese and the [=writing system=] is unspecified,
			or for any [=content language=]
			if the [=writing system=] to specified to be one of the
			''Jpan'',
			''Hrkt'',
			''Hira'',
			or ''Kana'' ISO script codes,
			then the [=writing system=] is <dfn noexport for=writing-system>Japanese</dfn>.

			<wpt>
			writing-system/writing-system-line-break-002.html
			writing-system/writing-system-segment-break-001.html
			</wpt>

		<li>
			If the [=content language=] is Korean and the [=writing system=] is unspecified,
			or for any [=content language=]
			if the [=writing system=] to specified to be one of the
			''Kore'',
			''Hang'',
			or ''Jamo''
			ISO script codes,
			then the [=writing system=] is <dfn noexport for=writing-system>Korean</dfn>.

		<li>
			The [=writing system=] is only considered
			to be <dfn noexport for=writing-system lt='known | unknown'>unknown</dfn>
			if the [=content language=] itself is unknown,
			or if it explicitly indicates an unknown writing system.

			Note: Mere omission of the [=writing system=] information
			when the [=content language=] is declared
			means the that the [=writing system=] is implied, not unknown.
	</ul>

<h2 id="small-kana" class=no-num>
Appendix G:
Small Kana Mappings</h2>

	<wpt title="
		This section has good test coverage,
		through the text-transform property."></wpt>

	<style>
		.pairs-table th {
			text-align: center;
		}
	</style>

	<em>This appendix is normative.</em>

	<div class="pairs-table">
		<table class=data>
			<caption>Small Kana Map to Full-size Kana</caption>

			<thead>
				<tr>
					<th scope=col><dfn noexport for=kana lt="small | small kana">Small</dfn>
					<th scope=col><dfn noexport for=kana lt="full-size |full-size kana">Full-size</dfn>

			<tbody title="Hiragana">
				<!-- Vowels (Hiragana) -->
				<tr>
					<td>&#x3041; U+3041
					<td>&#x3042; U+3042
				<tr>
					<td>&#x3043; U+3043
					<td>&#x3044; U+3044
				<tr>
					<td>&#x3045; U+3045
					<td>&#x3046; U+3046
				<tr>
					<td>&#x3047; U+3047
					<td>&#x3048; U+3048
				<tr>
					<td>&#x3049; U+3049
					<td>&#x304A; U+304A

				<!-- Consonant K (Hiragana) -->
				<tr>
					<td>&#x3095; U+3095
					<td>&#x304B; U+304B
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x3096; U+3096
					<td>&#x3051; U+3051
				<tr>
					<td>&#x1B132; U+1B132
					<td>&#x3053; U+3053

				<!-- Consonant T (Hiragana) -->
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x3063; U+3063
					<td>&#x3064; U+3064
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->

				<!-- Consonant Y (Hiragana) -->
				<tr>
					<td>&#x3083; U+3083
					<td>&#x3084; U+3084
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x3085; U+3085
					<td>&#x3086; U+3086
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x3087; U+3087
					<td>&#x3088; U+3088

				<!-- Consonant W (Hiragana) -->
				<tr>
					<td>&#x308E; U+308E
					<td>&#x308F; U+308F
				<tr>
					<td>&#x1B150; U+1B150
					<td>&#x3090; U+3090
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x1B151; U+1B151
					<td>&#x3091; U+3091
				<tr>
					<td>&#x1B152; U+1B152
					<td>&#x3092; U+3092

			<tbody title="Katakana">
				<!-- Vowels (Katakana) -->
				<tr>
					<td>&#x30A1; U+30A1
					<td>&#x30A2; U+30A2
				<tr>
					<td>&#x30A3; U+30A3
					<td>&#x30A4; U+30A4
				<tr>
					<td>&#x30A5; U+30A5
					<td>&#x30A6; U+30A6
				<tr>
					<td>&#x30A7; U+30A7
					<td>&#x30A8; U+30A8
				<tr>
					<td>&#x30A9; U+30A9
					<td>&#x30AA; U+30AA

				<!-- Consonant K (Katakana) -->
				<tr>
					<td>&#x30F5; U+30F5
					<td>&#x30AB; U+30AB
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x31F0; U+31F0
					<td>&#x30AF; U+30AF
				<tr>
					<td>&#x30F6; U+30F6
					<td>&#x30B1; U+30B1
				<tr>
					<td>&#x1B155; U+1B155
					<td>&#x30B3; U+30B3

				<!-- Consonant S (Katakana) -->
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x31F1; U+31F1
					<td>&#x30B7; U+30B7
				<tr>
					<td>&#x31F2; U+31F2
					<td>&#x30B9; U+30B9
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->

				<!-- Consonant T (Katakana) -->
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x30C3; U+30C3
					<td>&#x30C4; U+30C4
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x31F3; U+31F3
					<td>&#x30C8; U+30C8

				<!-- Consonant N (Katakana) -->
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x31F4; U+31F4
					<td>&#x30CC; U+30CC
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->

				<!-- Consonant H (Katakana) -->
				<tr>
					<td>&#x31F5; U+31F5
					<td>&#x30CF; U+30CF
				<tr>
					<td>&#x31F6; U+31F6
					<td>&#x30D2; U+30D2
				<tr>
					<td>&#x31F7; U+31F7
					<td>&#x30D5; U+30D5
				<tr>
					<td>&#x31F8; U+31F8
					<td>&#x30D8; U+30D8
				<tr>
					<td>&#x31F9; U+31F9
					<td>&#x30DB; U+30DB

				<!-- Consonant M (Katakana) -->
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x31FA; U+31FA
					<td>&#x30E0; U+30E0
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->

				<!-- Consonant Y (Katakana) -->
				<tr>
					<td>&#x30E3; U+30E3
					<td>&#x30E4; U+30E4
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x30E5; U+30E5
					<td>&#x30E6; U+30E6
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x30E7; U+30E7
					<td>&#x30E8; U+30E8

				<!-- Consonant R (Katakana) -->
				<tr>
					<td>&#x31FB; U+31FB
					<td>&#x30E9; U+30E9
				<tr>
					<td>&#x31FC; U+31FC
					<td>&#x30EA; U+30EA
				<tr>
					<td>&#x31FD; U+31FD
					<td>&#x30EB; U+30EB
				<tr>
					<td>&#x31FE; U+31FE
					<td>&#x30EC; U+30EC
				<tr>
					<td>&#x31FF; U+31FF
					<td>&#x30ED; U+30ED

				<!-- Consonant W (Katakana) -->
				<tr>
					<td>&#x30EE; U+30EE
					<td>&#x30EF; U+30EF
				<tr>
					<td>&#x1B164; U+1B164
					<td>&#x30F0; U+30F0
				<tr>
					<td>&#x1B165; U+1B165
					<td>&#x30F1; U+30F1
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#x1B166; U+1B166
					<td>&#x30F2; U+30F2
				<!-- Final N (Katakana) -->
				<tr>
					<td>&#x1B167; U+1B167
					<td>&#x30F3; U+30F3

			<tbody title="Half-width Katakana">
				<!-- Vowels (hwid) -->
				<tr>
					<td>&#xFF67; U+FF67
					<td>&#xFF71; U+FF71
				<tr>
					<td>&#xFF68; U+FF68
					<td>&#xFF72; U+FF72
				<tr>
					<td>&#xFF69; U+FF69
					<td>&#xFF73; U+FF73
				<tr>
					<td>&#xFF6A; U+FF6A
					<td>&#xFF74; U+FF74
				<tr>
					<td>&#xFF6B; U+FF6B
					<td>&#xFF75; U+FF75

				<!-- Consonant T (hwid Katakana) -->
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#xFF6F; U+FF6F
					<td>&#xFF82; U+FF82
				<!--
				<tr>
					<td>
					<td>
				<tr>
					<td>
					<td>
				-->

				<!-- Consonant Y (hwid Katakana) -->
				<tr>
					<td>&#xFF6C; U+FF6C
					<td>&#xFF94; U+FF94
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#xFF6D; U+FF6D
					<td>&#xFF95; U+FF95
				<!--
				<tr>
					<td>
					<td>
				-->
				<tr>
					<td>&#xFF6E; U+FF6E
					<td>&#xFF96; U+FF96
		</table>
	</div>

	<wpt>
	text-transform/text-transform-full-size-kana-001.html
	text-transform/text-transform-full-size-kana-002.html
	text-transform/text-transform-full-size-kana-003.html
	text-transform/text-transform-full-size-kana-004.html
	text-transform/text-transform-full-size-kana-005.html
	text-transform/text-transform-full-size-kana-006.html
	text-transform/text-transform-full-size-kana-007.html
	text-transform/text-transform-full-size-kana-008.html
	</wpt>


<h2 id="word-phrase-detection" class=no-num>
Appendix H:
Word and Phrase Detection</h2>

	<wpt title="
	This section has partial test coverage.

	Missing tests:
	* If a word or phrase is immediately followed by one or more of the following characters, the user agent must consider them to be part of the preceeding word or phrase
	* Punctuation is not a phrase by itself […]

	Likely untestable:
	* The user agent must not place a word or phrase boundary between characters that compose a single typographic character unit

	"></wpt>

	<i>This appendix is normative.</i>

	A few operations in this specification
	depend on automated
	<dfn lt="word boundary detection | detect word boundaries | detecting word boundaries">word boundary detection</dfn>
	or
	<dfn lt="phrase boundary detection | detect phrase boundaries | detecting phrase boundaries">phrase boundary detection</dfn>.

	Both operations are similar:
	the user agent performs linguistic analysis of the text
	to identify language-specific meaningful sequences of characters.
	They differ only targetting different units of text:
	either words or phrases.

	While easily understood in a broad sense,
	both concepts of word and phrase are difficult to precisely define,
	especially in a way that works accross multiple languages.
	Nonetheless, in this context:

	<ul>
		<li>
			A word is a recognizable semantic unit which may comprise one or more characters or syllables.

			Note: See <a href="https://www.w3.org/International/articles/typography/linebreak.en#whatisword">What is a word?</a>
			for some discussion of this concept.

		<li>
			A phrase is a short grouping of one or several words
			standing together as a conceptual or grammatical unit,
			forming a component of a clause or sentence.

			Note:
			This is not to be confused with the French word <em lang=fr>phrase</em>
			which means sentence rather than phrase in the English sense used here.
			In Japanese,
			this corresponds to the concept of 文節.

			<div class=example>
				A phrase could be
				a noun with its article and prepositions or postpositions,
				a phrasal verb,
				a compound verb tense…
			</div>
	</ul>

	The start and end position of each detected word or phrase
	is called a <dfn>word boundary</dfn> or <dfn>phrase boundary</dfn>.
	By themselves, word and phrase boundaries are not observable,
	but properties like 'word-space-transform' or 'word-break'
	can cause visible effects at those positions.

	The specific algorithm to detect word or phrases
	and to place their boundaries is UA-dependent,
	and may take into account a variety of factors or approaches,
	such as
	dictionary-based lexical analysis,
	identification of punctuation or other delimiting characters,
	morphological analysis,
	machine learning methods…

	The following constraints must nevertheless be respected:

	<ul>
		<li>
			The user agent must not place a word or phrase boundary
			between characters that compose a single [=typographic character unit=].

		<li>
			The user agent must not place a word or phrase boundary
			adjacent to any characters with the line breaking class GL, WJ, or ZWJ;
			when two would-be words or phrases are separated by such characters,
			they must be treated as a single one.
			[[UAX14]]

			<wpt>
				word-space-transform/word-space-transform-024.html
				word-space-transform/word-space-transform-025.html
				word-space-transform/word-space-transform-026.html
				word-break/auto-phrase/word-break-auto-phrase-003.html
				word-break/auto-phrase/word-break-auto-phrase-004.html
				word-break/auto-phrase/word-break-auto-phrase-005.html
			</wpt>

		<li>
			If a word or phrase is immediately followed by one or more of the following characters,
			the user agent <em>must</em> consider them to be part of the preceeding word or phrase:

			<ul>
				<li>[=word-separator characters=]
				<li>[=other space separators=]
				<li>U+200B ZERO WIDTH SPACE characters
		</ul>

		<li>
			<p>
			Punctuation is not a phrase by itself:
			it should to be attached to the relevant side of an adjacent linguistic word or phrase.
			For example,
			enclosing punctuation such as brackets and quotes
			are part of the phrase they enclose;
			commas and semicolons are suffixed to the preceding phrase;
			U+00BF INVERTED QUESTION MARK is attached to the subsequent word;
			etc.

			However, unconventional use of punctuation,
			such as smileys, kaomoji, or Perl snippets,
			may cause the user agent to need to deviate from this principle.

		<li id=boundary-outermost>
			Inline box boundaries
			and [=out-of-flow=] elements must be ignored
			when determining word or phrase boundaries.
			However,
			if a [=word boundary|word=] or [=phrase boundary=] is found at the same position as
			one or more inline box boundaries,
			the [=word boundary|word=] or [=phrase boundary=] must be inserted
			in the outermost element that participates in this inline box boundary.

			<wpt title="Tests for ignoring inline box boundaries">
				word-space-transform/word-space-transform-018.html
				word-space-transform/word-space-transform-019.html
				word-break/auto-phrase/word-break-auto-phrase-wbr-nobr-002.html
			</wpt>

			<wpt title="Tests placing the word/phrase boundary in the outermost element">
				word-space-transform/word-space-transform-018.html
				word-space-transform/word-space-transform-019.html
				word-space-transform/word-space-transform-020.html
			</wpt>

			<div class=example>
				In the following example,
				the red “<code><span style="color:red">|</span></code>” indicates
				reasonable positions for a user agent [=detecting word boundaries=] to place them:
				<pre><code highlight=html>กรุงเทพ<span style="color:red">|</span>คือ<span style="color:red">|</span>สวยงาม</code></pre>
				If that sentence had contained some inline markup,
				the following example shows the correct position to place the word boundaries:
				<pre><code highlight=html>กรุงเทพ<span style="color:red">|</span>คือ<span style="color:red">|</span>&lt;em>สวยงาม&lt;/em></code></pre>
				The following example shows <em>incorrect</em> positions:
				<pre><code highlight=html>กรุงเทพ<span style="color:red">|</span>คือ&lt;em><span style="color:red">|</span>สวยงาม&lt;/em></code></pre>
				The following shows the correct positions in a more contrived situation:
				<pre><code highlight=html>กรุงเทพ<span style="color:red">|</span>&lt;b>&lt;u>คือ&lt;/u><span style="color:red">|</span>&lt;em>สวยงาม&lt;/em>&lt;/b></code></pre>
			</div>
	</ul>

<h2 id="priv" class="no-num">
Privacy Considerations</h2>

	<wpt title="Tests not needed for this section."></wpt>

	This specification leaks the user’s installed hyphenation and line-breaking dictionaries.

<h2 id="sec" class="no-num" oldids="priv-sec">
Security Considerations</h2>

	<wpt title="Tests not needed for this section."></wpt>

	This specification introduces no new security considerations.

<h2 class="no-num" id="acknowledgements">
Acknowledgements</h2>

	<wpt title="Tests not needed for this section."></wpt>

	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,
	Pierre-Anthony Lemieux,
	Rahul Sonnad,
	Randy Edmunds,
	Richard Ishida,
	Shinyu Murakami,
	Stephen Deach,
	Steve Zilles,
	Takao Suzuki,
	Tantek Çelik,
	Xidorn Quan,
	Yaniv Feinberg.

<h2 class="no-num" id="changes">
Changes</h2>

	<strong>This draft is kept in sync with [[CSS-TEXT-3]], see [[css-text-3#changes]].</strong><br>
	Changes specific to Level 4 are listed below.

	Significant changes since the <a href="https://www.w3.org/TR/2026/WD-css-text-4-20260608/">8 June 2026 Working Draft</a> include:
	* None yet

	Significant changes since the <a href="https://www.w3.org/TR/2024/WD-css-text-4-2024052">29 May 2024 Working Draft</a> include:
	* Added ''avoid-orphans'' to 'text-wrap-style'.
		(<a href="https://github.com/w3c/csswg-drafts/issues/10837">Issue 10837</a>)
	* Added <{listing}>, <{xmp}>, and <{plaintext}> to the list of elements assigned ''text-spacing: none'' in the default UA stylesheet.
		(<a href="https://github.com/w3c/csswg-drafts/issues/13369">Issue 13369</a>)

	Significant changes since the <a href="https://www.w3.org/TR/2024/WD-css-text-4-20240219/">19 February 2024 Working Draft</a> include:
	* Renamed the 'text-spacing-trim' value <css>trim-auto</css> to ''trim-both''.
		(<a href="https://github.com/w3c/csswg-drafts/issues/10161">Issue 10161</a>)
	* Loosened requirement about not changing lines for ''text-wrap-style: balance''
		for cases with large numbers of lines.
		(<a href="https://github.com/w3c/csswg-drafts/issues/10186">Issue 10186</a>)
	* Define interraction between ''text-wrap-style: balance'' and 'line-clamp'
		(<a href="https://github.com/w3c/csswg-drafts/issues/9310">Issue 9310</a>)
	* Add the ''math-auto'' value for 'text-transform'.
		(<a href="https://github.com/w3c/csswg-drafts/issues/5386">Issue 5386</a>)

	Significant changes since the <a href="https://www.w3.org/TR/2023/WD-css-text-4-20231020/">20 October 2023 Working Draft</a> include:
	* Restored accidentally deleted “and each line after a [=forced line break=]”
		from definition of ''text-spacing-trim: space-first''.
		(<a href="https://github.com/w3c/csswg-drafts/issues/9532">Issue 9532</a>)
	* Make ''text-spacing-trim/normal'' the initial value of 'text-spacing-trim'.
		(<a href="https://github.com/w3c/csswg-drafts/issues/9511">Issue 9511</a>)
	* Change the end-of-line behavior of ''text-spacing-trim/space-first''.
		(<a href="https://github.com/w3c/csswg-drafts/issues/9736">Issue 9736</a>)
	* ''text-spacing-trim/space-first'' applies after line-breaks.
		(<a href="https://github.com/w3c/csswg-drafts/issues/9532">Issue 9532</a>)
	* Clarify details of fullwidth punctuation collapsing.
		(<a href="https://github.com/w3c/csswg-drafts/issues/9225">Issue 9225</a>)
	* Prevent pre from inheriting hanging-punctuation by default with a user-agent style rule.
		(<a href="https://github.com/w3c/csswg-drafts/issues/9689">Issue 9689</a>)

	Significant changes since the <a href="https://www.w3.org/TR/2023/WD-css-text-4-20230329/">29 March 2023 Working Draft</a> include:
	* Recast the 'text-wrap' property as a shorthand of two new properties,
		'text-wrap-mode' and 'text-wrap-style',
		and making 'text-wrap-mode' rather than 'text-wrap'
		a longhand of the 'white-space' property.
	* Updated [[#small-kana]] to Unicode 15.0.
		(<a href="https://github.com/w3c/csswg-drafts/issues/8442">Issue 8442</a>)
	* Redesign of the ''word-break: auto-phrase'' ''word-break: manual'' features
		(from an earlier attempt as a standalone <code>word-boundary-detection</code> property),
		and add an ''word-space-transform/auto-phrase'' value to 'word-space-transform'
		(since it can no longer depend on <code>word-boundary-detection</code>).
		and update supporting related mechanics.
	* Rename <code>word-boundary-expansion</code> to 'word-space-transform'
	* Add ''trim-all'' to 'text-spacing-trim'.
		(<a href="https://github.com/w3c/csswg-drafts/issues/8482">Issue 8482</a>)
	* 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>)

		<wpt>
		line-breaking/line-breaking-atomic-003.html
		line-breaking/line-breaking-atomic-004.html
		line-breaking/line-breaking-atomic-005.html
		line-breaking/line-breaking-atomic-006.html
		line-breaking/line-breaking-replaced-002.html
		line-breaking/line-breaking-replaced-003.html
		line-breaking/line-breaking-atomic-010.html
		line-breaking/line-breaking-atomic-011.html
		line-breaking/line-breaking-atomic-012.html
		line-breaking/line-breaking-atomic-013.html
		line-breaking/line-breaking-atomic-014.html
		line-breaking/line-breaking-atomic-015.html
		line-breaking/line-breaking-atomic-016.html
		line-breaking/line-breaking-atomic-017.html
		line-breaking/line-breaking-atomic-018.html
		line-breaking/line-breaking-atomic-019.html
		line-breaking/line-breaking-atomic-020.html
		line-breaking/line-breaking-atomic-021.html
		line-breaking/line-breaking-atomic-022.html
		line-breaking/line-breaking-atomic-023.html
		line-breaking/line-breaking-atomic-024.html
		line-breaking/line-breaking-atomic-025.html
		line-breaking/line-breaking-atomic-026.html
		line-breaking/line-breaking-atomic-027.html
		</wpt>

	Significant changes since the <a href="https://www.w3.org/TR/2023/WD-css-text-4-20230301/">1 March 2023 Working Draft</a> include:
	* Completed the translation of 'white-space' to multiple longhands by
		* adding ''break-spaces'' to 'white-space-collapse' so that all shorthand values can be represented in the longhands
			(<a href="https://github.com/w3c/csswg-drafts/issues/8256">Issue 8256</a>)
		* integrating all longhand keywords into the 'white-space' shorthand
		* updating prose accordingly
	* Renamed <css>text-space-collapse</css> and <css>text-space-trim</css>
		to 'white-space-collapse' and 'white-space-trim'.
		(<a href="https://github.com/w3c/csswg-drafts/issues/8273">Issue 8273</a>)

	Significant changes since the <a href="https://www.w3.org/TR/2022/WD-css-text-4-20221231/">31 December 2022 Working Draft</a> include:
	* Redesigned 'text-spacing' by:
		* Removing non-useful keyword combinations
			(Issues <a href="https://github.com/w3c/csswg-drafts/issues/4246">4246</a>,
			        <a href="https://github.com/w3c/csswg-drafts/issues/8288">8288</a>)
		* Making ''space-first'' the initial value
			(<a href="https://github.com/w3c/csswg-drafts/issues/2462">Issue 2462</a>)
		* Splitting into longhands
			(Issues <a href="https://github.com/w3c/csswg-drafts/issues/4246">4246</a>,
			        <a href="https://github.com/w3c/csswg-drafts/issues/7183">7183</a>,
			        <a href="https://github.com/w3c/csswg-drafts/issues/8288">8288</a>)
		* Ensuring the ability to turn each feature “off”.
			(Issues <a href="https://github.com/w3c/csswg-drafts/issues/6950">6950</a>,
			        <a href="https://github.com/w3c/csswg-drafts/issues/8288">8288</a>)
		* Add keywords to allow replacing incorrect space characters in the source.
			(Issues <a href="https://github.com/w3c/csswg-drafts/issues/318">318</a>,
			        <a href="https://github.com/w3c/csswg-drafts/issues/7183">7183</a>,
			        <a href="https://github.com/w3c/csswg-drafts/issues/8263">8263</a>)
		* Allow 'hanging-punctuation' to hang leading ideographic spaces
			to compensate for plaintext-derived source text practices.
			(<a href="https://github.com/w3c/csswg-drafts/issues/2462">Issue 2462</a>)
		* Move ''no-compress'' to 'text-justify' since it controls justification more than spacing.
			(<a href="https://github.com/w3c/csswg-drafts/issues/7079">Issue 7079</a>)
	* Extended contextual characters evaluated in 'text-spacing'
		to include characters from the <code>Pe</code> and <code>Ps</code> categories.
		(<a href="https://github.com/w3c/csswg-drafts/issues/6091">Issue 6091</a>)
	* Renamed <css>text-space-collapse</css> back to 'white-space-collapse'.
		(<a href="https://github.com/w3c/browser-specs/issues/8273">Issue 8273</a>)

	Significant changes since the <a href="https://www.w3.org/TR/2022/WD-css-text-4-20220505/">5 May 2022 Working Draft</a> include:
	<ul>
		<li>Added ''text-justify/ruby'' value to 'text-justify'.
			(<a href="https://github.com/w3c/csswg-drafts/issues/771">Issue 771</a>
			 <a href="https://github.com/w3c/csswg-drafts/issues/779">Issue 779</a>)
		<li>Switched ''text-spacing: normal'' to use ''text-spacing/trim-end'' instead of ''text-spacing/allow-end''.
			(<a href="https://github.com/w3c/csswg-drafts/issues/7055">Issue 7055</a>)
		<li>Switched ''text-spacing: normal'' to also apply ''text-spacing/ideograph-alpha'' and ''text-spacing/ideograph-numeric'',
			updated UA default stylesheet to exclude these from monospace contexts,
			specified that non-zero margin/border/padding inhibits space insertion,
			and defined the amount of inserted space as ''0.125ic''.
			(<a href="https://github.com/w3c/csswg-drafts/issues/6950">Issue 6950</a>)
		<li>Defined ''text-align: match-parent'' to compute to ''text-align/start'' on the [=root element=]
			for simplicity of implementation.
			(<a href="https://github.com/w3c/csswg-drafts/issues/6542">Issue 6542</a>)
		<li>Allow ''text-justify/distribute'' keyword to be a [=legacy value alias=]
			or to simply compute to ''text-justify/inter-character'';
			this allows UAs to do whichever is easier, since the distinction does not matter for backwards-compatibility.
			(<a href="https://github.com/w3c/csswg-drafts/issues/7322">Issue 7322</a>)
		<li>Renamed <css>trim-inner</css> value of 'white-space-trim' to ''discard-inner'' for consistency with other values.
			(<a href="https://github.com/w3c/csswg-drafts/issues/448">Issue 448</a>)
	</ul>

	Significant changes since the <a href="https://www.w3.org/TR/2019/WD-css-text-4-20191113/">2019 Working Draft</a> include:
	<ul>
		<li>Integrating the full text of [[CSS-TEXT-3]].
		<li>Adding percentages to 'word-spacing' and 'letter-spacing'
			to represent sizes relative to the current 'font-size'.
			(<a href="https://github.com/w3c/csswg-drafts/issues/2165">Issue 2165</a>)
		<li>Suggesting a UA rule to prevent spaces in <{textarea}> from collapsing.
			(<a href="https://github.com/w3c/csswg-drafts/issues/6309">Issue 6309</a>)
	</ul>

<h3 class="no-num" id="changes-L3">
Additions Since Level 3</h3>

	New features in Level 4:

	* ''word-break: auto-phrase'', for automaticly determining phrases to keep together while line breaking
	* 'word-space-transform', for transforming word separators
	* breaking up of the 'white-space' property into multiple longhands:
		* 'white-space-collapse' and its ''preserve-spaces'' and ''white-space-collapse/discard'' values
		* 'white-space-trim', for trimming excess white space at the boundaries of an element
		* 'text-wrap-mode' to control whether wrapping occurs or not
	* 'text-wrap-style' and its ''balance'', ''stable'', and ''pretty'' values
	* 'wrap-before', 'wrap-after', and 'wrap-inside', to avoid or force wrapping (similar to the 'break-*' properties for pagination)
	* 'hyphenate-character', to explicitly control the hyphenation character
	* 'hyphenate-limit-zone', 'hyphenate-limit-chars', 'hyphenate-limit-lines', 'hyphenate-limit-last', for better control over automatic hyphenation
	* <<string>> values for 'text-align' for aligning on, e.g., a decimal point
	* 'text-group-align' for group-aligning a set of line boxes whose contents are aligned by 'text-align'
	* 'line-padding' for inserting spaces within the inline box at the start/end of lines
	* 'text-spacing' for automatic spacing around punctuation and script changes

	<wpt hidden title="
		Tests for the next level(s) of this specification,
		or anticipated to be added some day."
	>
		text-stroke-width-subpixel.html
	</wpt>
