Skip to content

Commit ceb2051

Browse files
crisbetommalerba
authored andcommitted
feat(bottom-sheet): align with 2018 material design spec (#12625)
Aligns the bottom sheet component with the most-recent Material Design spec.
1 parent 009f211 commit ceb2051

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313

1414
@mixin mat-bottom-sheet-typography($config) {
1515
.mat-bottom-sheet-container {
16-
// Note: we don't use the line-height, because it's way too big.
17-
font-family: mat-font-family($config);
18-
font-size: mat-font-size($config, subheading-2);
19-
font-weight: mat-font-weight($config, subheading-2);
16+
@include mat-typography-level-to-styles($config, body-1);
2017
}
2118
}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,26 @@ $mat-bottom-sheet-container-horizontal-padding: 16px !default;
2525
}
2626
}
2727

28+
// Applies a border radius to the bottom sheet. Should only be applied when it's not full-screen.
29+
%_mat-bottom-sheet-container-border-radius {
30+
border-top-left-radius: 4px;
31+
border-top-right-radius: 4px;
32+
}
33+
2834
.mat-bottom-sheet-container-medium {
35+
@extend %_mat-bottom-sheet-container-border-radius;
2936
min-width: $_mat-bottom-sheet-width-increment * 6;
3037
max-width: calc(100vw - #{$_mat-bottom-sheet-width-increment * 2});
3138
}
3239

3340
.mat-bottom-sheet-container-large {
41+
@extend %_mat-bottom-sheet-container-border-radius;
3442
min-width: $_mat-bottom-sheet-width-increment * 8;
3543
max-width: calc(100vw - #{$_mat-bottom-sheet-width-increment * 4});
3644
}
3745

3846
.mat-bottom-sheet-container-xlarge {
47+
@extend %_mat-bottom-sheet-container-border-radius;
3948
min-width: $_mat-bottom-sheet-width-increment * 9;
4049
max-width: calc(100vw - #{$_mat-bottom-sheet-width-increment * 6});
4150
}

0 commit comments

Comments
 (0)