Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.