Skip to content

Commit 27794d9

Browse files
committed
feat(design)!: remove default theme variables from scss 'theme' export
BREAKING CHANGE: `@daffodil/design/scss/theme` no longer forwards the default theme variables. `$theme`, `$theme-dark`, `$primary`, `$secondary`, `$tertiary`, `$primary-dark`, `$secondary-dark`, and `$tertiary-dark` now come from the new `@daffodil/design/scss/theme/default` export, so `@use '@daffodil/design/scss/theme/default' as daff-default-theme;` and read them from there (`daff-theme.$theme` -> `daff-default-theme.$theme`).
1 parent 8abb095 commit 27794d9

2 files changed

Lines changed: 13 additions & 14 deletions

File tree

libs/design/button/src/button/raised/raised-theme.scss

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@use '../../../../scss/theming' as *;
22

3-
@mixin daff-raised-button-theme-variant($base-color) {
3+
@mixin daff-raised-button-theme-variant($theme, $base-color) {
44
@if daff-contrast-ratio($base-color, daff-text-contrast($base-color)) < 4.5 {
55
@error 'Button Initial State: ' + map.get(a11y.$wcag-aa-errors, 'text-contrast');
66
}
@@ -37,39 +37,39 @@
3737
$neutral: daff-get-palette($theme, neutral);
3838

3939
.daff-raised-button {
40-
@include daff-raised-button-theme-variant(daff-color($neutral, 20));
40+
@include daff-raised-button-theme-variant($theme, daff-color($neutral, 20));
4141

4242
&.daff-primary {
43-
@include daff-raised-button-theme-variant(daff-color($primary));
43+
@include daff-raised-button-theme-variant($theme, daff-color($primary));
4444
}
4545

4646
&.daff-secondary {
47-
@include daff-raised-button-theme-variant(daff-color($secondary));
47+
@include daff-raised-button-theme-variant($theme, daff-color($secondary));
4848
}
4949

5050
&.daff-tertiary {
51-
@include daff-raised-button-theme-variant(daff-color($tertiary));
51+
@include daff-raised-button-theme-variant($theme, daff-color($tertiary));
5252
}
5353

5454
&.daff-dark {
55-
@include daff-raised-button-theme-variant($black);
55+
@include daff-raised-button-theme-variant($theme, $black);
5656
}
5757

5858
&.daff-light {
59-
@include daff-raised-button-theme-variant($white);
59+
@include daff-raised-button-theme-variant($theme, $white);
6060
}
6161

6262
&.daff-theme {
63-
@include daff-raised-button-theme-variant($base);
63+
@include daff-raised-button-theme-variant($theme, $base);
6464
}
6565

6666
&.daff-theme-contrast {
67-
@include daff-raised-button-theme-variant($base-contrast);
67+
@include daff-raised-button-theme-variant($theme, $base-contrast);
6868
}
6969

7070
&[disabled],
7171
&.daff-disabled {
72-
@include daff-raised-button-theme-variant(daff-color($neutral, 30));
72+
@include daff-raised-button-theme-variant($theme, daff-color($neutral, 30));
7373
color: daff-color($neutral, 50);
7474

7575
&::after {
@@ -78,15 +78,15 @@
7878
}
7979

8080
&.daff-warn {
81-
@include daff-raised-button-theme-variant(daff-color($warn));
81+
@include daff-raised-button-theme-variant($theme, daff-color($warn));
8282
}
8383

8484
&.daff-critical {
85-
@include daff-raised-button-theme-variant(daff-color($critical));
85+
@include daff-raised-button-theme-variant($theme, daff-color($critical));
8686
}
8787

8888
&.daff-success {
89-
@include daff-raised-button-theme-variant(daff-color($success));
89+
@include daff-raised-button-theme-variant($theme, daff-color($success));
9090
}
9191
}
9292
}

libs/design/scss/theming/_index.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
@forward 'configure-palette';
66
@forward 'create-theme/create-theme';
77
@forward 'light-dark';
8-
@forward './default/index';
98
@forward 'get-palette';
109
@forward 'get-base-color';
1110
@forward 'get-theme-mode';

0 commit comments

Comments
 (0)