Re: [csswg-drafts] [css-contain] CQ vs shadow boundaries (#5984)

Ah, I see what you're saying, @lilles - thanks for expanding on that. 

It does seem to me, from examples like this, that our initial resolution might make sense when thinking of shadow DOM as a 3rd-party widget full of unknowns. But these days, many teams are using custom elements with shadow DOM as the basis for an entire component system – and this resolution makes it impossible for e.g. a card component to query the container in its wrapping layout component. And `::slotted()` isn't much help, because it forces the containing element to understand and apply styles to any elements that get put inside – resulting in a tight coupling of components.

While the initial resolution makes some sense to me, it basically removes the ability for authors to use container queries well, if they are also using shadow DOM slots for their components. I don't think that's a viable tradeoff.

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


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

Received on Friday, 4 March 2022 17:07:32 UTC