@@ -1912,68 +1912,69 @@ Text Shadows: the 'text-shadow' property</h2>
19121912
19131913 <pre class="propdef">
19141914 Name : text-shadow
1915- Value : none | [ <<color>>? && <<length>>{2,4} ] #
1915+ Value : none | <<shadow>> #
19161916 Initial : none
19171917 Applies to : text
19181918 Inherited : yes
19191919 Computed value : either the keyword ''box-shadow/none'' or
19201920 a list, each item consisting of four absolute lengths
19211921 plus a computed color
1922- Animation type : as [=shadow list=]
1922+ and optionally also an ''text-shadow/inset'' keyword
1923+ Animation type : <a href="https://www.w3.org/TR/web-animations-1/#animating-shadow-lists">as shadow list</a>
19231924 </pre>
19241925
19251926 This property accepts a comma-separated list of shadow effects
19261927 to be applied to the text of the element.
19271928 Values are interpreted as for 'box-shadow' [[!CSS-BACKGROUNDS-3]] .
1928- (But note that the ''box-shadow/inset'' keyword are not allowed.)
19291929 Each layer shadows the element's text and all its text decorations
19301930 (composited together).
1931- If the color of the shadow is not specified,
1932- it defaults to ''currentColor'' ,
1933- i.e. the shadow’s color is taken from the element’s 'color' property.
1934-
19351931 The shadow effects are applied front-to-back:
19361932 the first shadow is on top.
1937- The shadows may thus overlay each other,
1938- but they never overlay the text itself.
1939- The shadow must be painted at a stack level
1940- between the element's border and/or background (if present)
1933+ The shadows may thus overlay each other.
1934+
1935+ Unlike 'box-shadow' ,
1936+ the <a spec=css-backgrounds-3>spread distance</a>
1937+ is strictly interpreted as outset distance
1938+ from any point of the glyph outline,
1939+ and therefore, similar to the blur radius,
1940+ creates rounded, rather than sharp, corners.
1941+ Negative spread values are invalid.
1942+
1943+ <dfn>Outer text shadows</dfn>
1944+ (specified without the ''box-shadow/inset'' keyword)
1945+ shadow the text--
1946+ including any text stroke [[!FILL-STROKE-3]] --
1947+ as if it were cut and raised above the surrounding canvas.
1948+ Unlike 'box-shadow' ,
1949+ outer text shadows are not clipped to the shadowed shape
1950+ and may show through if the text is partially-transparent.
1951+
1952+ <dfn>Inner text shadows</dfn>
1953+ (specified with the ''box-shadow/inset'' keyword)
1954+ shadow the canvas--
1955+ and any text stroke [[!FILL-STROKE-3]] --
1956+ as if the text were cut and dropped below the surrounding canvas.
1957+ They are therefore only drawn within the inner edge of the stroke.
1958+
1959+ [=Outer text shadows=] must be painted at a stack level
1960+ between the element's border/background (if present)
19411961 and the elements text and text decoration.
1962+ [=Inner text shadows=] must be painted
1963+ over the text and its decorations.
19421964 UAs should avoid painting text shadows over text
19431965 in adjacent elements belonging to the same stack level and stacking context.
19441966 (This may mean that the exact stack level of the shadows depends
19451967 on whether the element has a border or background:
19461968 the exact stacking behavior of text shadows is thus UA-defined.)
1947- It is undefined whether a given shadow layer shadows
1948- each glyph or decoration independently
1949- or if the text and/or decorations are flattened and then shadowed.
19501969
1951- Unlike 'box-shadow' , text shadows are not clipped to the shadowed shape
1952- and may show through if the text is partially-transparent.
19531970 Like 'box-shadow' , text shadows do not influence layout,
19541971 and do not trigger scrolling
19551972 or increase the size of the <a>scrollable overflow region</a> .
19561973
1957- Also unlike 'box-shadow' ,
1958- the [=spread distance=] is strictly interpreted as outset distance
1959- from any point of the glyph outline,
1960- and therefore, similar to the blur radius,
1961- creates rounded, rather than sharp, corners.
1962-
1963- Note: The painting order of shadows defined here is the opposite
1964- of that defined in the 1998
1965- <a href="https://www.w3.org/TR/1998/REC-CSS2-19980512">CSS2 Recommendation</a> .
1966-
19671974 The ''text-shadow'' property applies to both the
19681975 <code> ::first-line</code> and <code> ::first-letter</code>
19691976 pseudo-elements.
19701977
1971- Level 4 adds a spread radius argument to 'text-shadow' ,
1972- using the same syntax and interpretation as for 'box-shadow' ,
1973- except that corners are always rounded
1974- (since the geometry of a glyph is not so simple as a box).
1975-
1976-
19771978<h2 id="painting">
19781979Painting Text Decorations</h2>
19791980
@@ -2089,41 +2090,34 @@ Appendix B: Default UA Stylesheet</h2>
20892090<h2 class="no-num" id="changes">Appendix C:
20902091Changes</h2>
20912092
2092- <h3 class="no-num" id="changes-2018">
2093- Changes since the 13 March 2018 Working Draft</h3>
2094-
2095- <ul>
2096- <li> Merged in entire contents of <a href="https://www.w3.org/TR/css-text-decor-3/">CSS Text Decoration Level 3</a> ,
2097- so that this is no longer a diff spec.
2098- <li> Split 'text-decoration-skip' into longhands.
2099- (<a href="https://github.com/w3c/csswg-drafts/issues/843">Issue 843</a> )
2100- <li> Added ''text-decoration-skip-ink/all'' value to 'text-decoration-skip-ink' .
2101- <li> Renamed <css> text-decoration-width</css> to 'text-decoration-thickness' .
2102- <li> Added <<percentage>> values to 'text-decoration-thickness' and 'text-underline-offset' .
2103- (<a href="https://github.com/w3c/csswg-drafts/issues/2165">Issue 2165</a> )
2104- <li> Defined 'text-underline-offset' position values as outsets rather than insets,
2105- because this was more intuitive to users.
2106- <li> Moved ''text-underline-position/from-font'' keyword from 'text-underline-offset' to 'text-underline-position' .
2107- (<a href="https://github.com/w3c/csswg-drafts/issues/3118#issuecomment-432297480">Issue 3118</a> )
2108- <li> Adjust ''text-emphasis-skip: punctuation'' to include all of Po category, with some exceptions.
2109- (<a href="https://github.com/w3c/csswg-drafts/issues/839">Issue 839</a> )
2110- <li> Clarified that line-throughs are always continuous.
2111- <li> Miscellaneous clarifications and editorial tweaks.
2112- </ul>
2093+ <h3 class="no-num" id="changes-2020">
2094+ Changes since the 6 May 2020 Working Draft</h3>
2095+
2096+
2097+ Significant changes since the
2098+ <a href="https://www.w3.org/TR/2020/WD-css-text-decor-4-20200506/">6 May 2020 Working Draft</a> :
2099+
2100+ <ul>
2101+ <li> Added <a spec=css-backgrounds-3>spread distance</a> and ''box-shadow/inset'' to 'text-shadow' .
2102+ (<a href="https://github.com/w3c/csswg-drafts/issues/6074">Issue 6074</a> ,
2103+ <a href="https://github.com/w3c/csswg-drafts/issues/6971">Issue 6971</a> )
2104+ <li> Explicitly noted properties applying to text in “Applies to” line.
2105+ (<a href="https://github.com/w3c/csswg-drafts/issues/5303">Issue 5303</a> )
2106+ </ul>
21132107
21142108<h3 class="no-num" id="additions-l3">
21152109Additions Since Level 3</h3>
21162110
2117- The following features have been added since <a href="https://www.w3.org/TR/css-text-decor-3/">Level 3</a> :
2111+ The following features have been added since <a href="https://www.w3.org/TR/css-text-decor-3/">Level 3</a> :
21182112
2119- <ul>
2120- <li> Added ''spelling-error'' and ''grammar-error'' values to 'text-decoration-line' .
2121- <li> Added 'text-decoration-thickness' and 'text-underline-offset' properties.
2122- <li> Added ''text-underline-position/from-font'' value to 'text-underline-position' .
2123- <li> Drafted 'text-decoration-skip' property and its longhands.
2124- <li> Drafted 'text-emphasis-skip' property.
2125- <li> Added [= spread distance=] value to 'text-shadow' .
2126- </ul>
2113+ <ul>
2114+ <li> Added ''spelling-error'' and ''grammar-error'' values to 'text-decoration-line' .
2115+ <li> Added 'text-decoration-thickness' and 'text-underline-offset' properties.
2116+ <li> Added ''text-underline-position/from-font'' value to 'text-underline-position' .
2117+ <li> Drafted 'text-decoration-skip' property and its longhands.
2118+ <li> Drafted 'text-emphasis-skip' property.
2119+ <li> Added <a spec=css-backgrounds-3> spread distance</a> and ''box-shadow/inset'' to 'text-shadow' .
2120+ </ul>
21272121
21282122
21292123Privacy and Security Considerations {#priv-sec}
0 commit comments