postcss-varfallback

1.1.3 • Public • Published

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);
}

Readme

Keywords

none

Package Sidebar

Install

npm i postcss-varfallback

Weekly Downloads

17

Version

1.1.3

License

BSD-2-Clause

Unpacked Size

16.7 kB

Total Files

12

Last publish

Collaborators

  • garthdb
  • lazd