From 783aa292095ede917af5b40f05a0679425d7b918 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:21:53 +0200 Subject: [PATCH] Optimize scss --- section.scss | 85 ++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/section.scss b/section.scss index 57eaf7b..459a9c4 100644 --- a/section.scss +++ b/section.scss @@ -1,33 +1,15 @@ @import "_mixins", "_vars"; -section.box.orange { - border-top: 3px solid #FBA026; -} - -section.box.red { - border-top: 3px solid #B8312F; -} - -section.box.green { - border-top: 3px solid #41A85F; -} - -section.box.blue { - border-top: 3px solid #2C82C9; -} - -section.box.purple { - border-top: 3px solid #553982; -} - -section.box.darkblue { - border-top: 3px solid #2969B0; -} - .box { @include box-sizing(border-box); display: inline-block; margin-top: 0.3rem; + + .inner { + @include box-sizing(border-box); + @include box-shadow-out(#ffffff); + padding: 10px; + } } .box-container { @@ -38,27 +20,46 @@ section.box { @include box-shadow-bottom(#f1f1f1); border: 1px solid $content-border-color; background: #fff; -} + + section.box.orange { + border-top: 3px solid #FBA026; -.box .inner { - @include box-sizing(border-box); - @include box-shadow-out(#ffffff); - padding: 10px; -} + &.red { + border-top: 3px solid #B8312F; + } -section header { - > h1 { - margin: 10px 10px 0 10px; - padding-bottom: 5px; - font-size: 1.1em; - text-shadow: 1px 1px 1px #ffffff; - border-bottom: 1px solid #e1e1e1; + &.green { + border-top: 3px solid #41A85F; + } + + &.blue { + border-top: 3px solid #2C82C9; + } + + &.purple { + border-top: 3px solid #553982; + } + + &.darkblue { + border-top: 3px solid #2969B0; } } -section > h2 { - @include box-sizing(border-box); - font-size: 1.2em; - margin-bottom: 5px; - text-shadow: 1px 1px 1px #ffffff; +section { + header { + > h1 { + margin: 10px 10px 0 10px; + padding-bottom: 5px; + font-size: 1.1em; + text-shadow: 1px 1px 1px #ffffff; + border-bottom: 1px solid #e1e1e1; + } + } + + > h2 { + @include box-sizing(border-box); + font-size: 1.2em; + margin-bottom: 5px; + text-shadow: 1px 1px 1px #ffffff; + } }