css-custom-props-loader

1.0.1 • Public • Published

CSS Custom Properties Loader for Webpack
Sponsored by Version Downloads Dependencies

Loader to get CSS custom properties from CSS files.

See MDN custom CSS properties: MDN

$ npm install --save-dev css-custom-props-loader

Usage

Documentation: Using loaders

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

Logo of Sebastian Software GmbH, Mainz, Germany

Copyright 2019
Sebastian Software GmbH

Readme

Keywords

none

Package Sidebar

Install

npm i css-custom-props-loader

Weekly Downloads

4

Version

1.0.1

License

Apache-2.0

Unpacked Size

4.04 kB

Total Files

6

Last publish

Collaborators

  • fastner