postcss-shared-options
v0.1.2
Published
PostCSS plugin Share variables between different css files with scope
Downloads
20
Maintainers
Readme
PostCSS Shared Options
PostCSS plugin share variables between different css files with scope.
/* vars.css */
:root {
--root-width: 25px;
}
@shared --root-width from "./vars.css";
.foo {
width: var(--root-width);
height: calc(var(--root-width) * 2);
}
:root {
--root-width-<md5_hash>: 25px;
}
.foo {
width: var(--root-width-<md5_hash>);
height: calc(var(--root-width-<md5_hash>) * 2);
}
Usage
postcss([ require('postcss-shared-options') ])
See PostCSS docs for examples for your environment.