@syberisle/postcss-at-apply
v0.0.2
Published
Tailwind like @apply processing
Downloads
3
Maintainers
Readme
@syberisle/postcss-at-apply
PostCSS plugin that allows you to use @apply
similar to Tailwind CSS.
Installation
npm install --save-dev @syberisle/postcss-at-apply
Add to your plugins list
module.exports = {
plugins: {
"@syberisle/postcss-at-apply": {}
}
}
Usage
.a { color: red; }
.b { background: blue !important; }
.c { @apply a b; }
.d { @apply !a; }
Results:
.a { color: red; }
.b { background: blue !important; }
.c { color: red; background: blue; }
.d { color: red !important; }
You can prefix !
to a selector in @apply
to have !important
added to it, otherwise !important
is removed.
You may add !important
to the end of @apply
, and it will be applied to all rules.