Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(toolbar): incorrect height for soft-keyboards #3312

Merged
merged 1 commit into from
Feb 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/lib/toolbar/toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ $mat-toolbar-padding: 16px !default;
// Set the default height for the toolbar.
@include mat-toolbar-height($mat-toolbar-height-desktop);

// Specific height for mobile devices in portrait mode.
@media ($mat-xsmall) and (orientation: portrait) {
// As per specs, mobile devices will use a different height for toolbars than for desktop.
// The height for mobile landscape devices has been ignored since relying on `@media orientation`
// is causing issues on devices with a soft-keyboard.
// See: https://material.io/guidelines/layout/structure.html#structure-app-bar
@media ($mat-xsmall) {
@include mat-toolbar-height($mat-toolbar-height-mobile-portrait);
}

// Specific height for mobile devices in landscape mode.
@media ($mat-small) and (orientation: landscape) {
@include mat-toolbar-height($mat-toolbar-height-mobile-landscape);
}