Skip to content

Commit 59443e8

Browse files
mmalerbazarend
authored andcommitted
fix(material/bottom-sheet): move unthemable tokens to theme mixin (#27882)
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 7ac2686 commit 59443e8

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/material/_index.scss

Lines changed: 1 addition & 1 deletion
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,

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)