Created
April 18, 2017 06:41
-
-
Save alex35mil/8a5c00fbdcaeeed90959bc5a43263fb4 to your computer and use it in GitHub Desktop.
CSS Modules + PostCSS + Webpack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:root { | |
--my-width: 400px; | |
} | |
:export { | |
myWidth: var(--my-width); | |
} | |
.myClass { | |
width: var(--my-width); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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