Package Exports
- postcss-var-func-fallback
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (postcss-var-func-fallback) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
PostCSS Var Func Fallback
PostCSS plugin Adds fallback values to var(name) occurences.
.foo {
/* Input example */
color: var(--theme);
}.foo {
/* Output example */
color: var(--theme, royalblue);
}Usage
Step 1: Install plugin:
npm install --save-dev postcss postcss-var-func-fallbackStep 2: Check you project for existed PostCSS config: postcss.config.js
in the project root, "postcss" section in package.json
or postcss in bundle config.
If you do not use PostCSS, add it according to official docs and set this plugin in settings.
Step 3: Add the plugin to plugins list:
module.exports = {
plugins: [
+ require('postcss-var-func-fallback'),
require('autoprefixer')
]
}