-
Notifications
You must be signed in to change notification settings - Fork 975
/
theme.scss
144 lines (137 loc) · 3.18 KB
/
theme.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
@import "../colors";
@import "../globals";
@import "../mixins";
@import "./config";
$input-padding: 2 * $unit;
$input-field-font-size: 1.6 * $unit;
$input-field-padding: .8 * $unit;
$input-field-height: $input-field-padding * 2 + $input-field-font-size * 1.4;
$input-chevron-offset: 0.8 * $unit;
$input-text-bottom-border-color: rgba($color-black, 0.12);
$input-text-error-color: rgb(222, 50, 38);
$input-text-background-color: transparent;
$input-focus-label-top: 0.6 * $unit;
$input-label-font-size: 1.2 * $unit;
$input-focus-label-top: 0.6 * $unit;
$input-text-label-color: rgba($color-black, 0.26);
$input-underline-height: 2 * $unit;
.dropdown {
position: relative;
&:not(.active) {
> .values {
max-height: 0;
visibility: hidden;
}
}
&.active {
> .label, > .value {
opacity: .5;
}
> .values {
max-height: $dropdown-overflow-max-height;
visibility: visible;
box-shadow: $zdepth-shadow-1;
}
}
&:not(.up) > .values {
top: 0;
bottom: auto;
}
&.up > .values {
top: auto;
bottom: 0;
}
&.disabled {
pointer-events: none;
cursor: normal;
}
}
.value {
> input {
cursor: pointer;
}
&:after {
$size: ($input-field-height / 7);
$border: $size solid transparent;
position: absolute;
top: 50%;
right: $input-chevron-offset;
width: 0;
height: 0;
pointer-events: none;
content: "";
border-top: $size solid $input-text-bottom-border-color;
border-right: $border;
border-left: $border;
transition: transform $animation-duration $animation-curve-default;
}
}
.field {
position: relative;
padding: $input-padding 0;
cursor: pointer;
&.errored {
padding-bottom: 0;
> .label {
color: $input-text-error-color;
}
> .templateValue {
border-bottom: 1px solid $input-text-error-color;
}
}
&.disabled {
pointer-events: none;
cursor: normal;
> .templateValue {
border-bottom-style: dotted;
opacity: .7;
}
}
}
.templateValue {
position: relative;
min-height: $input-field-height;
padding: $input-field-padding 0;
color: $color-text;
background-color: $input-text-background-color;
border-bottom: 1px solid $input-text-bottom-border-color;
}
.label {
position: absolute;
top: $input-focus-label-top;
left: 0;
font-size: $input-label-font-size;
line-height: $input-field-font-size;
color: $input-text-label-color;
}
.error {
margin-bottom: - $input-underline-height;
font-size: $input-label-font-size;
line-height: $input-underline-height;
color: $input-text-error-color;
}
.values {
@include no-webkit-scrollbar;
position: absolute;
z-index: $z-index-high;
width: 100%;
overflow-y: auto;
list-style: none;
background-color: $dropdown-color-white;
border-radius: $dropdown-value-border-radius;
transition-timing-function: $animation-curve-default;
transition-duration: $animation-duration;
transition-property: max-height, box-shadow;
> * {
position: relative;
padding: $unit;
overflow: hidden;
cursor: pointer;
&:hover {
background-color: $dropdown-value-hover-background;
}
&.selected {
color: $dropdown-color-primary;
}
}
}