adobe/spectrum-css

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

Westbrook opened this issue · 1 comments

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.

Tracking this in Jira via CSS-752