postcss-atroot
Advanced tools
Comparing version
{ | ||
"name": "postcss-atroot", | ||
"version": "0.1.0", | ||
"version": "0.1.2", | ||
"description": "PostCSS plugin to place rules directly at the root", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "https://github.com/OEvgeny/postcss-atroot.git" | ||
"url": "https://github.com/OEvgeny/postcss-atroot.git" | ||
}, | ||
@@ -11,0 +11,0 @@ "scripts": { |
@@ -19,11 +19,37 @@ # PostCSS at-root [](https://circleci.com/gh/OEvgeny/postcss-atroot) | ||
It will play well also with ``@include``, and may be very useful when developing css frameworks. | ||
It will play well with postcss ``@include`` plugins. | ||
foo.css: | ||
```css | ||
@at-root { | ||
@viewport { width: device-width; } | ||
} | ||
.foo { | ||
color: blue; | ||
} | ||
``` | ||
bar.css: | ||
```css | ||
.bar { | ||
@import "foo.css"; | ||
} | ||
``` | ||
Will produce: | ||
```css | ||
@viewport { width: device-width; } | ||
.bar .foo { | ||
color: blue; | ||
} | ||
``` | ||
## Usage | ||
```js | ||
postcss([ require('postcss-atroot') ]) | ||
postcss([ require('postcss-atroot')() ]) | ||
``` | ||
See [PostCSS] docs for examples for your environment. | ||
[PostCSS]: https://github.com/postcss/postcss |
9447
2.13%55
89.66%