Transform your css/scss
to tailwindcss plugin
!
#12102
sonofmagic
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Quickly Start css-to-tailwindcss-plugin
I write a lib called
css-to-tailwindcss-plugin
, it's can transform yourcss/scss
totailwindcss plugin
, let's see how to use it.theme()
and@apply
resolvedInput & Output Sample
you have a css file like below:
then it will transform to
tailwindcss plugin
like this:Install
if you want to resolve
tailwindcss's Functions & Directives
, you should installtailwindcss
.also
scss/sass
support need to installsass
, then this package can handle.scss
files.Usage
Cli
Then a js file called
<css-file-name>.js
will be generated in thetw-plugins
dir.Nodejs Api
Tailwindcss Plugin
tailwindcss
theme()
and@apply
resolvedyou should install
tailwindcss
, then passtailwind.config.js
file path orinline Config
to this lib.then
theme()
and@apply
will be resolved.License
MIT License © 2023-PRESENT sonofmagic
Source Code Url:
https://github.com/sonofmagic/icestack/tree/main/packages/css-to-tailwindcss-plugin
Beta Was this translation helpful? Give feedback.
All reactions