Skip to content

Commit ce77850

Browse files
committed
fix implicit defaulting of ‘color’ at :root (#6774)
1 parent 4e4fb90 commit ce77850

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

css-pseudo-4/Overview.bs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -704,12 +704,6 @@ Styling Highlights</h3>
704704
like 'fill-color'
705705
must not be treated as highlight colors.
706706

707-
The 'color' property specifies the color of both the text
708-
and all line decorations (underline, overline, line-through)
709-
and emphasis marks ('text-emphasis')
710-
applied to the text
711-
by the <a>originating element</a> and its ancestors and descendants.
712-
713707
<!-- Add this back if for some reason someone wants to implement 'outline'?
714708
The outline, if supported, must be drawn
715709
around the union of the active portions of the <a>highlight overlay</a>
@@ -740,17 +734,6 @@ Default UA Styles</h3>
740734
and doing so is recommended
741735
for ''::selection'' and ''::target-text''.
742736

743-
Otherwise,
744-
the default highlight colors for that highlight must be
745-
'currentColor' (<em>not</em> 'initial' or 'inherit')
746-
and 'transparent' respectively.
747-
In other words,
748-
when the UA doesn’t define default highlight colors
749-
for a given highlight,
750-
highlighted content retains the 'color'
751-
that would otherwise have been used
752-
without that highlight.
753-
754737
Note: the painting behavior of highlight colors
755738
means that default highlight colors
756739
can't be expressed in terms of 'color' and 'background-color'
@@ -827,6 +810,11 @@ Cascading and Per-Element Highlight Styles</h3>
827810
of its <a>originating element</a>'s parent element
828811
(regardless of whether that property is an <a>inherited property</a>).
829812

813+
For the root element,
814+
the [=inherited value=] of 'color'
815+
is ''currentColor'',
816+
not the [=initial value=].
817+
830818
<wpt>
831819
css/css-pseudo/active-selection-051.html
832820
css/css-pseudo/active-selection-052.html

0 commit comments

Comments
 (0)