Package Exports
- @unocss/transformer-directives
Readme
@unocss/transformer-directives
UnoCSS transformer for @apply
directive
Install
npm i -D @unocss/transformer-directives
import Unocss from 'unocss/vite'
import transformerDirective from '@unocss/transformer-directives'
Unocss({
transformers: [
transformerDirective(),
],
})
Usage
.custom-div {
@apply text-center my-0 font-medium;
}
Will be transformed to:
.custom-div {
margin-top: 0rem;
margin-bottom: 0rem;
text-align: center;
font-weight: 500;
}
Currently only
@apply
is supported.
License
MIT License © 2022 hannoeru