noInvalidTailwindSyntax (or noInvalidTailwindAtRules)
#11049
gameroman
started this conversation in
Rule suggestion
Replies: 1 comment 1 reply
|
Syntax errors are raised by our css parser automatically. But, as you pointed out, you can have css that is technically valid syntactically, but tailwind won't interpret correctly. So I think a Do you have any more examples we would flag? What docs can we reference for what's valid and invalid? |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Disallow invalid nesting or usage of
@variantinside@themeor inside@layer themewithout a scoping target (for example:root)Directives like
@variantare supported inside@utilityblocks or attached to DOM/theme targets, but@variantin@theme, or inside@layer themewithout a scoping selector results in invalid CSS or ignored stylesAI agents often hallucinate invalid syntax so I think catching it early with a linter would be a good idea
❌ Invalid
Completely invalid syntax
Valid syntax but gives not what you'd expect
✅ Valid
Could also be 2 separate rules
All reactions