Re: [csswg-drafts] [css-pseudo] `color-scheme` should be an allowed property for highlight pseudos (#11011)

Thinking much more deeply about it ...

* Layout affecting properties are not allowed on highlight pseudos, so such properties must be taken from the originating element when needed to resolve units .
* Custom properties from originating elements support existing use cases and make the change in behavior possible at all.
* Color modifying properties could go either way from a technical perspective. The do not affect layout so could go on the highlight itself, but it's hard to see why you would want the highlight and the originating element to differ in their color adjustment.

The key question then is whether there is a use case in which you want _different_ `forced-color-adjust` and `color-scheme` for the underlying text and it's highlight. I'm having a hard time seeing the benefits and I can definitely see negative outcomes, such as contrast problems. It's also more work for authors if they need to duplicate their `forced-color-adjust` and `color-scheme` properties onto the highlights.

Does anyone have a use case for `forced-color-adjust` and `color-scheme` differing between a highlight pseudo and it's originating element?

-- 
GitHub Notification of comment by schenney-chromium
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11011#issuecomment-2414660794 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 15 October 2024 17:53:50 UTC