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
address the simple parts of @fantasai’s feedback
  • Loading branch information
delan committed Sep 21, 2022
commit 4e092c568e8a4247309ffff98fae7b172f2b4067
31 changes: 16 additions & 15 deletions css-pseudo-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -697,11 +697,11 @@ Styling Highlights</h3>
Issue: Are there any other properties that should be included here?

'color' and 'background-color'
are known as <dfn>highlight colors</dfn>.
are known as the <dfn>highlight colors</dfn>.
Because this concept exists for compatibility reasons,
other similar properties
like 'fill-color' or 'stroke-color'
must not be treated as highlight colors.
are not handled as [=highlight colors=].

<!-- Add this back if for some reason someone wants to implement 'outline'?
The outline, if supported, must be drawn
Expand All @@ -715,7 +715,7 @@ Styling Highlights</h3>
-->

Note: Historically (and at the time of writing)
only the highlight colors have been interoperably supported.
only 'color' and 'background-color' have been interoperably supported.

<h3 id=highlight-ua-styles>
Default UA Styles</h3>
Expand All @@ -727,12 +727,15 @@ Default UA Styles</h3>
:root::grammar-error { text-decoration-line: grammar-error; }
</pre>

Some highlight pseudo-elements
should have <dfn>default highlight colors</dfn>,
consisting of a 'color' and a 'background-color'.
For ''::selection'' they are
Some [=highlight pseudo-elements=]
should have <dfn>paired default highlight colors</dfn>,
consisting of a default 'color' and 'background-color'
Comment thread
delan marked this conversation as resolved.
Outdated
provided by the UA
that are either used or overridden together,
see [[#paired-cascade]].
For ''::selection'' they should correspond to
''HighlightText'' and ''Highlight'',
while for ''::target-text'' they are
while for ''::target-text'' they should correspond to
''MarkText'' and ''Mark''.

Note: the painting behavior of highlight colors
Expand Down Expand Up @@ -811,7 +814,8 @@ Cascading and Per-Element Highlight Styles</h3>
of its <a>originating element</a>'s parent element
(regardless of whether that property is an <a>inherited property</a>).

For the root element,
Additionally,
for [=highlight pseudo-elements=] originating from the root element,
the [=inherited value=] of 'color'
is ''currentColor'',
not the [=initial value=].
Expand Down Expand Up @@ -895,14 +899,14 @@ Highlight Colors</h4>

For compatibility reasons,
[=default highlight colors=]
must only be [=used value|used=]
must only be used
when neither of the [=highlight colors=]
yield a [=cascaded value=]
or [=specified value=]
Comment thread
delan marked this conversation as resolved.
Outdated
of the [=author origin=].
from the [=author origin=].
When a highlight color is ''revert'' or ''revert-layer'',
the origin <em>after</em> rolling back the cascade
determines whether this is the case.
determines the [=cascaded value=]’s [=cascade origin|origin=].

<div class="example">
For example,
Expand All @@ -916,13 +920,10 @@ Highlight Colors</h4>
in the <code>&lt;em></code> element
if given by the author:
<pre class="lang-css">
/* cascaded value is author origin */
em::selection { color: initial; }
em::selection { color: inherit; }
em::selection { color: unset; }
em::selection { color: green; }

/* specified value is author origin */
p::selection { color: green; }
</pre>
</div>
Expand Down