Skip to content

Instantly share code, notes, and snippets.

@alex35mil
Created April 18, 2017 06:41
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alex35mil/8a5c00fbdcaeeed90959bc5a43263fb4 to your computer and use it in GitHub Desktop.
Save alex35mil/8a5c00fbdcaeeed90959bc5a43263fb4 to your computer and use it in GitHub Desktop.
CSS Modules + PostCSS + Webpack
:root {
--my-width: 400px;
}
:export {
myWidth: var(--my-width);
}
.myClass {
width: var(--my-width);
}
import styles from './styles.css';
console.log(styles.myWidth); // => '400px'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment