broccoli-cssnext
cssnext plugin for Broccoli
:root {
--font-size: 16px;
--color: hwb(270, 20%, 40%);
}
@custom-media --mobile screen and (max-width: 320px);
@media (--mobile) {
a {
font-size: calc(var(--font-size) - 2px);
color: hwb(270, 20%, 40%);
}
}
↓
@media screen and (max-width: 320px) {
a {
font-size: 14px;
color: rgb(102, 51, 153);
}
}
Installation
Install with npm.
npm i --save-dev broccoli-cssnext
Usage
var cssnext = require('broccoli-cssnext');
tree = cssnext(tree, options);
API
cssnext(tree, options)
All cssnext options are available.
By default, from
option is automatically specified using source file path.
License
Copyright (c) 2014 Shinnosuke Watanabe
Licensed under the MIT License.