Skip to content

Commit

Permalink
feat(bottom-sheet): align with 2018 material design spec (#12625)
Browse files Browse the repository at this point in the history
Aligns the bottom sheet component with the most-recent Material Design spec.
  • Loading branch information
crisbeto authored and mmalerba committed Aug 16, 2018
1 parent 009f211 commit ceb2051
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib/bottom-sheet/_bottom-sheet-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@

@mixin mat-bottom-sheet-typography($config) {
.mat-bottom-sheet-container {
// Note: we don't use the line-height, because it's way too big.
font-family: mat-font-family($config);
font-size: mat-font-size($config, subheading-2);
font-weight: mat-font-weight($config, subheading-2);
@include mat-typography-level-to-styles($config, body-1);
}
}
9 changes: 9 additions & 0 deletions src/lib/bottom-sheet/bottom-sheet-container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,26 @@ $mat-bottom-sheet-container-horizontal-padding: 16px !default;
}
}

// Applies a border radius to the bottom sheet. Should only be applied when it's not full-screen.
%_mat-bottom-sheet-container-border-radius {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}

.mat-bottom-sheet-container-medium {
@extend %_mat-bottom-sheet-container-border-radius;
min-width: $_mat-bottom-sheet-width-increment * 6;
max-width: calc(100vw - #{$_mat-bottom-sheet-width-increment * 2});
}

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

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

0 comments on commit ceb2051

Please sign in to comment.