-
Notifications
You must be signed in to change notification settings - Fork 218
Syntax highlighting #6
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
Comments
Hey Benoît, thanks for the feedback! I’m not sure you can extend syntax definitions like that. I might be wrong though. I think you’d have to define a brand new "language," which I don’t really want to do. I use this extension and then set VS Code to associate CSS files with PostCSS: Alternatively you can disable the built-in CSS validation: |
Hmm, I don't think that's gonna work for me, as I'm also using Sass (.scss files) with Tailwind. No big deal. Thank you for your quick response :) |
Although, after some digging I still can’t find a way around the validation issue. If you require validation I would recommend disabling the built-in validation, and using stylelint instead, which allows defining custom at-rules. In terms of syntax highlighting.. how do you imagine the class names after an |
Nice, I will look at that, thanks!
Maybe similar to how they appear in a selector? |
Looks perfect! :) |
Sweet! This is released now so let me know if you run in to any issues :) |
Re-closing this, everything seems to work well :) Thanks again |
First of all, thank you so much for this.
It would be cool if not only the linter didn't mark Tailwind's "additions" to CSS as invalid (for instance it doesn't like
@apply .some-class
, complaining with[css] identifier expected
), but to go one step further and highlight@apply
and the utilities following it. Similarly,config()
could be highlighted the same way other CSS "functions" such ascalc()
are.I don't know if that's possible, but if it is, it would make this awesome extension even better. :) Thanks!
EDIT: I forgot to mention
@tailwind
and@screen
.The text was updated successfully, but these errors were encountered: