-
Notifications
You must be signed in to change notification settings - Fork 6.8k
/
Copy pathtoolbar.scss
51 lines (40 loc) · 1.36 KB
/
toolbar.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@import '../core/style/variables';
$mat-toolbar-height-desktop: 64px !default;
$mat-toolbar-height-mobile-portrait: 56px !default;
$mat-toolbar-height-mobile-landscape: 48px !default;
$mat-toolbar-padding: 16px !default;
@mixin mat-toolbar-height($height) {
.mat-toolbar {
min-height: $height;
}
.mat-toolbar-row {
height: $height;
}
}
.mat-toolbar {
display: flex;
box-sizing: border-box;
width: 100%;
padding: 0 $mat-toolbar-padding;
flex-direction: column;
.mat-toolbar-row {
display: flex;
box-sizing: border-box;
width: 100%;
// Flexbox Vertical Alignment
flex-direction: row;
align-items: center;
// Per Material specs a toolbar cannot have multiple lines inside of a single row.
// Disable text wrapping inside of the toolbar. Developers are still able to overwrite it.
white-space: nowrap;
}
}
// 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
@media ($mat-xsmall) {
@include mat-toolbar-height($mat-toolbar-height-mobile-portrait);
}