to-tailwind
v0.4.0
Published
Class convert to tailwind.
Downloads
2
Readme
Overview
Class convert to Tailwind expression, then you can use Tailwind to develop and no longer need the style files you wrote earlier.
Installation
npm install -g to-tailwind
Usage
<!-- ./test/index.html -->
<body>
<ul class="list">
<li class="list-item">foo</li>
<li class="list-item">bar</li>
</ul>
</body>
/* ./test/index.css */
.list > .list-item {
color: red;
}
.list > .list-item:last-of-type {
color: green;
}
Run
to-tailwind --html ./test/index.html --css ./test/index.css --output ./target
Output file
/* ./target/index.css */
.list > .list-item {
@apply text-[red]
}
.list > .list-item:last-of-type {
@apply last:text-[green]
}
Demo
Click here.
License
MIT