Last active
August 29, 2015 14:02
-
-
Save Lochlan/c42b05cf925a3255673a to your computer and use it in GitHub Desktop.
CSS "namespacing"
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
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// CSS "namespacing" | |
namespaceFoo { | |
@at-root { | |
&-bar { | |
content: 'bar'; | |
} | |
&-baz { | |
content: 'baz'; | |
} | |
&-qux { | |
content: 'qux'; | |
} | |
} | |
} |
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
namespaceFoo-bar { | |
content: 'bar'; | |
} | |
namespaceFoo-baz { | |
content: 'baz'; | |
} | |
namespaceFoo-qux { | |
content: 'qux'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prefixing CSS classes with a unique string can help avoid name clashes. This is useful for code that is deployed on or accessed by one or more third-party sites.