Last active
June 14, 2016 19:26
-
-
Save rahulsivalenka/48ff20a5154fd39a0071347af699eab5 to your computer and use it in GitHub Desktop.
Common prefix for all CSS classess for an app using sass variable
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
// prefix that needs to be attached to all the css classes | |
$prefix: app-; | |
// that variable can be used as #{$prefix} to attach that prefix to every class | |
.#{$prefix}header { | |
background: red; | |
} | |
.#{$prefix}content { | |
background: yellow; | |
} | |
/* | |
// The output css would be :: | |
.app-header { | |
background: red; | |
} | |
.app-content { | |
background: yellow; | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment