š Convert your CSS to TailwindCSS considering workspace tailwind configuration in a few clicks.
You can even convert simple JS objects!:
Install via the Visual Studio Code Marketplace ā
The extension finds the first Tailwind config file named tailwind.config.js
or tailwind.config.cjs
in your workspace and uses it when converting CSS. Use tailwindCSS.experimental.configFile
setting to manually specify the config file(s) yourself instead.
For more convenience, you can also assign a keyboard shortcut to the "Convert CSS to TailwindCSS" command.
To avoid duplicate settings, this extension uses the Tailwind CSS IntelliSense settings
cssToTailwindCss.arbitraryProperties
Default: false
Defines whether non-convertible properties should be converted as arbitrary properties.
tailwindCSS.rootFontSize
Default: 16
Root font size in pixels. Used to convert rem
CSS values to their px
equivalents.
tailwindCSS.experimental.configFile
Default: null
By default the extension will automatically use the first tailwind.config.js
or tailwind.config.cjs
file in your workspace that it can find to provide CSS to TailwindCSS converting. Use this setting to manually specify the config file(s) yourself instead.
Example:
"tailwindCSS.experimental.configFile": ".config/tailwind.config.js"
css-to-tailwindcss
package to stable v1css-to-tailwindcss
to cssToTailwindCss
cssToTailwindCss.arbitraryProperties
configuration