From d477889ce25fd98ff6093f53e82c1a6412080af9 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 11 Jul 2018 09:38:14 +0300 Subject: [PATCH] Fix scss imports to avoid duplicate output --- plop-templates/component.scss | 2 +- src/assets/scss/_globals.scss | 7 +++++++ src/assets/scss/{normalize.css => _normalize.scss} | 6 +++--- src/components/Button/Button.scss | 2 +- src/components/Card/Card.scss | 2 +- src/components/Footer/Footer.scss | 2 +- src/components/Navigation/Navigation.scss | 2 +- src/index.scss | 10 +--------- 8 files changed, 16 insertions(+), 17 deletions(-) create mode 100644 src/assets/scss/_globals.scss rename src/assets/scss/{normalize.css => _normalize.scss} (98%) diff --git a/plop-templates/component.scss b/plop-templates/component.scss index b6a03ed..127418e 100644 --- a/plop-templates/component.scss +++ b/plop-templates/component.scss @@ -1,4 +1,4 @@ -@import "../../index.scss"; +@import "../../assets/scss/globals"; .{{ dashCase name }} { diff --git a/src/assets/scss/_globals.scss b/src/assets/scss/_globals.scss new file mode 100644 index 0000000..9bedffb --- /dev/null +++ b/src/assets/scss/_globals.scss @@ -0,0 +1,7 @@ +$white: #fff; +$off-white: #f4f7fc; +$light-blue: #e4ecfa; +$blue: #2f6c76; +$dark-blue: #193b41; + +$font-helvetica: helvetica, arial, sans-serif; diff --git a/src/assets/scss/normalize.css b/src/assets/scss/_normalize.scss similarity index 98% rename from src/assets/scss/normalize.css rename to src/assets/scss/_normalize.scss index 3d6624c..6141a86 100644 --- a/src/assets/scss/normalize.css +++ b/src/assets/scss/_normalize.scss @@ -54,7 +54,7 @@ hr { */ pre { - font-family: monospace, monospace; /* 1 */ + font-family: monospace; /* 1 */ font-size: 1em; /* 2 */ } @@ -97,7 +97,7 @@ strong { code, kbd, samp { - font-family: monospace, monospace; /* 1 */ + font-family: monospace; /* 1 */ font-size: 1em; /* 2 */ } @@ -338,4 +338,4 @@ template { [hidden] { display: none; -} \ No newline at end of file +} diff --git a/src/components/Button/Button.scss b/src/components/Button/Button.scss index 91d469c..8b71216 100644 --- a/src/components/Button/Button.scss +++ b/src/components/Button/Button.scss @@ -1,4 +1,4 @@ -@import "../../index.scss"; +@import "../../assets/scss/globals"; .button { -webkit-appearance: none; diff --git a/src/components/Card/Card.scss b/src/components/Card/Card.scss index ae1b620..0623ffd 100644 --- a/src/components/Card/Card.scss +++ b/src/components/Card/Card.scss @@ -1,4 +1,4 @@ -@import "../../index.scss"; +@import "../../assets/scss/globals"; .card { background-color: $white; diff --git a/src/components/Footer/Footer.scss b/src/components/Footer/Footer.scss index 84047fe..d5f85ec 100644 --- a/src/components/Footer/Footer.scss +++ b/src/components/Footer/Footer.scss @@ -1,4 +1,4 @@ -@import "../../index.scss"; +@import "../../assets/scss/globals"; .footer { width: 100%; diff --git a/src/components/Navigation/Navigation.scss b/src/components/Navigation/Navigation.scss index f55be75..0ba224e 100644 --- a/src/components/Navigation/Navigation.scss +++ b/src/components/Navigation/Navigation.scss @@ -1,4 +1,4 @@ -@import "../../index.scss"; +@import "../../assets/scss/globals"; $border-width: 4px; .navigation { diff --git a/src/index.scss b/src/index.scss index 48a44be..2fc91f6 100644 --- a/src/index.scss +++ b/src/index.scss @@ -1,12 +1,4 @@ -@import "{}/src/assets/scss/normalize.css"; - -$white: #fff; -$off-white: #f4f7fc; -$light-blue: #e4ecfa; -$blue: #2f6c76; -$dark-blue: #193b41; - -$font-helvetica: helvetica, arial, sans-serif; +@import "./assets/scss/globals"; html, body {