A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/6386 below:

[css-pseudo] clarify paired-cascading behavior · Issue #6386 · w3c/csswg-drafts · GitHub

Skip to content Navigation Menu

Saved searches Use saved searches to filter your results more quickly

Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Additional navigation options

[css-pseudo] clarify paired-cascading behavior #6386

Description

https://drafts.csswg.org/css-pseudo-4/#highlight-cascade

The UA must use its own highlight colors for ::selection only when neither color nor background-color has been specified by the author.

I think this sentence could be worded more precisely:

  1. Does “use” mean used value? 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)? But what about text-{decoration,emphasis,shadow}?
  3. Do we really mean “for ::selection” only, or did we intend this for 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 [css-highlight-api] Need clarification on expected default values for style properties #6375).
  4. Do we really mean “neither color nor background-color” only, or any of the applicable properties? 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).
  5. What does “specified by the author” mean? My best guess is that “specified by the author” means “cascaded value exists, and its origin was not the user agent”. Not specified as in specified value, which iiuc always exists due to defaulting (to transparent for background-color).
  6. How do we reconcile that with unset and revert? I feel like initial and 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?
  7. Do all properties become inherited for the purposes of deciding if unset should mean initial or inherit? I thought they did at first, but my Chromium colleagues have now convinced me that they don’t, given the “regardless” in “regardless of whether that property is an inherited property”.

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3