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

> Currently, `::slotted()` is practically near-useless, as even CSS resets from the host page override component styles.

I want to focus on this particular point. In #10094, I've suggested `@layer !defaults` as a way to indicate low-priority styles that should lose to any styles defined within a shadow context.

Even if that doesn't solve all use-cases, I think it would be helpful. The particular example I've been using to demonstrate it is that `* { margin:0 }` in the document currently overrides the `margin` declaration in all `:host`/`::slotted` rules.

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


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

Received on Wednesday, 23 October 2024 17:34:06 UTC