diff options
-rw-r--r-- | src/scss/_component.scss | 32 | ||||
-rw-r--r-- | src/scss/foundation/_stack.scss | 41 |
2 files changed, 41 insertions, 32 deletions
diff --git a/src/scss/_component.scss b/src/scss/_component.scss index f04a4c2..fd1e3dd 100644 --- a/src/scss/_component.scss +++ b/src/scss/_component.scss @@ -1,3 +1,33 @@ +main * { + @extend .stack-first; +} + +main { + * { + + h1, + h2, + h3, + h4, + h5, + h6, + + p, + + hr, + + table, + + ul, + + ol, + + dl, + + blockquote, + + pre, + + figure { + @extend .stack; + } + } + + li > ul, + li > ol { + @extend .stack-unset; + } +} + +figure > figcaption { + @extend .stack-reset; +} + .edit-meta, .edit-page, .pagination, @@ -14,7 +44,7 @@ @include grid($flex-wrap: nowrap, $justify-content: space-between); font-weight: bold; > * { - @extend .no-stack; + @extend .stack-reset; } } .nav-prev {} diff --git a/src/scss/foundation/_stack.scss b/src/scss/foundation/_stack.scss index 20fdef3..70f25a4 100644 --- a/src/scss/foundation/_stack.scss +++ b/src/scss/foundation/_stack.scss @@ -1,7 +1,7 @@ /*-----------------------* stack *-----------------------*/ -.stack-base { +.stack-first { margin-top: 0; margin-bottom: 0; } @@ -10,40 +10,19 @@ margin-top: $default-stack; } -.no-stack { - margin-top: 0; -} -.unset-stack { - margin-top: unset; - margin-bottom: unset; +.stack--by2 { + margin-top: $default-stack * 2; } -main * { - @extend .stack-base; +.stack--by4 { + margin-top: $default-stack * 4; } -main { - * { - + h1, + h2, + h3, + h4, + h5, + h6, - + p, - + hr, - + table, - + ul, - + ol, - + dl, - + blockquote, - + pre, - + figure { - @extend .stack; - } - } - - li > ul, - li > ol { - @extend .unset-stack; - } +.stack-reset { + margin-top: 0; } -figure > figcaption { - @extend .no-stack; +.stack-unset { + margin-top: unset; + margin-bottom: unset; } |