Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoping doesn't work with css @container queries #95

Open
Wiktor102 opened this issue Jun 25, 2024 · 1 comment
Open

Scoping doesn't work with css @container queries #95

Wiktor102 opened this issue Jun 25, 2024 · 1 comment

Comments

@Wiktor102
Copy link

Wiktor102 commented Jun 25, 2024

The data attributes aren't added to CSS selectors inside an @container query. This effectively disables scoping for all styles applied within an @container rule. Take the following example:
image
The above code only works because of the !important keyword.

@Wiktor102 Wiktor102 changed the title Doesn't work with css @container queries Scoping doesn't work with css @container queries Jun 25, 2024
@Wiktor102
Copy link
Author

This shortcoming causes specificity issues: the attribute selector has an additional (0, 1, 0) specificity. Refer to this example:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant