-
Notifications
You must be signed in to change notification settings - Fork 943
/
Copy path_shared.scss
102 lines (86 loc) · 1.69 KB
/
_shared.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
101
102
//
// Copyright 2023 Google LLC
// SPDX-License-Identifier: Apache-2.0
//
// go/keep-sorted start
@use 'sass:list';
@use 'sass:map';
@use 'sass:string';
// go/keep-sorted end
// go/keep-sorted start
@use '../../elevation/internal/elevation';
@use '../../tokens';
// go/keep-sorted end
@mixin styles() {
:host {
color: unset;
min-width: 210px;
display: flex;
}
.field {
cursor: default;
outline: none;
}
.select {
position: relative;
flex-direction: column;
}
.icon.trailing svg,
.icon ::slotted(*) {
fill: currentColor;
}
.icon ::slotted(*) {
width: inherit;
height: inherit;
font-size: inherit;
}
.icon slot {
display: flex;
height: 100%;
width: 100%;
align-items: center;
justify-content: center;
}
.icon.trailing :is(.up, .down) {
opacity: 0;
/* 75 ms is half of min(animate open duration, animate closed duration)*/
transition: opacity 75ms linear 75ms;
}
.select:not(.open) .down,
.select.open .up {
opacity: 1;
}
.field,
.select,
md-menu {
min-width: inherit;
width: inherit;
max-width: inherit;
display: flex;
}
md-menu {
// Not inherited because it is applied every time the menu opens
min-width: var(--__menu-min-width);
// Inherits from `.menu-wrapper` because it is applied only when
// `clampMenuWidth` is true
max-width: var(--__menu-max-width, inherit);
}
.menu-wrapper {
width: 0px;
height: 0px;
max-width: inherit;
}
md-menu ::slotted(:not(:disabled)) {
cursor: pointer;
}
.field,
.select {
width: 100%;
}
:host {
display: inline-flex;
}
:host(:disabled) {
pointer-events: none;
}
}