Skip to content

Commit b397b20

Browse files
committed
[css-text-decor-4] Add <percentage> values to text-underline-thickness and text-underline-offset. #2165
1 parent 801cdaa commit b397b20

File tree

1 file changed

+38
-5
lines changed

1 file changed

+38
-5
lines changed

css-text-decor-4/Overview.bs

+38-5
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ Text Decoration Line Thickness: the 'text-decoration-thickness' property</h3>
290290

291291
<pre class="propdef">
292292
Name: text-decoration-thickness
293-
Value: auto | from-font | <<length>>
293+
Value: auto | from-font | <<length>> | <<percentage>>
294294
Initial: auto
295295
Applies to: all elements
296296
Inherited: no
@@ -319,10 +319,19 @@ Text Decoration Line Thickness: the 'text-decoration-thickness' property</h3>
319319

320320
<dt><dfn><<length>></dfn>
321321
<dd>
322-
Specifies the thickness of text decoration lines as a length.
322+
Specifies the thickness of text decoration lines as a fixed length.
323323
The UA must floor the actual value at one device pixel.
324-
Authors are strongly encouraged to use ''em'' units
325-
so that the line thickness scales with the font.
324+
325+
Note: A length will inherit as a fixed value,
326+
and will not scale with the font.
327+
328+
<dt><dfn><<percentage>>
329+
<dd>
330+
<p>Specifies the offset of underlines as a percentage of ''1em''.
331+
The UA must floor the actual value at one device pixel.
332+
333+
Note: A percentage will inherit as a relative value,
334+
and will therefore scale with changes in the font as it inherits.
326335
</dl>
327336
328337
<h4 id="text-decoration-thickness">
@@ -605,7 +614,7 @@ Text Underline Offset: the 'text-underline-offset' property</h3>
605614

606615
<pre class="propdef">
607616
Name: text-underline-offset
608-
Value: auto | <<length>>
617+
Value: auto | <<length>> | <<percentage>>
609618
Initial: auto
610619
Applies to: all elements
611620
Inherited: yes
@@ -637,6 +646,13 @@ Text Underline Offset: the 'text-underline-offset' property</h3>
637646
638647
Note: A length will inherit as a fixed value,
639648
and will not scale with the font.
649+
650+
<dt><dfn><<percentage>>
651+
<dd>
652+
<p>Specifies the offset of underlines as a percentage of ''1em''.
653+
654+
Note: A percentage will inherit as a relative value,
655+
and will therefore scale with changes in the font as it inherits.
640656
</dl>
641657
642658
When the value of the 'text-decoration-line' property is either
@@ -1872,6 +1888,22 @@ Appendix B: Default UA Stylesheet</h2>
18721888
<h2 class="no-num" id="changes">Appendix C:
18731889
Changes</h2>
18741890

1891+
<h3 class="no-num" id="changes-2018">
1892+
Changes since the 13 March 2018 Working Draft</h3>
1893+
1894+
<ul>
1895+
<li>Merged in entire contents of <a href="https://www.w3.org/TR/css-text-decor-3/">CSS Text Decoration Level 3</a>,
1896+
so that this is no longer a diff spec.
1897+
<li>Renamed <css>text-decoration-width</css> to 'text-decoration-thickness'.
1898+
<li>Defined 'text-underline-offset' postion values as outsets rather than insets,
1899+
because this was more intuitive to users.
1900+
<li>Moved ''text-underline-position/from-font'' keyword from 'text-underline-offset' to 'text-underline-position'.
1901+
(<a href="https://github.com/w3c/csswg-drafts/issues/3118#issuecomment-432297480">Issue 3118</a>)
1902+
<li>Added <<percentage>> values to 'text-decoration-thickness' and 'text-underline-offset'.
1903+
(<a href="https://github.com/w3c/csswg-drafts/issues/2165">Issue 2165</a>)
1904+
<li>
1905+
</ul>
1906+
18751907
<h3 class="no-num" id="additions-l3">
18761908
Additions Since Level 3</h3>
18771909

@@ -1880,6 +1912,7 @@ The following features have been added since <a href="https://www.w3.org/TR/css-
18801912
<ul>
18811913
<li>Added ''spelling-error'' and ''grammar-error'' values to 'text-decoration-line'.
18821914
<li>Added 'text-decoration-thickness' and 'text-underline-offset' properties.
1915+
<li>Added ''text-underline-position/from-font'' value to 'text-underline-position'.
18831916
<li>Drafted 'text-emphasis-skip' property.
18841917
<li>Added [=spread distance=] value to 'text-shadow'.
18851918
</ul>

0 commit comments

Comments
 (0)