https://github.com/moox/broccoli-cssnext
# DEPRECATED. Use broccoli-postcss instead.
https://github.com/moox/broccoli-cssnext
Last synced: 6 months ago
JSON representation
# DEPRECATED. Use broccoli-postcss instead.
- Host: GitHub
- URL: https://github.com/moox/broccoli-cssnext
- Owner: MoOx
- License: mit
- Created: 2014-10-07T13:44:41.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-01-04T07:44:02.000Z (over 10 years ago)
- Last Synced: 2025-01-05T20:55:52.303Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# DEPRECATED. Use broccoli-postcss instead.
---
# broccoli-cssnext
[](https://www.npmjs.org/package/broccoli-cssnext)
[](https://travis-ci.org/cssnext/broccoli-cssnext)
[](https://david-dm.org/cssnext/broccoli-cssnext)
[](https://david-dm.org/cssnext/broccoli-cssnext#info=devDependencies)
[cssnext](https://github.com/cssnext/cssnext) plugin for [Broccoli](https://github.com/broccolijs/broccoli)
```css
:root {
--font-size: 16px;
}
@custom-media --mobile screen and (max-width: 320px);
@media (--mobile) {
a {
font-size: calc(var(--font-size) - 2px);
color: hwb(270, 20%, 40%);
}
}
```
↓
```css
@media screen and (max-width: 320px) {
a {
font-size: 14px;
color: rgb(102, 51, 153);
}
}
```
## Installation
[Use npm](https://www.npmjs.org/doc/cli/npm-install.html).
```console
$ npm install --save-dev broccoli-cssnext
```
## Usage
```js
var cssnext = require('broccoli-cssnext');
tree = cssnext(tree, options);
```
## API
### cssnext(tree, options)
[All cssnext options](http://cssnext.io/usage/) are available.
[`from` option](http://cssnext.io/usage/#from) is automatically specified using source file path by default.
And `map.inline` option is always `true` if [`map` option](http://cssnext.io/usage/#map) is enabled.
---
## License
Copyright (c) 2014 [Shinnosuke Watanabe](https://github.com/shinnn)
Licensed under [the MIT License](./LICENSE).