-
Notifications
You must be signed in to change notification settings - Fork 6.7k
/
expansion-panel-header.scss
100 lines (86 loc) · 2.08 KB
/
expansion-panel-header.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
@use '../core/style/layout-common';
@use '../../cdk/a11y';
@use './expansion-variables';
@use './expansion-mixins';
.mat-expansion-panel-header {
display: flex;
flex-direction: row;
align-items: center;
padding: 0 24px;
border-radius: inherit;
transition: height expansion-variables.$header-transition;
// If the `NoopAnimationsModule` is used, disable the height transition.
&._mat-animation-noopable {
transition: none;
}
&:focus,
&:hover {
outline: none;
}
&.mat-expanded:focus,
&.mat-expanded:hover {
background: inherit;
}
&:not([aria-disabled='true']) {
cursor: pointer;
}
&.mat-expansion-toggle-indicator-before {
flex-direction: row-reverse;
.mat-expansion-indicator {
margin: 0 16px 0 0;
[dir='rtl'] & {
margin: 0 0 0 16px;
}
}
}
}
.mat-content {
display: flex;
flex: 1;
flex-direction: row;
overflow: hidden;
}
.mat-expansion-panel-header-title,
.mat-expansion-panel-header-description {
display: flex;
flex-grow: 1;
margin-right: 16px;
[dir='rtl'] & {
margin-right: 0;
margin-left: 16px;
}
}
.mat-expansion-panel-header-description {
flex-grow: 2;
}
// Creates the expansion indicator arrow. Done using ::after
// rather than havingadditional nodes in the template.
.mat-expansion-indicator::after {
border-style: solid;
border-width: 0 2px 2px 0;
content: '';
display: inline-block;
padding: 3px;
transform: rotate(45deg);
vertical-align: middle;
}
@include a11y.high-contrast(active, off) {
@include expansion-mixins.private-expansion-focus {
&::before {
// These styles are identical to the ones generated for all
// `.mat-focus-indicator` when strong focus indication is enabled.
// We have to repeat them, because strong focus is opt-in.
@include layout-common.fill();
box-sizing: border-box;
pointer-events: none;
border: 3px solid;
border-radius: 4px;
content: '';
}
}
.mat-expansion-panel-content {
border-top: 1px solid;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
}