Directives transformer
UnoCSS transformer voor @apply, @screen en theme() directives: @unocss/transformer-directives.
Installatie
bash
pnpm add -D @unocss/transformer-directivesbash
yarn add -D @unocss/transformer-directivesbash
npm install -D @unocss/transformer-directivesbash
bun add -D @unocss/transformer-directivests
import transformerDirectives from '@unocss/transformer-directives'
import { defineConfig } from 'unocss'
export default defineConfig({
// ...
transformers: [
transformerDirectives(),
],
})TIP
Deze preset is opgenomen in het unocss pakket, je kunt het ook vandaar importeren:
ts
import { transformerDirectives } from 'unocss'Gebruik
@apply
css
.custom-div {