tailwind-sublime-autocomplete
tailwind-sublime-autocomplete copied to clipboard
Feature request: would ❤️ for it to work in *.css files
We're setting base classes in tailwind.css
as recommended here and also importing *.css files from tailwind.css
. Would be rad if this autocomplete plugin worked for *.css files as well.
Thanks!
+1 and also in .less (or other preprocessor files)
It's not perfect, but you can use the Emmet package with these added tailwind snippets to its settings like this gist.
A Few Notes
- I personally like to replace
stylesheet
withscss
because I like to write tailwind css using that syntax. - There are several conflicts with Emmet's default snippets, so it will require some customizing to your personal preferences.
- The convention here is use the first two letters of each hyphenated part of the tailwind class. (eg.
gr
[TAB] expands togroup
,bggrto
[TAB] →bg-gradient-to
orbggrtob
[TAB] → bg-gradient-to-b) - I got all the classes from another Tailwind sublime package
The primary places that will definitely require your customization (because they start with the same first two letters) are:
- gray / green
- background / basis / backdrop
- bottom / border
- break / brightness
- contents / contrast
- grayscale / grid / grow
- indent / inset / invert / invisible
- order / ordinal / origin
- overline / overscroll
- relative / resize
- right / ring
- rotate / rounded / row
- sticky static / stroke
- select / self / sepia
- to / top / touch
- tracking / transform / transition / truncate
It's not perfect, but if anyone wants to run in the stylesheet, I added the code from this plugin. Repository at here
I hope this helps