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

[Radio] ::after:dir(...) considered incorrect in some parsers #2703

Open
Westbrook opened this issue Apr 26, 2024 · 1 comment
Open

[Radio] ::after:dir(...) considered incorrect in some parsers #2703

Westbrook opened this issue Apr 26, 2024 · 1 comment

Comments

@Westbrook
Copy link
Contributor

Some strict parsing contexts will consider placing :dir after pseudo element incorrect and throw.

&:dir(rtl) {
transform: translateX(50%) translateY(-50%);
}

See errors thrown in https://lightningcss.dev/playground/index.html#%7B%22minify%22%3Atrue%2C%22customMedia%22%3Atrue%2C%22cssModules%22%3Afalse%2C%22analyzeDependencies%22%3Afalse%2C%22targets%22%3A%7B%22chrome%22%3A6225920%7D%2C%22include%22%3A0%2C%22exclude%22%3A0%2C%22source%22%3A%22div%3A%3Aafter%3Adir(ltr)%20%7B%5Cn%20%20color%3A%20red%3B%5Cn%7D%5Cn%22%2C%22visitorEnabled%22%3Afalse%2C%22visitor%22%3A%22%22%2C%22unusedSymbols%22%3A%5B%5D%2C%22version%22%3A%22local%22%7D

Not sure if this means it just gets "CSS error" (e.g. dropped) in some browsers or whether browser parsers are more lenient or something else, but it would be great if we could normalize this so that down stream tooling can more easily handle the Spectrum CSS published content.

@pfulton
Copy link
Collaborator

pfulton commented May 1, 2024

Tracking this in Jira via CSS-752

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

No branches or pull requests

2 participants