Skip to content

Commit 67d5372

Browse files
committed
[css-text-4] Add percentages to letter-spacing and word-spacing. #2165
1 parent b6dd5d9 commit 67d5372

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed

css-text-4/Overview.bs

+28-7
Original file line numberDiff line numberDiff line change
@@ -7220,12 +7220,12 @@ Word Spacing: the 'word-spacing' property</h3>
72207220

72217221
<pre class="propdef">
72227222
Name: word-spacing
7223-
Value: normal | <<length>>
7223+
Value: normal | <<length-percentage>>
72247224
Initial: normal
72257225
Applies to: text
72267226
Inherited: yes
7227-
Percentages: N/A
7228-
Computed value: an absolute length
7227+
Percentages: relative to computed 'font-size', i.e. ''1em''
7228+
Computed value: an absolute length and/or a percentage
72297229
Animation type: by computed value type
72307230
Canonical order: n/a
72317231
</pre>
@@ -7277,12 +7277,21 @@ Word Spacing: the 'word-spacing' property</h3>
72777277
word-spacing-100.xht
72787278
</wpt>
72797279

7280-
<dt><dfn>&lt;length&gt;</dfn>
7280+
<dt><dfn>&lt;length-percentages&gt;</dfn>
72817281
<dd>
72827282
Specifies extra spacing
72837283
<em>in addition to</em> the intrinsic inter-word spacing
72847284
defined by the font.
72857285

7286+
Note: Percentages inherit intact,
7287+
and are resolved against
7288+
the computed 'font-size' of the current element
7289+
(and thus represent a size relative to
7290+
the size of the text to which they apply),
7291+
unlike ''em'' units which are resolved against
7292+
the computed 'font-size' of the element from which they inherit,
7293+
as an absolute length.
7294+
72867295
<wpt>
72877296
tab-size/tab-size-spacing-001.html
72887297
</wpt>
@@ -7400,11 +7409,12 @@ Tracking: the 'letter-spacing' property</h3>
74007409

74017410
<pre class="propdef">
74027411
Name: letter-spacing
7403-
Value: normal | <<length>>
7412+
Value: normal | <<length-percentage>>
74047413
Initial: normal
74057414
Applies to: <a>inline boxes</a> and text
74067415
Inherited: yes
7407-
Computed value: an absolute length
7416+
Percentages: relative to computed 'font-size', i.e. ''1em''
7417+
Computed value: an absolute length and/or a percentage
74087418
Animation type: by computed value type
74097419
Canonical order: n/a
74107420
</pre>
@@ -7510,6 +7520,15 @@ Tracking: the 'letter-spacing' property</h3>
75107520
Values may be negative,
75117521
but there may be implementation-dependent limits.
75127522

7523+
Note: Percentages inherit intact,
7524+
and are resolved against
7525+
the computed 'font-size' of the current element
7526+
(and thus represent a size relative to
7527+
the size of the text to which they apply),
7528+
unlike ''em'' units which are resolved against
7529+
the computed 'font-size' of the element from which they inherit,
7530+
as an absolute length.
7531+
75137532
<wpt>
75147533
tab-size/tab-size-spacing-001.html
75157534
</wpt>
@@ -10137,7 +10156,9 @@ Changes</h2>
1013710156
Significant since the <a href="https://www.w3.org/TR/2019/WD-css-text-4-20191113/">2019 Working Draft</a> publication include:
1013810157
<ul>
1013910158
<li>Integrating the full text of [[CSS-TEXT-3]].
10140-
<li>
10159+
<li>Adding percentages to 'word-spacing' and 'letter-spacing'
10160+
to represent sizes relative to the current 'font-size'.
10161+
(<a href="https://github.com/w3c/csswg-drafts/issues/2165">Issue 2165</a>)
1014110162
</ul>
1014210163

1014310164
<h3 class="no-num" id="changes-L3">

0 commit comments

Comments
 (0)