File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Bad example
2
+ .component {
3
+ color : #333 ;
4
+
5
+ .component-piece {
6
+ background : #fff ;
7
+
8
+ .component-subpiece {
9
+ border : 5px solid #555 ;
10
+ }
11
+ }
12
+ }
13
+
14
+
15
+ // Good example
16
+ .component {
17
+ color : #333 ;
18
+
19
+ .component-piece {
20
+ background : #fff ;
21
+ }
22
+
23
+ .component-subpiece {
24
+ border : 5px solid #555 ;
25
+ }
26
+ }
Original file line number Diff line number Diff line change @@ -415,6 +415,24 @@ <h3>Organization</h3>
415
415
< h2 > SCSS</ h2 >
416
416
</ div >
417
417
418
+ < div class ="section " id ="scss-nesting ">
419
+ < div class ="col ">
420
+ < h3 > Nesting</ h3 >
421
+ < ul >
422
+ < li > Avoid nesting selectors greater than 3 levels deep</ li >
423
+ </ ul >
424
+ < p > Additional reading:</ p >
425
+ < ul >
426
+ < li > < a href ="http://markdotto.com/2012/02/16/scope-css-classes-with-prefixes/ "> Scope CSS classes with prefixes</ a > </ li >
427
+ < li > < a href ="http://markdotto.com/2012/03/02/stop-the-cascade/ "> Stop the cascade</ a > </ li >
428
+ </ ul >
429
+ </ div >
430
+ < div class ="col ">
431
+ {% highlight scss %}{% include scss/nesting.scss %}{% endhighlight %}
432
+ </ div >
433
+ </ div >
434
+
435
+
418
436
< div class ="section " id ="css-editor-prefs ">
419
437
< div class ="col ">
420
438
< h3 > Editor preferences</ h3 >
You can’t perform that action at this time.
0 commit comments