Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2cacf64
[css-pseudo] clarify paired cascade
delan Sep 22, 2021
a5f78a4
rewrite note about stroke-color + fill-color
delan Sep 23, 2021
bdd64b9
explicitly clarify that UA tweaks to highlight colors are allowed
delan Sep 23, 2021
0f9fd75
clean up old text and references to ::selection-only paired cascade
delan Sep 23, 2021
b961126
clarify that unset always means inherit in highlight styles
delan Sep 23, 2021
8a97a38
fix bug where explicit defaults don’t exist in specified-value space
delan Sep 23, 2021
97ca06b
clarify that the inherit keyword also inherits from parent highlight
delan Sep 23, 2021
957b828
“is” → “happens to be” (it’s a non-normative framing, not the intent)
delan Sep 23, 2021
f639d98
indent the new paired cascade section
delan Sep 23, 2021
e6ec959
fix problems with ::{spelling,grammar}-error + ::highlight (#6779)
delan Nov 18, 2021
44aa6ce
adjust normative references to “UA defaults” towards new dfn
delan Nov 18, 2021
06de02d
simplify by merging ‘unset’ text into ‘inherit’ text
delan Dec 3, 2021
65597ae
move highlight colors dfn to the more appropriate #highlight-styling
delan Dec 3, 2021
64cc5cb
refer to the now-future concept of paired cascade in a clearer way
delan Dec 3, 2021
24df479
linkify “highlight colors” in interop note
delan Dec 20, 2021
bfc6498
update origins considered by paired cascade for resolution in #6386
delan Jan 5, 2022
0c46d9d
remove text allowing UA tweaks to author highlight colors
delan Jan 5, 2022
ad10942
merge from origin/main
delan Jan 14, 2022
4e4fb90
merge from main
delan Mar 30, 2022
ce77850
fix implicit defaulting of ‘color’ at :root (#6774)
delan Apr 15, 2022
4eb95b0
explicitly refer to system colors for ::selection + ::target-text
delan Apr 15, 2022
86bb487
rewrite and heavily simplify paired cascade text
delan Apr 15, 2022
4e092c5
address the simple parts of @fantasai’s feedback
delan Sep 21, 2022
b02b1ed
fix other use of “default highlight colors”
delan Sep 21, 2022
f2bc531
add ISSUE for csswg-drafts#6853 (replacing 0c46d9d9a15a6)
delan Sep 21, 2022
e944186
move paired cascade subsection to default UA styles section
delan Sep 21, 2022
26b6c2b
remove note about paired defaults not being representable as UA rules
delan Sep 21, 2022
d2a694a
fix other reference to #paired-cascade
delan Sep 21, 2022
6a14234
move note about color-like properties (and remove “highlight colors”)
delan Sep 21, 2022
e554b21
reword cascaded-or-specified to something that makes more sense
delan Sep 21, 2022
5084397
s/consisting of/--/
delan Oct 6, 2022
a341d83
reintroduce text about color to #highlight-styling as a note
delan Oct 6, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bug where explicit defaults don’t exist in specified-value space
  • Loading branch information
delan committed Sep 23, 2021
commit 8a97a38e8f519a6da9515bed862a2e6f9ec2a131
50 changes: 32 additions & 18 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -766,40 +766,54 @@ Highlight Colors</h4>

In [=highlight pseudo-element=] styles,
'color' and 'background-color' are known as <dfn>highlight colors</dfn>.
For compatibility reasons,
UA default highlight colors must only be [=used value|used=]
when neither of the highlight colors yield a [=specified value=]

With the exception of ''revert'' (see below),
UA default highlight colors
for a given [=highlight pseudo-element=]
must only be [=used value|used=]
instead of [=initial values=]
when neither the originating element’s [=cascade=],
nor those of any of the originating element’s ancestors,
yield any highlight colors
of the [=author origin|author=],
[=animation origin|animation=],
or [=transition origin|transition=] origins.
In other words,
when setting one custom highlight color,
when setting one custom highlight color,
UA defaults for the other highlight color are suppressed.

This does not preclude the UA
from transforming non-default highlight colors
from transforming “custom” highlight colors
in some or all situations.
For example,
UAs may invert highlight colors based on similarity with nearby colors,
or vary their opacity.
or vary their opacities.

Note: 'stroke-color' and 'fill-color' have their usual effects
on the foreground color,
but unlike 'color',
they do not suppress the UA default 'background-color'.

For the purposes of this section,
''unset'' is considered equivalent to a [=specified value=] of ''inherit''
in the [=declared value|declaring=] origin.
This makes the value not quite equivalent to
erasing all [=declared values=] occurring earlier in the cascade,
as would normally be the case.

On the other hand,
when a highlight color is ''revert'',
the origin of the resultant value
<em>after</em> rolling back the cascade
is considered by this rule.
When a highlight color is ''revert'',
UA default highlight colors are suppressed
if and only if the cascade is “rolled back”
to one of the origins listed above.
For example,
''revert'' in an [=author-origin=] rule
rolls back the cascade to the [=user origin=],
so UA defaults are not suppressed.

Note: all other explicit defaults,
including ''unset'',
suppress UA default highlight colors like any ordinary value.
This is consistent with
how [=explicit defaulting=] is defined:
it affects [=specified values=]
based on [=cascaded values=].
Even though the outcome is <em>as if</em>
the [=cascade=] was modified in some way,
the [=cascade=] is already done,
so they exist unchanged as [=cascaded values=].

<h4 id="highlight-backgrounds">
Backgrounds</h4>
Expand Down