Re: [csswg-drafts] [css-pseudo] Custom properties on :root (#6641)

Chromium just got a [bug report](https://crbug.com/1412395) about a breakage in the wild related to this issue, in GitHub’s code view for files. I’ve passed the report on to GitHub so they can work around it:

<details><summary>Code text selection broken in Chrome experimental (#2003892)</summary>

![Untitled5026](https://user-images.githubusercontent.com/465303/217502847-c40807f3-144f-4cb4-a705-9d119f1f9b4f.png)
</details>

As for the most recent proposed options:

1. Have the root highlights inherit from :root — same concern as @Loirooriol, how would paired defaults work if the author sets a ‘color’ in one of the originating ancestors?
2. Inherit custom properties from the originating element — there is precedent for this [with forced-color-adjust](https://github.com/w3c/csswg-drafts/issues/7264) and [with font properties](https://github.com/w3c/csswg-drafts/issues/7591), and Chromium [has implemented those](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/css/resolver/style_resolver.cc;l=1150-1164;drc=b331ef7cf6b62ccd694be4cd703205daaec18d6b) (with some memory usage penalty iiuc), but unlike custom properties, those properties aren’t applicable to highlights in the first place. i’m worried that doing it for applicable properties will make highlight pseudos more confusing for authors overall.
3. Ignore custom properties on the highlight — same concern as @tabatkins.

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


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

Received on Wednesday, 8 February 2023 10:42:27 UTC