Re: [csswg-drafts] [css-pseudo-4] Add a pseudo-element to style all highlight pseudo-elements (#9091)

> ([#](https://github.com/w3c/csswg-drafts/issues/9091#issue-1812295535)) This feature would make it easier for authors who are changing custom properties in a subtree to make sure that those custom properties will work correctly across all the highlight pseudo-elements, without needing to know exactly which highlight pseudo-elements will use the custom properties that they're modifying.

In https://github.com/w3c/csswg-drafts/issues/9909#issuecomment-1949195295 I came to the suggestion to have all custom-pseudos inherit their custom properties from their originating element.

I’m not sure what the performance implications would be there, but it would solve the core problem once and for all.

> ([#](https://github.com/w3c/csswg-drafts/issues/9091#issuecomment-1663121508)) Having `::highlight()` match all custom highlights would make sense, though.

For View Transitions we use `*` to denote “any of these”. I think it would make sense to use the same pattern for `::highlight()` as well – i.e. `::highlight(*)`.

We would also need to adopt to specificity calculation rules as well:

- `*` = Add 0,0,0
- Not `*` = Add 0,0,1

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


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

Received on Monday, 19 February 2024 08:02:06 UTC