css-custom-props-loader
v1.0.1
Published
Load custom css properties in webpack
Downloads
7
Readme
CSS Custom Properties Loader for Webpack
Loader to get CSS custom properties from CSS files.
See MDN custom CSS properties: MDN
$ npm install --save-dev css-custom-props-loader
Usage
In your source code:
import cssProps from "!css-custom-props!./props.css";
with having css file props.css
:
:root {
--prop1: red;
--prop2: 12px;
--another-prop: blue;
}
You can access the property values via cssProps.prop1
or cssProps.anotherProp
.
Copyright
Copyright 2019Sebastian Software GmbH