Skip to content

egoist/cssbag

Repository files navigation

cssbag NPM version NPM downloads Build Status

cssbag is a collection of PostCSS plugins I use, it's similar to precss.

Install

$ npm install -D cssbag

Usage

const cssbag = require('cssbag')

postcss([cssbag(options)]).process(css) //...

API

cssbag([options])

Each plugin has its own option namespace. For example, if you want to set options for postcss-smart-import, simply:

postcss([
  cssbag({
    'smart-import': {},
    // or use camelCase
    smartImport: {}
  })
])

Plugins

Unwrap nested rules like how Sass does it.

Sass-like variables, conditionals, and iteratives.

Transform W3C CSS Custom Properties for cascading variables.

Loading/including other files (transform @import rules by inlining content) and quering/referring assets (referred in url() functions). Think of postcss-import + postcss-url + postcss-assets.

PostCSS plugin for mixins.

PostCSS plugin to reduce calc()

Writing simple and graceful Media Queries!

Transform W3C CSS Extensions(Custom Selectors) to more compatible CSS.

Transform W3C CSS Custom Media Queries to more compatible CSS

PostCSS plugin for property lookups, similar to Stylus.

Transform :matches() W3C CSS pseudo class to more compatible CSS (simpler selectors).

Transform :not() W3C CSS level 4 pseudo class to more compatible CSS (multiple css3 :not() selectors).

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT © EGOIST

About

A collection of PostCSS plugins

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published