Skip to content

chore(toolbar): deprecate unused landscape row-height variable #12129

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

Merged
merged 1 commit into from
Jul 11, 2018
Merged
Show file tree
Hide file tree
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
15 changes: 9 additions & 6 deletions src/lib/toolbar/toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
@import '../../cdk/a11y/a11y';

$mat-toolbar-height-desktop: 64px !default;
$mat-toolbar-height-mobile: 56px !default;
$mat-toolbar-row-padding: 16px !default;

/** @deprecated @deletion-target 8.0.0 */
$mat-toolbar-height-mobile-portrait: 56px !default;
/** @deprecated @deletion-target 8.0.0 */
$mat-toolbar-height-mobile-landscape: 48px !default;

$mat-toolbar-row-padding: 16px !default;


@mixin mat-toolbar-height($height) {
Expand Down Expand Up @@ -49,10 +53,9 @@ $mat-toolbar-row-padding: 16px !default;
// Set the default height for the toolbar.
@include mat-toolbar-height($mat-toolbar-height-desktop);

// 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
// As per specs, toolbars should have a different height in mobile devices. This has been
// specified in the old guidelines and is still observable in the new specifications by looking at
// the spec images. See: https://material.io/design/components/app-bars-top.html#anatomy
@media ($mat-xsmall) {
@include mat-toolbar-height($mat-toolbar-height-mobile-portrait);
@include mat-toolbar-height($mat-toolbar-height-mobile);
}
4 changes: 2 additions & 2 deletions src/lib/toolbar/toolbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export class MatToolbarRow {}
inputs: ['color'],
host: {
'class': 'mat-toolbar',
'[class.mat-toolbar-multiple-rows]': 'this._toolbarRows.length',
'[class.mat-toolbar-single-row]': '!this._toolbarRows.length'
'[class.mat-toolbar-multiple-rows]': '_toolbarRows.length > 0',
'[class.mat-toolbar-single-row]': '_toolbarRows.length === 0',
},
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
Expand Down