Created
October 9, 2015 03:37
-
-
Save joshwnj/b4e773f84e19438a3a14 to your computer and use it in GitHub Desktop.
css modules + scoped styles?
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
<div> | |
<style scoped> | |
& { | |
background: #00F; | |
} | |
span { | |
color #FFF; | |
} | |
.version { | |
font-style: italic; | |
} | |
</style> | |
<span>space</span> | |
<span>jam</span> | |
<span class="version">2.0</span> | |
</div> | |
becomes: | |
<!-- css output --> | |
.__abc123_root { | |
background: #00F; | |
} | |
.__abc123_tag--span { | |
color #FFF; | |
} | |
.__abc123_version { | |
font-style: italic; | |
} | |
<!-- html output --> | |
<div class="__abc123_root"> | |
<span class="__abc123_tag--span">space</span> | |
<span class="__abc123_tag--span">jam</span> | |
<span class="__abc123_tag--span__abc123_version">2.0</span> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment