Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* BAD: The following selectors should be avoided if possible */
- .one .two .three .four { /* styles */ }
- .one ul li a { /* styles */ }
- .one ul a:hover { /* styles */ }
- .one ul li:first-child { /* styles */ }
- /* BAD: Pre-processed nested selectors */
- .one {
- .two .three.four { /* styles */ }
- ul li a { /* styles */ }
- }
- /* GOOD: No more than 3 levels deep */
- .one .four { /* styles */ }
- .one li a { /* styles */ }
- .one a:hover { /* styles */ }
- .one li:first-child { /* styles */ }
- .one a:hover { /* styles */ }
- /* ACCEPTIBLE: Discretion is advised */
- /* This is 4 levels, but the extra specificity may be preferable */
- .one li a:hover { /* styles */ }
- .one li a.active { /* styles */ }
Add Comment
Please, Sign In to add comment