JSPM

@unocss/transformer-directives

0.28.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 296765
  • Score
    100M100P100Q188386F
  • License MIT

UnoCSS transformer for `@apply` directive

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