Skip to content

Commit

Permalink
fix(styles): don't import and use carbon themes in styles.scss
Browse files Browse the repository at this point in the history
  • Loading branch information
cal-smith committed Jan 31, 2020
1 parent c880bd2 commit 1da8b3e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/core/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/styles/base-theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Carbon theme initializations
@import "./vendor/@carbon/themes/scss/themes";
@include carbon--theme();

@import "./styles.scss";
2 changes: 1 addition & 1 deletion packages/core/src/styles/styles-g10.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./vendor/@carbon/themes/scss/themes";

$carbon--theme: $carbon--theme--g10;
@import "./styles";
@import "./base-theme";
2 changes: 1 addition & 1 deletion packages/core/src/styles/styles-g100.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./vendor/@carbon/themes/scss/themes";

$carbon--theme: $carbon--theme--g100;
@import "./styles";
@import "./base-theme";
2 changes: 1 addition & 1 deletion packages/core/src/styles/styles-g90.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "./vendor/@carbon/themes/scss/themes";

$carbon--theme: $carbon--theme--g90;
@import "./styles";
@import "./base-theme";
3 changes: 0 additions & 3 deletions packages/core/src/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 1da8b3e

Please sign in to comment.