Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

sebastian-software/css-custom-props-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Webpack loader to get CSS custom properties from CSS files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published