Skip to content

Commit 0c9ff0d

Browse files
committed
fix(material/bottom-sheet): move unthemable tokens to theme mixin
Though these tokens are not currently affected by the theme, in the future they will be affected by the design system used for theming (M2 or M3) BREAKING CHANGE: There are new styles emitted by mat.bottom-sheet-theme that are not emitted by any of: mat.bottom-sheet-color, mat.bottom-sheet-typography, mat.bottom-sheet-density. If you rely on the partial mixins only and don't call mat.bottom-sheet-theme, you can add mat.bottom-sheet-base to get the missing styles.
1 parent af18402 commit 0c9ff0d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/material/_index.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
@forward './badge/badge-theme' as badge-* show badge-theme, badge-color, badge-typography,
7070
badge-density, badge-base;
7171
@forward './bottom-sheet/bottom-sheet-theme' as bottom-sheet-* show bottom-sheet-theme,
72-
bottom-sheet-color, bottom-sheet-typography, bottom-sheet-density;
72+
bottom-sheet-color, bottom-sheet-typography, bottom-sheet-density, bottom-sheet-base;
7373
@forward './button/button-theme' as button-* show button-theme, button-color, button-typography,
7474
button-density;
7575
@forward './button/fab-theme' as fab-* show fab-color, fab-typography,
@@ -103,7 +103,8 @@
103103
input-density, input-base;
104104
@forward './list/list-theme' as list-* show list-theme, list-color, list-typography,
105105
list-density, list-base;
106-
@forward './menu/menu-theme' as menu-* show menu-theme, menu-color, menu-typography, menu-density, menu-base;
106+
@forward './menu/menu-theme' as menu-* show menu-theme, menu-color, menu-typography, menu-density,
107+
menu-base;
107108
@forward './paginator/paginator-theme' as paginator-* show paginator-theme, paginator-color,
108109
paginator-typography, paginator-density, paginator-base;
109110
@forward './progress-bar/progress-bar-theme' as progress-bar-* show

src/material/bottom-sheet/_bottom-sheet-theme.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
@use '../core/tokens/token-utils';
66
@use '../core/tokens/m2/mat/bottom-sheet' as tokens-mat-bottom-sheet;
77

8+
@mixin base($theme) {
9+
@include sass-utils.current-selector-or-root() {
10+
@include token-utils.create-token-values(
11+
tokens-mat-bottom-sheet.$prefix, tokens-mat-bottom-sheet.get-unthemable-tokens());
12+
}
13+
}
14+
815
@mixin color($theme) {
916
@include sass-utils.current-selector-or-root() {
1017
@include token-utils.create-token-values(tokens-mat-bottom-sheet.$prefix,
@@ -23,6 +30,7 @@
2330

2431
@mixin theme($theme) {
2532
@include theming.private-check-duplicate-theme-styles($theme, 'mat-bottom-sheet') {
33+
@include base($theme);
2634
@if inspection.theme-has($theme, color) {
2735
@include color($theme);
2836
}

src/material/bottom-sheet/bottom-sheet-container.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ $container-vertical-padding: 8px !default;
1111
$container-horizontal-padding: 16px !default;
1212

1313
.mat-bottom-sheet-container {
14-
@include token-utils.create-token-values(
15-
tokens-mat-bottom-sheet.$prefix, tokens-mat-bottom-sheet.get-unthemable-tokens());
1614
@include elevation.elevation(16);
1715
padding: $container-vertical-padding
1816
$container-horizontal-padding;

0 commit comments

Comments
 (0)