Re: [csswg-drafts] [css-cascade] Evaluate cascade order of ::slotted and global styles in the same conditions (#6466)

Retitling because it was clear in https://github.com/w3c/csswg-drafts/issues/6867 that the problem with slotted is not the specificity but the cascade order rules. It seems the reason people don't hit this with :host is because those are not builtins.

We discussed a bit "what would the ideal cascade order of these be". It seems there was a desire of just letting specificity fight as usual, and only then sort by tree (that is, make the sort key, ignoring cascade layers, something like `(specificity, tree, source order)`.

Another less breaking alternative would be something like an "important layer" kind of concept, where you'd sort by layer importance _before_ sorting by tree. Cc @LeaVerou @keithamus @rniwa @tabatkins 

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


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

Received on Saturday, 28 September 2024 17:36:43 UTC