Created
April 18, 2017 20:45
-
-
Save nfiniteset/3dcaa5799639acaa169440d106407143 to your computer and use it in GitHub Desktop.
Allowed CSS selectors
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
### ids | |
Noooooooooooooooo | |
### tag / element | |
Only in `base.scss` for resets. Sometimes one must break this rule in order to win specificty fights on form fields. | |
### class | |
Use this 98% of the time. | |
### child (>) | |
IF YOU MUST nest use this selector. You should need it very seldom if you're SMACSSing right. | |
### sibling (+) | |
Highly suspicious. Moving an element should NOT change it's appearance. We want rearraingable, recomposable modules. This goes directly against that principal. | |
### attribute ([whatever="something"]) | |
You need this to style `input` tags. I'm sceptical of using it to style other things. | |
### pseudo (:whatever) | |
You need this in order to style states and pseudo elements. No choice here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment