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

I'm not sure we should be getting into all these nuances in this (unrelated) issue. I just want to get a temperature check about the idea in general. If the idea makes sense in general, then I can open a new issue.

But to answer your questions:

> So which one wins between two conflicting declarations: one in `@context(first)` found in shadow DOM, and one in `@context(first)` found in the main document?

There is no need for a new conflict resolution mechanism; we already have order of appearance, specificity, etc. All things being equal, whichever gets added last wins. If more control is desired, `@layer` can be used.

> Also, same-name layers that couldn't conflict together because they were previously in separate contexts would now be in the same context.

I don't think there is such a thing as "previously", since this is a completely new thing. Any `@layer` names used within `@context` are expected to be in a shared context right from the start.

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


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

Received on Thursday, 20 June 2024 16:43:36 UTC