Last active
February 9, 2022 09:47
-
-
Save wrumsby/8908260 to your computer and use it in GitHub Desktop.
CSS naming convention.
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
/* Base styles */ | |
body {} | |
p {} | |
/* .layout-{name} */ | |
.layout-sidebar {} | |
/* .{moduleName} */ | |
.modal {} | |
/* .{moduleName}--{subComponent} */ | |
.modal--header {} | |
/* .{moduleName} */ | |
.button {} | |
/* .{moduleName}-is-{stateName} */ | |
.button-is-disabled {} | |
/* .{moduleName}-{subModule} */ | |
.button-default {} | |
/* .{moduleName}-{subModule} */ | |
.button-primary {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More Transparent UI Code with Namespaces has some interesting ideas on adding namespace prefixes too.