@@ -9,11 +9,6 @@ A style guide. This is intended for:
99Styleguide Trumps.Scopes.StyleGuide
1010*/
1111
12- .s-style-guide {
13- margin-top : var (--global-space--large );
14- margin-bottom : var (--global-space--x-large );
15- }
16-
1712
1813
1914
@@ -24,16 +19,34 @@ Styleguide Trumps.Scopes.StyleGuide
2419
2520/* ELEMENTS: Content Sectioning */
2621
27- .s-style-guide section {
28- clear : both;
29- }
30- .s-style-guide section : not (section section ) {
31- border-top : var (--global-border--x-thick );
32- padding-top : var (--global-space--x-large );
22+ /* NOTE: Similar to `s-document` "ELEMENTS: Content Sectioning" */
23+
24+ /* To give little margin above isolated headings for sections */
25+ /* FAQ: Headings with no prior sibling need spacing before the heading */
26+ /* FAQ: Headings that begin `o-section` already have spacing from `o-section` */
27+ .s-style-guide section : not (.o-section ) > h1 : first-child ,
28+ .s-style-guide section : not (.o-section ) > h2 : first-child ,
29+ .s-style-guide section : not (.o-section ) > h3 : first-child ,
30+ .s-style-guide section : not (.o-section ) > h4 : first-child ,
31+ .s-style-guide section : not (.o-section ) > h5 : first-child ,
32+ .s-style-guide section : not (.o-section ) > h6 : first-child ,
33+ /* FAQ: Headings after non-headings need spacing before the heading */
34+ /* FAQ: Headings after headings already have spacing from prior heading */
35+ .s-style-guide section > : not (h1 , h2 , h3 , h4 , h5 , h6 ) + h1 ,
36+ .s-style-guide section > : not (h1 , h2 , h3 , h4 , h5 , h6 ) + h2 ,
37+ .s-style-guide section > : not (h1 , h2 , h3 , h4 , h5 , h6 ) + h3 ,
38+ .s-style-guide section > : not (h1 , h2 , h3 , h4 , h5 , h6 ) + h4 ,
39+ .s-style-guide section > : not (h1 , h2 , h3 , h4 , h5 , h6 ) + h5 ,
40+ .s-style-guide section > : not (h1 , h2 , h3 , h4 , h5 , h6 ) + h6 {
3341 margin-top : var (--global-space--x-large );
3442}
35- .s-style-guide section section {
36- border-top : var (--global-border--normal );
37- padding-top : var (--global-space--normal );
38- margin-top : var (--global-space--normal );
43+
44+ /* To give much margin below all headings for sections */
45+ .s-style-guide section > h1 ,
46+ .s-style-guide section > h2 ,
47+ .s-style-guide section > h3 ,
48+ .s-style-guide section > h4 ,
49+ .s-style-guide section > h5 ,
50+ .s-style-guide section > h6 {
51+ margin-bottom : var (--global-space--normal );
3952}
0 commit comments