Skip to content

Instantly share code, notes, and snippets.

@rahulsivalenka
Last active June 14, 2016 19:26
Show Gist options
  • Save rahulsivalenka/48ff20a5154fd39a0071347af699eab5 to your computer and use it in GitHub Desktop.
Save rahulsivalenka/48ff20a5154fd39a0071347af699eab5 to your computer and use it in GitHub Desktop.
Common prefix for all CSS classess for an app using sass variable
// 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