Open
Description
The spec currently says
Style rules applying to a query container’s flat tree descendants can be conditioned by querying against it, using the @container conditional group rule.
Which was aligned here #5984 (comment)
The spec also does not carve out an exception for named container queries, so my assumption would be that they should also follow the same rule.
However, WPT has tests specifying that named container queries set inside of a shadow tree do not behave this same way, and currently all browsers are (mostly) compliant with those tests.
If this carve-out was intentional for named container queries, I think it would be nice for the spec to be updated to reflect that. If it's not intentional, then perhaps the WPTs should be reversed.