tailwind-sublime-autocomplete icon indicating copy to clipboard operation
tailwind-sublime-autocomplete copied to clipboard

Feature request: would ❤️ for it to work in *.css files

Open lance-anderson opened this issue 3 years ago • 4 comments

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!

lance-anderson avatar Jun 26 '21 00:06 lance-anderson

+1 and also in .less (or other preprocessor files)

michalbenda avatar Aug 12 '21 10:08 michalbenda

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 with scss 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 to group , bggrto[TAB] → bg-gradient-to or bggrtob[TAB] → bg-gradient-to-b)
  • I got all the classes from another Tailwind sublime package

kevnk avatar Jun 03 '22 15:06 kevnk

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

kevnk avatar Jun 03 '22 15:06 kevnk

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

ferdiansyah0611 avatar Sep 28 '22 11:09 ferdiansyah0611