From d6a0cafd2d519fca96a4693caf55d49faa728dcc Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 14:56:49 +0200 Subject: [PATCH 01/14] Optimize scss --- accordion.scss | 93 +++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/accordion.scss b/accordion.scss index 5cdf256..971462e 100644 --- a/accordion.scss +++ b/accordion.scss @@ -3,51 +3,50 @@ .ac-container{ margin: 10px auto 30px auto; text-align: left; -} - -.ac-container > input { - display: none; -} - -.ac-container > label { - display: block; - padding: 5px 20px; - position: relative; - z-index: 20; - margin-top: -1px; - cursor: pointer; - color: #777; - font-size: 1em; - border: 1px solid $content-border-color; - @include border-radius(3px); - @include gradient-top-bottom(#e0e3eb, 0, $content-background-color, 100, $content-background-color); -} - -.ac-container > label:hover { - @include gradient-top-bottom(#ffffff, 0, $content-background-color, 100, #ffffff); -} - -.ac-container > input:checked + label { - @include gradient-top-bottom(#ffffff, 0, $content-background-color, 100, #ffffff); - color: #000; -} - -.ac-container > section { - background: $content-background-color; - overflow: hidden; - height: auto; - position: relative; - z-index: 10; - border-left: 1px solid $content-border-color; - border-right: 1px solid $content-border-color; - padding: 10px; -} - -.ac-container > input + label + section { - display: none; -} - - -.ac-container > input:checked + label + section { - display: inherit; + + & > input { + display: none; + + &:checked + label { + @include gradient-top-bottom(#ffffff, 0, $content-background-color, 100, #ffffff); + color: #000; + + & + section { + display: inherit; + } + } + + & + label + section { + display: none; + } + } + + & label { + display: block; + padding: 5px 20px; + position: relative; + z-index: 20; + margin-top: -1px; + cursor: pointer; + color: #777; + font-size: 1em; + border: 1px solid $content-border-color; + @include border-radius(3px); + @include gradient-top-bottom(#e0e3eb, 0, $content-background-color, 100, $content-background-color); + + &:hover { + @include gradient-top-bottom(#ffffff, 0, $content-background-color, 100, #ffffff); + } + } + + & > section { + background: $content-background-color; + overflow: hidden; + height: auto; + position: relative; + z-index: 10; + border-left: 1px solid $content-border-color; + border-right: 1px solid $content-border-color; + padding: 10px; + } } From 55c78a7ea39ccfe6924c226e477701d3481a6771 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:06:54 +0200 Subject: [PATCH 02/14] Optimize scss --- breadcrumb.scss | 116 ++++++++++++++++++++++++------------------------ 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/breadcrumb.scss b/breadcrumb.scss index b2949b6..7b3a912 100644 --- a/breadcrumb.scss +++ b/breadcrumb.scss @@ -4,66 +4,66 @@ list-style: none; overflow: hidden; font-size: 12px; -} -.crumbs-1 li { - background: $content-background-color; - border: 1px solid $content-border-color; - padding: 10px 10px 10px 20px; - position: relative; - display: block; - float: left; - text-shadow: -1px -1px 1px #ffffff; - cursor: pointer; + li { + background: $content-background-color; + border: 1px solid $content-border-color; + padding: 10px 10px 10px 20px; + position: relative; + display: block; + float: left; + text-shadow: -1px -1px 1px #ffffff; + cursor: pointer; - @include box-shadow-out(#ffffff); + @include box-shadow-out(#ffffff); - &:first-child { - @include border-left-radius(3px); + &:first-child { + @include border-left-radius(3px); + } + + &:not(.last):after, &:before { + content:" "; + display: block; + width: 0; + height: 0; + border-top: 18px solid transparent; + border-bottom: 17px solid transparent; + border-left: 14px solid $content-background-color; + position: absolute; + top: 50%; + margin-top: -18px; + left: 100%; + } + + &:not(.last):after { + z-index: 2; + } + + &:before { + border-left-color: $content-border-color; + margin-left: 1px; + z-index: 1; + } + + &.active:not(.last):after, &:hover:not(.last):after { + border-left: 14px solid #ffffff; + } + } + + .last { + padding-right: 20px; + @include border-right-radius(3px); + + &:before { + border: none; + } + } + + .active { + cursor: default; + } + + .active, li:hover { + background: #ffffff; } } - -.crumbs-1 .last { - padding-right: 20px; - @include border-right-radius(3px); -} - -.crumbs-1 li:not(.last):after, .crumbs-1 li:before { - content:" "; - display: block; - width: 0; - height: 0; - border-top: 18px solid transparent; - border-bottom: 17px solid transparent; - border-left: 14px solid $content-background-color; - position: absolute; - top: 50%; - margin-top: -18px; - left: 100%; -} - -.crumbs-1 .last:before { - border: none; -} - -.crumbs-1 li:not(.last):after { - z-index: 2; -} - -.crumbs-1 li:before { - border-left-color: $content-border-color; - margin-left: 1px; - z-index: 1; -} - -.crumbs-1 .active, .crumbs-1 li:hover { - background: #ffffff; -} - -.crumbs-1 .active { - cursor: default; -} - -.crumbs-1 li.active:not(.last):after, .crumbs-1 li:hover:not(.last):after { - border-left: 14px solid #ffffff; -} From e7ff89d44abae930ecfc5c3fec4fb6b9b1d42f75 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:08:54 +0200 Subject: [PATCH 03/14] Optimize scss --- button.scss | 62 ++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/button.scss b/button.scss index f7c794f..04f3e2c 100644 --- a/button.scss +++ b/button.scss @@ -48,40 +48,40 @@ ul.btns { list-style: none; overflow: hidden; font-size: 12px; -} + + li { + background: $content-background-color; + border-left: 1px solid $content-border-color; + border-top: 1px solid $content-border-color; + border-bottom: 1px solid $content-border-color; + float: left; + text-shadow: -1px -1px 1px #ffffff; + cursor: pointer; -ul.btns li { - background: $content-background-color; - border-left: 1px solid $content-border-color; - border-top: 1px solid $content-border-color; - border-bottom: 1px solid $content-border-color; - float: left; - text-shadow: -1px -1px 1px #ffffff; - cursor: pointer; + @include box-shadow-out(#ffffff); - @include box-shadow-out(#ffffff); - - &:last-child { - border-right: 1px solid $content-border-color; + &:last-child { + border-right: 1px solid $content-border-color; + } + + &:before { + border-left-color: $content-border-color; + margin-left: 1px; + } + } + + a { + display: block; + padding: 10px; + } + + .active { + cursor: default; + } + + .active, li:hover { + background: #ffffff; } -} - -ul.btns a { - display: block; - padding: 10px; -} - -ul.btns li:before { - border-left-color: $content-border-color; - margin-left: 1px; -} - -ul.btns .active, ul.btns li:hover { - background: #ffffff; -} - -ul.btns .active { - cursor: default; } button.simple { From 78d53003a33f2a8b2a9006a3fe96c28ad7ff3a13 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:11:41 +0200 Subject: [PATCH 04/14] Optimize scss --- form.scss | 82 +++++++++++++++++++++++++++---------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/form.scss b/form.scss index 1e1d735..510cf5e 100644 --- a/form.scss +++ b/form.scss @@ -1,48 +1,48 @@ @import "_mixins", "_vars"; -form li { - margin: 5px 0 5px 0; -} - -form td { - white-space: nowrap; - padding-bottom: 5px; -} - -form td textarea+i { - vertical-align: top; -} - -form label { - font-size: 0.9em; - color: #878787; - text-shadow: -1px -1px 1px #ffffff; -} - -form i+i { - margin-left: 3px; -} - -form .inputPrefix { - border-left: 1px solid $content-border-color; - border-top: 1px solid $content-border-color; - border-bottom: 1px solid $content-border-color; - line-height: 2em; - height: 100%; - background: #bebebe; -} - -form .layout { - td+td { - padding-left: 5px; +form { + li { + margin: 5px 0 5px 0; } -} - -form .list { - font-size: 0.9em; - + td { white-space: nowrap; - padding: 3px 5px 3px 5px; + padding-bottom: 5px; + + textarea+i { + vertical-align: top; + } + } + + label { + font-size: 0.9em; + color: #878787; + text-shadow: -1px -1px 1px #ffffff; + } + + i+i { + margin-left: 3px; + } + + .inputPrefix { + border-left: 1px solid $content-border-color; + border-top: 1px solid $content-border-color; + border-bottom: 1px solid $content-border-color; + line-height: 2em; + height: 100%; + background: #bebebe; + } + + .layout td+td { + padding-left: 5px; + } + + .list { + font-size: 0.9em; + + td { + white-space: nowrap; + padding: 3px 5px 3px 5px; + } } } From 8f6e960a47ae5bed40f354634e7e94809327a360 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:15:49 +0200 Subject: [PATCH 05/14] Optimize scss --- image.scss | 143 ++++++++++++++++++++++++++++------------------------- 1 file changed, 75 insertions(+), 68 deletions(-) diff --git a/image.scss b/image.scss index 4f5a03e..e888648 100644 --- a/image.scss +++ b/image.scss @@ -1,24 +1,26 @@ @import "_mixins", "_vars"; -img.frame-1 { - padding: 5px; - background: $content-background-color; - border: 1px solid $content-border-color; - @include box-shadow-out(#ffffff); - @include border-radius(3px); -} +img { + &.frame-1 { + padding: 5px; + background: $content-background-color; + border: 1px solid $content-border-color; + @include box-shadow-out(#ffffff); + @include border-radius(3px); + } -img.frame-2 { - border: 1px solid $content-border-color; - background: $content-background-color; -} + &.frame-2 { + border: 1px solid $content-border-color; + background: $content-background-color; + } -img.frame-3 { - padding: 5px; - background: #ffffff; - border: 1px solid $content-border-color; - @include box-shadow-out(#ffffff); - @include border-radius(3px); + &.frame-3 { + padding: 5px; + background: #ffffff; + border: 1px solid $content-border-color; + @include box-shadow-out(#ffffff); + @include border-radius(3px); + } } @keyframes slidy { @@ -33,16 +35,22 @@ img.frame-3 { 100% { left: -400%; } } -div.slider-1 { overflow: hidden; } -div.slider-1 figure img { width: 20%; float: left; } -div.slider-1 figure { - position: relative; - width: 500%; - margin: 0; - left: 0; - text-align: left; - font-size: 0; - animation: 30s slidy infinite; +div.slider-1 { + overflow: hidden; + + figure { + position: relative; + width: 500%; + margin: 0; + left: 0; + text-align: left; + font-size: 0; + animation: 30s slidy infinite; + + img { + width: 20%; float: left; + } + } } .slider-2 { @@ -50,45 +58,44 @@ div.slider-1 figure { position: relative; padding-top: auto; text-align: center; -} - -.slider-2 > img { - width: 100%; - position: absolute; - left: 0; top: 0; - transition: all 0.5s; - box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75); -} - -.slider-2 input { - display: none; -} - -.slider-2 label { - display: inline-block; - margin-top: calc(50% + 15px); - margin-left: 15px; - border: 3px solid #999; - cursor: pointer; - opacity: 0.6; -} - -.slider-2 label img{ - display: block; -} - - -.slider-2 input:checked+label { - border-color: #666; - opacity: 1; -} - -.slider-2 input ~ img { - opacity: 0; - transform: scale(1.1); -} - -.slider-2 input:checked+label+img { - opacity: 1; - transform: scale(1); + + > img { + width: 100%; + position: absolute; + left: 0; top: 0; + transition: all 0.5s; + box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.75); + } + + input { + display: none; + + &:checked+label { + border-color: #666; + opacity: 1; + + +img { + opacity: 1; + transform: scale(1); + } + } + + ~ img { + opacity: 0; + transform: scale(1.1); + } + } + + label { + display: inline-block; + margin-top: calc(50% + 15px); + margin-left: 15px; + border: 3px solid #999; + cursor: pointer; + opacity: 0.6; + + img{ + display: block; + } + } } From fe573732ba4ffe45156d74c4ce002245412e5f9d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:16:37 +0200 Subject: [PATCH 06/14] Remove & --- accordion.scss | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/accordion.scss b/accordion.scss index 971462e..ee3b807 100644 --- a/accordion.scss +++ b/accordion.scss @@ -4,24 +4,24 @@ margin: 10px auto 30px auto; text-align: left; - & > input { + > input { display: none; &:checked + label { @include gradient-top-bottom(#ffffff, 0, $content-background-color, 100, #ffffff); color: #000; - & + section { + + section { display: inherit; } } - & + label + section { + + label + section { display: none; } } - & label { + label { display: block; padding: 5px 20px; position: relative; @@ -39,7 +39,7 @@ } } - & > section { + > section { background: $content-background-color; overflow: hidden; height: auto; From 2419097701103355f159cd78073b52c099418f2d Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:20:02 +0200 Subject: [PATCH 07/14] Optimize scss --- progress.scss | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/progress.scss b/progress.scss index f5e1134..3698015 100644 --- a/progress.scss +++ b/progress.scss @@ -4,19 +4,19 @@ height: 20px; /* Can be anything */ position: relative; background: none !important; -} - -.meter > span { - display: block; - height: 100%; - @include border-radius(3px); - background-color: rgb(43,194,83); - background-image: linear-gradient( - to left top, - color-stop(0, rgb(43,194,83)), - color-stop(1, rgb(84,240,84))); - position: relative; - overflow: hidden; + + > span { + display: block; + height: 100%; + @include border-radius(3px); + background-color: rgb(43,194,83); + background-image: linear-gradient( + to left top, + color-stop(0, rgb(43,194,83)), + color-stop(1, rgb(84,240,84))); + position: relative; + overflow: hidden; + } } .meter > span:after, .animate > span > span { @@ -94,15 +94,15 @@ margin: 0 0 30px 120px; padding-left: 30px; border-left: 3px solid #eaeaea; -} -.timeline li { - margin: 0; - position: relative; -} + li { + margin: 0; + position: relative; + } -.timeline p { - margin: 0 0 15px; + p { + margin: 0 0 15px; + } } .timeline-date { @@ -188,17 +188,17 @@ height: 70px; border-radius: 50%; background-color: tomato; -} - -.progress-radial .overlay { - position: absolute; - width: 60px; - height: 60px; - background-color: #fff; - border-radius: 50%; - margin-left: 5px; - margin-top: 5px; - text-align: center; - line-height: 60px; - font-size: 9px; + + .overlay { + position: absolute; + width: 60px; + height: 60px; + background-color: #fff; + border-radius: 50%; + margin-left: 5px; + margin-top: 5px; + text-align: center; + line-height: 60px; + font-size: 9px; + } } From 783aa292095ede917af5b40f05a0679425d7b918 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:21:53 +0200 Subject: [PATCH 08/14] 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; + } } From a4799ad5dd29a422ef4d4bcb8b071c7c09535581 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:25:35 +0200 Subject: [PATCH 09/14] Optimize scss --- table.scss | 75 +++++++++++++++++------------------------------------- 1 file changed, 24 insertions(+), 51 deletions(-) diff --git a/table.scss b/table.scss index 4181995..649d105 100644 --- a/table.scss +++ b/table.scss @@ -1,70 +1,43 @@ @import "_mixins", "_vars"; -.table.red { +.table { background: none; - caption { - background: #B8312F; color: #fff; } thead { - background: #B8312F; - color: #fff; - } -} - -.table.orange { - background: none; - - caption { - background: #FBA026; color: #fff; } - thead { - background: #FBA026; - color: #fff; - } -} - -.table.green { - background: none; - - caption { - background: #41A85F; - color: #fff; + &.red { + caption, thead { + background: #B8312F; + } } - thead { - background: #41A85F; - color: #fff; - } -} - -.table.blue { - background: none; - - caption { - background: #2C82C9; - color: #fff; + &.orange { + caption, thead { + background: #FBA026; + } } - thead { - background: #2C82C9; - color: #fff; - } -} - -.table.white { - background: none; - - caption { - background: #fff; + &.green { + caption, thead { + background: #41A85F; + } } - thead { - background: #fff; + &.blue { + caption, thead { + background: #2C82C9; + } + } + + &.white { + caption, thead { + background: #fff; + } } } @@ -221,4 +194,4 @@ table.list { .nobreak { white-space: nowrap; -} \ No newline at end of file +} From f5f1ec03fe15aeb9300a5cb86635ec6d401ec1e5 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:26:03 +0200 Subject: [PATCH 10/14] Optimize scss --- text.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/text.scss b/text.scss index 84e6f9e..a880b6e 100644 --- a/text.scss +++ b/text.scss @@ -6,8 +6,8 @@ p { margin: 0; padding: 0; } -} -p+p { - margin-top: 5px; + +p { + margin-top: 5px; + } } From 2140cbd16e437325177cef46623a6cf3e9a8a72e Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:27:19 +0200 Subject: [PATCH 11/14] Optimize scss --- tooltip.scss | 70 ++++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tooltip.scss b/tooltip.scss index b96e208..bebfc7a 100644 --- a/tooltip.scss +++ b/tooltip.scss @@ -4,42 +4,42 @@ position: relative; cursor: pointer; display: inline-block; -} -.tooltip > i { - @include border-radius(3px); - text-align: center; - font-size: 0.7em; - color: #fff; - line-height: 1.0em; - background: #000000; - position: absolute; - padding: 5px; - bottom: 100%; - left: -50%; - margin-bottom: 10px; - visibility: hidden; - opacity: 0; - white-space: pre; -} + > i { + @include border-radius(3px); + text-align: center; + font-size: 0.7em; + color: #fff; + line-height: 1.0em; + background: #000000; + position: absolute; + padding: 5px; + bottom: 100%; + left: -50%; + margin-bottom: 10px; + visibility: hidden; + opacity: 0; + white-space: pre; + } -.tooltip > i:before, .tooltip > i:after { - content: ""; - position: absolute; - border-left: 10px solid transparent; - border-right: 10px solid transparent; - top: 100%; - left: 50%; - margin-left: -10px; -} + > i:before, > i:after { + content: ""; + position: absolute; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + top: 100%; + left: 50%; + margin-left: -10px; + } + + > i:after{ + border-top: 10px solid #000000; + margin-top: 0; + z-index: 1; + } -.tooltip > i:after{ - border-top: 10px solid #000000; - margin-top: 0; - z-index: 1; -} - -.tooltip:hover > i { - visibility: visible; - opacity: 1; + &:hover > i { + visibility: visible; + opacity: 1; + } } From 3cfe9c7a902a31768a30782d1746d2a550ed1bf1 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:28:49 +0200 Subject: [PATCH 12/14] Optimized scss --- list.scss | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/list.scss b/list.scss index 8270b5a..b4d6f2c 100644 --- a/list.scss +++ b/list.scss @@ -17,17 +17,17 @@ ul.boxed { padding: 5px; @include border-radius(3px); border: 1px solid $content-border-color; -} -ul.boxed li { - margin: 5px 0 5px 0; + li { + margin: 5px 0 5px 0; - &:first-child { - margin-top: 0; - } + &:first-child { + margin-top: 0; + } - &:last-child { - margin-bottom: 0; + &:last-child { + margin-bottom: 0; + } } } @@ -42,14 +42,14 @@ ul.h-list li { padding: 0; border-spacing: 0; border-collapse: collapse; -} - -.bullet-list td:first-child { - padding-right: 20px; -} - -.bullet-list span { - margin-right: 5px; + + td:first-child { + padding-right: 20px; + } + + span { + margin-right: 5px; + } } .bullet { @@ -58,8 +58,8 @@ ul.h-list li { border-radius: 30px; background: #ccc; display: inline-block; + + &.active { + background: #000; + } } - -.bullet.active { - background: #000; -} \ No newline at end of file From 648ba00373e4e1c3f51e2de2303ca390a6b4162f Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:42:25 +0200 Subject: [PATCH 13/14] Optimize scss --- alert.scss | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/alert.scss b/alert.scss index a5c1ec7..43ead8c 100644 --- a/alert.scss +++ b/alert.scss @@ -7,26 +7,14 @@ div.alert { } } -.alertbox.ok, .alert.ok { - background: #aaffad; - border: 2px solid #81e27d; - color: #459442; -} - -.alertbox.warning, .alert.warning { - background: #f8ffa8; - border: 2px solid #d6d949; - color: #94972f; -} - -.alertbox.error, .alert.error{ - background: #ff7d79; - border: 2px solid #ee5649; - color: #a5302a; -} - -.alertbox.info, .alert.info{ - background: #b6d2ff; - border: 2px solid #85b0ee; - color: #4865a5; +@each $tuple in + 'ok' #aaffad #81e27d #459442, + 'warning' #f8ffa8 #d6d949 #94972f, + 'error' #ff7d79 #ee5649 #a5302a, + 'info' #b6d2ff #85b0ee #4865a5 { + .alertbox.#{nth($tuple, 1)}, .alert.#{nth($tuple, 1)} { + background: #{nth($tuple, 2)}; + border: 2px solid #{nth($tuple, 3)}; + color: #{nth($tuple, 4)}; + } } From d7bb91b975147fefaaa8c43b9e7f01089100a737 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 13 Jul 2017 15:46:05 +0200 Subject: [PATCH 14/14] Optimize scss --- color.scss | 65 ++++++------------------------------------------------ 1 file changed, 7 insertions(+), 58 deletions(-) diff --git a/color.scss b/color.scss index b30da84..c6e80c2 100644 --- a/color.scss +++ b/color.scss @@ -1,59 +1,8 @@ -.ok { - color: #5cff56; -} - -.warning { - color: #ff4b41; -} - -.favorite { - color: #d16059; -} - -.green { - background: #61BD6D; -} - -.red { - background: #D14841; -} - -.blue { - background: #2C82C9; -} - -.orange { - background: #FBA026; -} - -.lightblue { - background: #54ACD2; -} - -.yellow { - background: #FAC51C; -} - -.purple { - background: #553982; -} - -.pink { - background: #ffa6e3; -} - -.grey { - background: #dcdcdc; -} - -.darkred { - background: #B8312F; -} - -.darkgreen { - background: #41A85F; -} - -.darkblue { - background: #2969B0; +@each $tuple in + 'ok' #5cff56, 'warning' #ff4b41, 'favorite' #d16059, 'green' #61BD6D, 'red' #D14841, 'blue' #2C82C9, + 'orange' #FBA026, 'lightblue' #54ACD2, 'yellow' #FAC51C, 'purple' #553982, 'pink' #ffa6e3, 'grey' #dcdcdc, + 'darkred' #B8312F, 'darkgreen' #41A85F, 'darkblue' #2969B0 { + .#{nth($tuple, 1)} { + background: #{nth($tuple, 2)}; + } }