Created
November 25, 2016 09:28
-
-
Save spac3unit/f366589a7aa4a4f44f0e1afa4d424aee to your computer and use it in GitHub Desktop.
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
%currency { | |
position: relative; | |
&:before { | |
content: '$'; | |
position: relative; | |
left: 0; | |
} | |
} | |
.USD %currency:before { content: '$'; } | |
.EUR %currency:before { content: '\20AC'; } // must escape the html entities for each currency symbol | |
.ILS %currency:before { content: '\20AA'; } | |
.GBP %currency:before { content: '\00A3'; } | |
Example Usage | |
<body class="USD"> | |
<span class="price">45</span> | |
</body> | |
.price { | |
@extend %currency; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment