-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.css
216 lines (205 loc) · 4.16 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
/* 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 {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 256px;
background: #00000050;
}
/** Options side panel */
.options {
display: none;
grid-area: options;
padding: 0 16px;
position: fixed;
right: 0;
top: 0;
height: 100vh;
width: 224px;
background: #fffffff5;
box-shadow: 0 1px 2px #3c40434d, 0 2px 6px 2px #3c404326;
}
.icon-list li {
display: flex;
justify-content: space-between;
margin-right: -6px;
}
.icon-list .checkbox-label {
flex: 1;
}
/** 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;
}
.filled-button {
padding: 0 24px;
line-height: 36px;
cursor: pointer;
background: white;
font-family: 'Google Sans', Arial, sans-serif;
font-size: 14px;
font-weight: 500;
border: 1px solid #dadce0;
border-radius: 4px;
color: #1a73e8;
}
.filled-button:hover {
border-color: #d2e3fc;
background: #d2e3fc26;
}
.filled-button:focus {
border-color: #d2e3fc;
background: #d2e3fc4d;
}
.filled-button:hover:focus {
background: #d2e3fc60;
}
.filled-button:active {
border-color: white;
box-shadow: 0 1px 2px #3c40434d, 0 1px 3px 1px #3c404326;
}
/** <select> elements */
.select-wrapper {
position: relative;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
background: rgba(0, 0, 0, 0.04);
}
select {
-webkit-appearance: none;
font: inherit;
background: transparent;
border: 0;
padding: 20px 8px 13px;
width: 100%;
}
.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;
}
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'] {
display: none;
}
.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;
}
/** 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;
}
}