1.1.3 • Published 4 years ago
postcss-varfallback
Licence
BSD-2-Clause
Version
1.1.3
Deps
2
Size
16 kB
Vulns
5
Weekly
0
postcss-varfallback
Use the fallback value of any var reference
Installation
npm install postcss-varfallback
postcss -u postcss-varfallback -o dist/index.css src/index.css
Usage
Assuming you have some CSS defined that uses fallback variables:
:root {
--component-background-color: blue;
}
.component {
background-color: var(--mod-background-color, var(--component-background-color));
}
Running it through this plugin will produce:
:root {
--component-background-color: blue;
}
.component {
background-color: var(--component-background-color);
}