Re: [csswg-drafts] [css-pseudo] Allow custom Properties in ::selection pseudos (revisited) (#11317)

> From an implementation perspective, the highlight gets a shared copy of all the originating element's variables and then adds in any that the highlight defines.

Right, OK. Stated that way, it's not too bad. Got confused earlier.

> The correct proposed language is "All custom properties inherit from the originating element" combined with re-allowing custom properties on the highlight itself.

SGTM

> zig-zag

Too complicated IMO.

---

The resolution in #9909, ["On highlight pseudos, the var() function takes from the originating element."](https://github.com/w3c/csswg-drafts/issues/9909#issuecomment-1982141005), makes it sound like this is a special behavior for the var() lookup rather than actually affecting the computed values of the highlight style (the difference is visible in e.g. CSSOM). The IRC log does not show a discussion leading up to this conclusion; it kind of looks like we actually intended to affect the computed value?

In order to not make this more "special" than it needs to be, I do think we should affect the computed value rather than special-casing var() lookup. Especially if custom properties will actually be allowed on highlight pseudos again. Either way, it would be good to clarify this point.

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


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

Received on Tuesday, 28 January 2025 09:24:46 UTC