- From: Delan Azabani via GitHub <sysbot+gh@w3.org>
- Date: Wed, 16 Jun 2021 12:18:17 +0000
- To: public-css-archive@w3.org
delan has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-pseudo] clarify paired-cascading behavior == I think this sentence could be worded more precisely: > The UA must use its own highlight colors for ::selection only when neither color nor background-color has been specified by the author. 1. **Does “use” mean [used value](https://www.w3.org/TR/css-cascade-4/#used)?** This is mostly theoretical, because the spec doesn’t expose highlight pseudos to getComputedStyle, but I think it might affect what the devtools story looks like. 2. **Does “highlight colors” refer to a set of properties, and if so, which properties?** My best guess is that color and background-color are included (because those are the ones with defaults in practice), and maybe stroke-color and fill-color too ([wpt](http://wpt.live/css/css-pseudo/textpath-selection-011.html))? But what about text-{decoration,emphasis,shadow}? 3. **Do we really mean ::selection, or did we intend to say all highlight pseudos?** The note suggests this rule exists for compatibility with existing ::selection impls, but ::target-text often has a default background-color too (see also #6375). 4. **What does “specified by the author” mean?** My best guess is that “specified by the author” means “[cascaded value](https://www.w3.org/TR/css-cascade-4/#cascaded) exists, and its [origin](https://www.w3.org/TR/css-cascade-4/#cascading-origins) was not the user agent”. Not specified as in [specified value](https://www.w3.org/TR/css-cascade-4/#specified), which iiuc always exists due to [defaulting](https://www.w3.org/TR/css-cascade-4/#defaulting) ([to transparent](https://drafts.csswg.org/css-backgrounds-3/#background-color) for background-color). 5. **How do we reconcile that with [unset](https://www.w3.org/TR/css-cascade-4/#inherit-initial) and [revert](https://www.w3.org/TR/css-cascade-4/#default)?** I feel like [initial](https://www.w3.org/TR/css-cascade-4/#initial) and [inherit](https://www.w3.org/TR/css-cascade-4/#inherit) count as “specified by the author”, because the cascaded and specified values clearly exist for both, but for unset and revert, doesn’t it depend on whether we’re looking “before” or “after” they take effect? 5. **Do we really mean color and background-color only, or any of [the applicable properties](https://drafts.csswg.org/css-pseudo-4/#highlight-styling)?** Note that the former would be inconsistent with existing impl behavior. For example, in Chrome and Firefox, setting text-shadow (even to none) also disables the usual default background-color ([example](https://bucket.daz.cat/work/igalia/0/13.html)). (ping @frivoal?) Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6386 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 16 June 2021 12:18:56 UTC