Last active
August 29, 2015 14:21
-
-
Save markdalgleish/f1a74e82f7a9f0d77e2b to your computer and use it in GitHub Desktop.
Potential postcss-local-scope / css-loader optimisation
This file contains 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
.foo { | |
font-family: helvetica, arial, sans-serif; | |
font-size: 16px; | |
color: red; | |
} | |
.bar { | |
font-family: helvetica, arial, sans-serif; | |
font-size: 16px; | |
color: blue; | |
} |
This file contains 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
.shared_hash { | |
font-family: helvetica, arial, sans-serif; | |
font-size: 16px; | |
} | |
.hash_1 { | |
color: red; | |
} | |
.hash_2 { | |
color: blue; | |
} |
This file contains 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
module.exports = { | |
foo: 'shared_hash hash_1', | |
bar: 'shared_hash hash_2' | |
}; |
Wow, this looks great. This is going to let us do some really amazing things.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related:
https://github.com/webpack/css-loader#inheriting
https://gist.github.com/sokra/94fbd110e78b2cb4daf0
Just output it into this format with a postcss plugin.