Re: [csswg-drafts] [css-cascade-5] Allow authors to explicitly place unlayered styles in the cascade layer order (#6323)

@DarkWiiPlayer 

> can't `!overrides` be used to simulate `!my-layer-name` anyway by simply nesting custom layers inside `!overrides`?

Yes, this was covered [above](https://github.com/w3c/csswg-drafts/issues/6323#issuecomment-2208377203) ("There is no functional difference…").

> I feel like `!overrides` and `important!` are close enough as keywords that it might be worth considering naming this magic layer `important!` as well, to make it more obvious what it does for people reading CSS that don't keep up with every latest addition.

This was also covered above. `!important` does something very different and is a bad name for this.

> I can see cases where one CSS author might inject rules into another author's layer for customisation that should be overridden, so it makes a lot of sense to define every layer to implicitly have a nested `!overrides` layer internally.

I don't see how `!overrides` helps here; it's no different from injecting rules directly into the layer/sub-layers. At the top-level, `!overrides` solves a very real problem, while inside other layers, it's merely a convenience/consistency thing at best.

In any case, I'm not denying that it can be useful; I'm just concerned about the complexity.

See also Tab's comment in https://github.com/w3c/csswg-drafts/issues/10094#issuecomment-2004316955 ("I don't think named layers need an `initial` sublayer.")


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


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

Received on Monday, 8 July 2024 09:25:47 UTC