@syberisle/postcss-at-apply

0.0.2 • Public • Published

@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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.22latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.22
0.0.10

Package Sidebar

Install

npm i @syberisle/postcss-at-apply

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

6.45 kB

Total Files

4

Last publish

Collaborators

  • dlundgren