-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.css
228 lines (218 loc) · 4.37 KB
/
options.css
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/* Copyright 2018 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
/** Body modifier class, indicates when options should be visible. */
.show-options {
grid-template-columns: auto 256px;
}
.show-options .options {
display: block;
}
/** Black overlay shown on smaller screens when options is visible. */
.scrim {
z-index: 5; /* Side panel layer */
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 256px;
background: #00000050;
}
/** Options side panel */
.options {
z-index: 5; /* Side panel layer */
display: none;
grid-area: options;
padding: 0 16px;
overflow-y: auto;
position: fixed;
right: 0;
top: 0;
height: 100vh;
width: 224px;
background: #fffffff5;
box-shadow: 0 1px 2px #3c40434d, 0 2px 6px 2px #3c404326;
}
fieldset {
border: 0;
padding: 0;
margin: 2em 0 1em;
}
.options fieldset:first-of-type {
margin-top: 1em;
}
legend {
margin: 1em 0;
padding: 0;
}
/** Toolbar */
.form-bar {
display: flex;
justify-content: flex-end;
height: 64px;
align-items: center;
}
/** Buttons */
.icon-button {
height: 40px;
width: 40px;
cursor: pointer;
background: transparent;
border: 0;
border-radius: 50%;
}
.icon-button:hover {
background: #0000001f;
}
/** <input type='text'> or <select> elements */
.input-wrapper,
.select-wrapper {
position: relative;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
background: rgba(0, 0, 0, 0.04);
margin-bottom: 1em;
}
input[type='text'],
input[type='number'],
select {
box-sizing: border-box;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
font: inherit;
background: transparent;
border: 0;
padding: 20px 12px 13px;
width: 100%;
caret-color: #1a73e8;
}
.input-label,
.select-label {
position: absolute;
z-index: -1;
top: 0;
bottom: -1px;
left: 0;
right: 0;
font-size: 12px;
line-height: 20px;
padding: 0 12px;
color: #5f6368;
border-bottom: 1px solid currentColor;
}
.select-label::after {
content: '';
position: absolute;
top: calc(50% - 5px);
right: 4px;
margin: 5px 7px 5px 8px;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: currentColor transparent transparent transparent;
transition: transform 0.2s ease-out;
}
input[type='text']:focus + .input-label,
input[type='number']:focus + .input-label,
select:focus + .select-label {
color: #1a73e8;
bottom: -2px;
border-width: 2px;
}
select:focus + .select-label::after {
transform: rotate(180deg);
}
/** <input type='checkbox' or 'radio'> elements */
input[type='checkbox'],
input[type='radio'] {
position: absolute;
margin: 0;
height: 18px;
width: 18px;
opacity: 0;
}
.checkbox-wrapper,
.radio-wrapper {
position: relative;
}
.checkbox-label,
.radio-label {
display: block;
position: relative;
padding-left: 34px;
margin: 4px 0;
cursor: pointer;
font-size: 14px;
}
.checkbox-label::before,
.checkbox-label::after,
.radio-label::before,
.radio-label::after {
position: absolute;
content: '';
border: 2px solid currentColor;
}
.checkbox-label::before,
.radio-label::before {
width: 14px;
height: 14px;
border-radius: 2px;
left: 0;
}
.checkbox-label::after {
opacity: 0;
width: 4px;
height: 9px;
left: 6px;
top: 2px;
border-top-width: 0;
border-left-width: 0;
transform: rotate(45deg);
opacity: 0;
}
.radio-label::before {
border-radius: 50%;
}
.radio-label::after {
opacity: 0;
width: 4px;
height: 4px;
left: 5px;
top: 5px;
background: currentColor;
border-radius: 50%;
}
input[type='checkbox']:checked + .checkbox-label,
input[type='radio']:checked + .radio-label {
color: #1a73e8;
}
input[type='checkbox']:checked + .checkbox-label::after,
input[type='radio']:checked + .radio-label::after {
opacity: 1;
}
input[type='checkbox']:disabled + .checkbox-label,
input[type='radio']:disabled + .radio-label {
color: #80868b;
}
input[type='checkbox']:focus + .checkbox-label,
input[type='radio']:focus + .radio-label {
outline: #2e3436 dotted 1px;
outline: -webkit-focus-ring-color auto 5px;
}
/** Tweaks for smaller screen sizes */
@media (max-width: 700px) {
.show-options {
grid-template-columns: auto 0;
}
.show-options .scrim {
display: block;
}
.appbar,
.symbols {
padding: 0 16px;
}
.appbar-progress {
margin: 0 -16px;
width: calc(100% + 32px);
}
}