forked from snapshot-labs/snapshot-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.scss
343 lines (298 loc) · 6.58 KB
/
style.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
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
@import './assets/fonts/iconfont.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
[data-color-scheme='dark'] {
color-scheme: dark;
--primary-color: #384aff;
--bg-color: #211f24;
--text-color: #8b949e;
--link-color: #ffffff;
--heading-color: #ffffff;
--border-color: #2d2d2d;
--header-bg: #1c1b20;
--block-bg: transparent;
--shadow-color: #fff1;
}
[data-color-scheme='light'] {
color-scheme: light;
--primary-color: #384aff;
--bg-color: white;
--text-color: #57606a;
--link-color: #444444;
--heading-color: #111111;
--border-color: #e0e0e0;
--header-bg: white;
--block-bg: transparent;
--shadow-color: #0001;
}
@layer base {
@font-face {
font-family: 'Calibre';
src: url('./assets/fonts/Calibre-Medium-Custom.woff2') format('woff2');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'Calibre';
src: url('./assets/fonts/Calibre-Semibold-Custom.woff2') format('woff2');
font-weight: 600;
font-style: normal;
}
@font-face {
font-family: 'SpaceMono';
src: url('./assets/fonts/space-mono-v11-latin-700.woff2') format('woff2');
}
body {
overflow-x: hidden;
}
h1 {
@apply text-2xl;
}
h2 {
@apply text-xl;
}
h3 {
@apply my-2 text-lg;
}
h4 {
@apply text-md;
}
h1,
h2,
h3,
h4,
h5,
h6 {
@apply font-semibold text-skin-heading;
}
a,
button,
input {
@apply transition-colors;
}
b {
@apply font-semibold;
}
select {
@apply bg-skin-bg;
}
}
@layer utilities {
// This allows us to use 'no-scrollbar' with Tailwind breakpoints like this 'md:no-scrollbar'
/* Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.no-scrollbar {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
}
// Don't prevent overscroll on touch devices
@media (pointer: fine) {
body {
overscroll-behavior-y: none;
}
}
// Tune component styles
.tune-label {
@apply font-sans;
}
.tune-button {
@apply rounded-full;
}
.tune-input {
@apply rounded-full;
}
.tune-textarea {
@apply rounded-3xl px-3;
}
.tune-listbox-button {
@apply rounded-full;
}
.tune-button-select {
@apply rounded-full;
}
.tune-input-duration {
@apply rounded-full;
}
.tune-error-text {
@apply font-sans;
}
// Fade transition for Vue's transition and transition-group
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
// TODO: Move this to BaseLink components
a,
.a {
color: var(--link-color);
&:hover {
cursor: pointer;
text-decoration: none;
}
}
// TODO: Move this and ::placeholder to a new BaseInput component
.input {
@apply bg-transparent text-skin-link outline-none;
}
::placeholder {
color: var(--text-color);
opacity: 0.6 !important;
}
// TODO: Remove this and use border-skin-border in the templates. Tailwind has
// dozens of modifiers (md:, sm:, hover: etc.) which would all need to be listed here.
.border,
.border-md,
.border-lg,
.border-b,
.border-t,
.border-r,
.border-l {
@apply border-skin-border;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type='time']::-webkit-calendar-picker-indicator {
background: none;
display: none;
}
// Pointer cursor for file input buttons
input[type=file], /* FF, IE7+, chrome (except button) */
input[type=file]::-webkit-file-upload-button {
/* chromes and blink button */
cursor: pointer;
}
input[type='number'] {
-moz-appearance: textfield;
}
// V-Tippy tooltip package styling - could be moved somewhere else?
.tippy-box[data-animation='fade'][data-state='hidden'] {
opacity: 0;
}
[data-tippy-root] {
max-width: calc(100vw - 10px);
}
.tippy-box {
position: relative;
background-color: var(--text-color);
color: var(--header-bg);
border-radius: 7px;
font-size: 16px;
line-height: 1.4;
outline: 0;
transition-property: transform, visibility, opacity;
padding: 2px 4px;
text-align: center;
font-weight: 500;
}
.tippy-box[data-placement^='top'] > .tippy-arrow {
bottom: 0;
}
.tippy-box[data-placement^='top'] > .tippy-arrow:before {
bottom: -7px;
left: 0;
border-width: 8px 8px 0;
border-top-color: var(--text-color);
transform-origin: center top;
}
.tippy-box[data-placement^='bottom'] > .tippy-arrow {
top: 0;
}
.tippy-box[data-placement^='bottom'] > .tippy-arrow:before {
top: -7px;
left: 0;
border-width: 0 8px 8px;
border-bottom-color: var(--text-color);
transform-origin: center bottom;
}
.tippy-box[data-placement^='left'] > .tippy-arrow {
right: 0;
}
.tippy-box[data-placement^='left'] > .tippy-arrow:before {
border-width: 8px 0 8px 8px;
border-left-color: var(--text-color);
right: -7px;
transform-origin: center left;
}
.tippy-box[data-placement^='right'] > .tippy-arrow {
left: 0;
}
.tippy-box[data-placement^='right'] > .tippy-arrow:before {
left: -7px;
border-width: 8px 8px 8px 0;
border-right-color: var(--text-color);
transform-origin: center right;
}
.tippy-box[data-inertia][data-state='visible'] {
transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);
}
.tippy-arrow {
width: 16px;
height: 16px;
color: #333;
}
.tippy-arrow:before {
content: '';
position: absolute;
border-color: transparent;
border-style: solid;
}
.tippy-content {
position: relative;
padding: 5px 9px;
z-index: 1;
overflow-wrap: break-word;
}
.tippy-box[data-theme~='urlified'] {
max-width: 200px;
white-space: pre-wrap;
color: var(--header-bg);
a {
color: var(--header-bg);
}
}
.lazy-loading {
@apply animate-pulse-fast bg-skin-border;
}
// Shot UI kit
.s-input {
@apply block w-full rounded-full border border-skin-border bg-skin-bg px-3 py-2 text-skin-link outline-none focus-within:border-skin-text;
}
.s-error {
@apply flex items-center rounded-b-3xl bg-red px-3 pb-2 pt-4 text-sm text-white transition-all duration-200;
}
// Fix for chrome. Overwrites tailwinds break-words class.
// For some reason chrome doesn't break links with just overflow-wrap.
// It also needs word-break.
.break-words {
overflow-wrap: break-word;
word-break: break-word;
}
// v-viewer package styling
.viewer-backdrop {
background-color: rgba(0, 0, 0, 80%) !important;
}
.viewer-close {
scale: 1.5 !important;
margin-top: 50px !important;
margin-right: 66px !important;
width: 50px !important;
height: 50px !important;
background-color: transparent !important;
box-shadow: none !important;
}
@media (max-width: 544px) {
.viewer-close {
margin-right: 50px !important;
}
}