From 1da8b3e2ba770c06dc74fe2bf08393e3d6b6778c Mon Sep 17 00:00:00 2001 From: Cal Smith Date: Fri, 31 Jan 2020 12:40:20 -0500 Subject: [PATCH] fix(styles): don't import and use carbon themes in styles.scss --- packages/core/build.sh | 4 ++-- packages/core/src/styles/base-theme.scss | 5 +++++ packages/core/src/styles/styles-g10.scss | 2 +- packages/core/src/styles/styles-g100.scss | 2 +- packages/core/src/styles/styles-g90.scss | 2 +- packages/core/src/styles/styles.scss | 3 --- 6 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 packages/core/src/styles/base-theme.scss diff --git a/packages/core/build.sh b/packages/core/build.sh index 0b1056ec4c..1fd4de89a4 100644 --- a/packages/core/build.sh +++ b/packages/core/build.sh @@ -8,8 +8,8 @@ cp *.md dist/ cp package.json dist/ cp -a src/styles/. dist/styles -sass --load-path ../../node_modules dist/styles/styles.scss dist/styles.css -sass --load-path ../../node_modules dist/styles/styles.scss dist/styles.min.css --style=compressed +sass --load-path ../../node_modules dist/styles/base-theme.scss dist/styles.css +sass --load-path ../../node_modules dist/styles/base-theme.scss dist/styles.min.css --style=compressed sass --load-path ../../node_modules dist/styles/styles-g10.scss dist/styles-g10.css sass --load-path ../../node_modules dist/styles/styles-g10.scss dist/styles-g10.min.css --style=compressed diff --git a/packages/core/src/styles/base-theme.scss b/packages/core/src/styles/base-theme.scss new file mode 100644 index 0000000000..6d1e2bcb66 --- /dev/null +++ b/packages/core/src/styles/base-theme.scss @@ -0,0 +1,5 @@ +// Carbon theme initializations +@import "./vendor/@carbon/themes/scss/themes"; +@include carbon--theme(); + +@import "./styles.scss"; diff --git a/packages/core/src/styles/styles-g10.scss b/packages/core/src/styles/styles-g10.scss index 0e1a0cf95c..cabfe576e3 100644 --- a/packages/core/src/styles/styles-g10.scss +++ b/packages/core/src/styles/styles-g10.scss @@ -1,4 +1,4 @@ @import "./vendor/@carbon/themes/scss/themes"; $carbon--theme: $carbon--theme--g10; -@import "./styles"; +@import "./base-theme"; diff --git a/packages/core/src/styles/styles-g100.scss b/packages/core/src/styles/styles-g100.scss index 78b9f4cc2b..ce6b79c698 100644 --- a/packages/core/src/styles/styles-g100.scss +++ b/packages/core/src/styles/styles-g100.scss @@ -1,4 +1,4 @@ @import "./vendor/@carbon/themes/scss/themes"; $carbon--theme: $carbon--theme--g100; -@import "./styles"; +@import "./base-theme"; diff --git a/packages/core/src/styles/styles-g90.scss b/packages/core/src/styles/styles-g90.scss index c06e80f80e..c34ed73fb6 100644 --- a/packages/core/src/styles/styles-g90.scss +++ b/packages/core/src/styles/styles-g90.scss @@ -1,4 +1,4 @@ @import "./vendor/@carbon/themes/scss/themes"; $carbon--theme: $carbon--theme--g90; -@import "./styles"; +@import "./base-theme"; diff --git a/packages/core/src/styles/styles.scss b/packages/core/src/styles/styles.scss index dd816bc51e..d6557d3bce 100644 --- a/packages/core/src/styles/styles.scss +++ b/packages/core/src/styles/styles.scss @@ -3,9 +3,6 @@ $charts-prefix: "cc"; // Carbon imports @import "./vendor/@carbon/colors/scss/colors"; -// Carbon theme initializations -@import "./vendor/@carbon/themes/scss/themes"; -@include carbon--theme(); // Internal @import "./mixins.scss";