Skip to content

Commit e5cf69b

Browse files
committed
[css-text-4] Revisions to word-boundary-expansion based on review by fantasai
1 parent 5cad392 commit e5cf69b

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

css-text-4/Overview.bs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Detecting Word Boundaries: the 'word-boundary-detection' property</h4>
150150
Otherwise,
151151
the User Agent must insert the ZERO WIDTH SPACE (U+200B) character
152152
at each detected word boundary
153-
within the [=text node=] children of this element.
153+
within the [=text run=] children of this element.
154154
However, the UA must not insert U+200B:
155155
* at the beginning or end of a [=block container=]
156156
* at the beginning or end of an [=inline box=] whose parent box has a [=used value=] of ''word-boundary-detection/manual''
@@ -217,15 +217,9 @@ Makig Word Boundaries Visible: the 'word-boundary-expansion' property</h4>
217217
to turn visible “spaces” such as the ETHIOPIC WORD SPACE (U+1361)
218218
into an ordinary SPACE (U+0020).
219219
220-
This property enables all instances of U+200B ZERO WIDTH SPACE
221-
to be replaced by the specified character.
222-
Instances of <{wbr}> are considered equivalent to U+200B,
223-
and are also replaced,
224-
as are U+200B inserted by ''word-boundary-detection: auto()''.
225-
This substitution happens before layout,
226-
so all layout operations that depend on the characters in the content
227-
(such as [[CSS-TEXT-3#white-space-rules]], [=line breaking=], or [=intrinsic sizing=])
228-
must use that character instead of the original U+200B.
220+
This property allows transforming certain word-separating characters
221+
into other word-separating characters,
222+
to accomodate variant typesetting styles.
229223
230224
<dl dfn-for="zero-width-space-expansion" dfn-type="value">
231225
<dt><dfn>none</dfn>
@@ -234,16 +228,25 @@ Makig Word Boundaries Visible: the 'word-boundary-expansion' property</h4>
234228
<dt><dfn>space</dfn>
235229
<dd>
236230
All instances of U+200B ZERO WIDTH SPACE
237-
within the [=text node=] children of this element
231+
within the [=text run=] children of this element
238232
are replaced by U+0020 SPACE.
239233
240234
<dt><dfn>ideographic-space</dfn>
241235
<dd>
242236
All instances of U+200B ZERO WIDTH SPACE
243-
within the [=text node=] children of this element
237+
within the [=text run=] children of this element
244238
are replaced by U+3000 IDEOGRAPHIC SPACE.
245239
</dl>
246240
241+
Instances of <{wbr}> are considered equivalent to U+200B,
242+
and are also replaced,
243+
as are U+200B inserted by ''word-boundary-detection: auto()''.
244+
Unlike 'text-transform',
245+
this substitution happens before [[CSS-TEXT-3#white-space-phase-1]]
246+
so that later operations that depend on the characters in the content
247+
(including [[CSS-TEXT-3#white-space-rules]], [=line breaking=], and [=intrinsic sizing=])
248+
use that character instead of the original U+200B.
249+
247250
Like 'text-transform', this property transforms text for styling purposes.
248251
It has no effect on the underlying content,
249252
and must not affect the content of a plain text copy &amp; paste operation.

0 commit comments

Comments
 (0)