postcss-preset-kensho
postcss-preset-kensho is the standard postcss pipeline used across Kensho projects. It includes:
Install
$ npm i -D postcss-preset-kensho
Usage
Add the plugin to your postcss.config.js
:
moduleexports = plugins:
Features
Autoprefixing
Vendor prefixes are automatically added to properties, at rules, etc.
Nesting
Selectors can be nested as you'd expect from frameworks like LESS, Sass, etc.
&} /* becomes: */
Variables
Variables conform to a transpilable subset of the native CSS spec. They are declared within the :root
selector and invoked with the var(name)
function:
Global variables can be injected by passing {variables: {...[name]: value}}
as an option.