-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.base.css
614 lines (566 loc) · 14.8 KB
/
style.base.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
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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
@import '@rainbow-me/rainbowkit/styles.css';
@tailwind base;
body {
@apply text-neutral-900 bg-primary/10;
}
h1 {
@apply text-xl font-bold text-neutral-900;
}
h4 {
@apply text-lg font-bold text-neutral-700;
}
h6 {
@apply text-base font-bold text-neutral-700;
}
small {
@apply text-xxs font-normal text-neutral-600 block;
}
#__next {
@apply w-full h-full;
}
/* 🔵 - Yearn Finance ******************************************************
** Overwritting the defaults to match our needs
**************************************************************************/
* {
@apply scroll-smooth font-sans;
}
input::placeholder {
@apply text-neutral-400 not-italic;
}
textarea::placeholder {
@apply text-neutral-400 not-italic;
}
input[type=file], /* FF, IE7+, chrome (except button) */
input[type=file]::-webkit-file-upload-button {
/* chromes and blink button */
cursor: pointer;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
-webkit-box-shadow: 0 0 0px 1000px rgba(0, 0, 0, 0) inset;
transition: background-color 5000s ease-in-out 0s;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type='number'] {
-moz-appearance: textfield;
}
label[aria-invalid='true'] {
@apply text-neutral-600 transition-colors;
& > form > div {
@apply border-[#FE0000] focus-within:border-[#FE0000] text-[#FE0000] focus-within:text-[#FE0000];
}
& > p {
@apply text-[#FF0000];
}
}
:focus {
outline-width: 0px;
outline-offset: 0px;
outline: none;
outline-color: transparent;
}
/* -- Button.tsx ------------------------------------------------------- */
.smol--input-wrapper {
@apply flex h-10 w-full items-center rounded-md border border-neutral-200 bg-neutral-0 transition-colors;
&:has(input:focus) {
@apply border-primary;
}
}
.smol--input {
@apply w-full overflow-x-scroll border-none bg-transparent text-sm outline-none scrollbar-none p-2;
}
select.smol--input {
@apply pr-7 truncate;
}
/* 🔵 - Yearn Finance ******************************************************
** Then, we import the tailwind class. They will be able to overwrite all
** the previous classes, not the next ones directly.
**************************************************************************/
@tailwind components;
@tailwind utilities;
/* 🔵 - Yearn Finance ******************************************************
** NsProgress is used to display the loading indicator. All of theses
** styles are required to make it visible
**************************************************************************/
.nprogress-custom-parent {
@apply overflow-hidden relative;
}
.nprogress-custom-parent #nprogress .spinner {
@apply absolute;
}
.nprogress-custom-parent #nprogress .bar {
@apply absolute;
}
#nprogress {
@apply pointer-events-none;
}
#nprogress .bar {
@apply bg-neutral-900 fixed top-0 left-0 w-full h-1 z-[1031];
}
#nprogress .spinner {
@apply block fixed z-[1031] top-4 right-4;
}
#nprogress .spinner-icon {
@apply hidden;
}
/* 🔵 - Yearn Finance ******************************************************
** Some accessibilities fixes
**************************************************************************/
.scrollbar-none::-webkit-scrollbar {
display: none;
}
.scrollbar-none {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
}
.yearn--select-reset {
@apply bg-transparent p-0 border-none;
&:focus {
outline: none;
box-shadow: none;
}
}
.yearn--select-no-arrow {
-webkit-appearance: none;
-moz-appearance: none;
background-image: none;
}
.yearn--select-no-arrow::-ms-expand {
display: none;
}
/* 🔵 - Yearn Finance ******************************************************
** Some custom css for the components
**************************************************************************/
.img-gradient::after {
content: '';
background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%);
@apply absolute inset-0 w-full h-full;
}
/* 🔵 - Yearn Finance ******************************************************
** Header an navbar
**************************************************************************/
.yearn--header {
@apply inset-x-0 top-0 z-50 mb-5 flex h-20 w-full max-w-[1200px] flex-row items-center justify-between p-4 text-xs sm:text-sm md:inset-x-auto md:mb-0 md:px-0 md:text-base;
}
.yearn--nav {
@apply hidden w-1/3 flex-row items-center space-x-3 md:flex md:space-x-6;
}
.yearn--header-nav-item {
@apply relative cursor-pointer transition-colors text-neutral-600 hover:text-neutral-900 font-normal text-sm;
&.active {
@apply text-neutral-900 font-bold;
}
}
.yearn--toast-options {
@apply !w-screen text-sm text-neutral-700 !px-4 !rounded-none !shadow-none !py-2 !max-w-full;
}
.yearn--toast-button {
@apply text-xs px-3 py-1 text-primary bg-white;
}
.mobile-nav-item {
@apply flex flex-col items-start justify-between rounded-md bg-neutral-200;
& > p {
@apply p-2 text-base font-bold text-neutral-900;
}
}
.mobile-nav-item {
@apply rounded-none border-b border-neutral-300 bg-neutral-200/60;
}
.tab {
@apply font-normal text-neutral-600 transition-colors hover:text-neutral-900 cursor-pointer border-b-2 border-transparent pb-4 z-20;
&[aria-selected='true'] {
@apply font-bold text-neutral-900 border-neutral-900;
}
}
.hover-fix::before {
display: block;
content: attr(title);
font-weight: bold;
height: 0;
overflow: hidden;
visibility: hidden;
}
.font-number {
@apply font-mono tabular-nums;
}
[type='text']:focus,
[type='email']:focus,
[type='url']:focus,
[type='password']:focus,
[type='number']:focus,
[type='date']:focus,
[type='datetime-local']:focus,
[type='month']:focus,
[type='search']:focus,
[type='tel']:focus,
[type='time']:focus,
[type='week']:focus,
[multiple]:focus,
textarea:focus,
select:focus {
outline: none;
box-shadow: none;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fadeOut {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
.TooltipContent[data-state='delayed-open'],
.PopoverContent[data-state='open'] {
animation: fadeIn 100ms ease-out;
}
.TooltipContent[data-state='closed'],
.PopoverContent[data-state='closed'] {
animation: fadeOut 100ms ease-in;
}
.DropdownMenuContent {
width: var(--radix-dropdown-menu-trigger-width);
max-height: var(--radix-dropdown-menu-content-available-height);
}
.skeleton-lg {
@apply animate-pulse rounded-lg bg-neutral-400;
}
.skeleton-full {
@apply animate-pulse rounded-full bg-neutral-400;
}
.withRing:focus-visible {
@apply ring-2 ring-primary ring-offset-2;
}
.button {
@apply cursor-pointer px-5 flex justify-center items-center h-10 text-base transition-all relative rounded-lg;
@apply withRing;
&[data-variant='filled'] {
@apply text-white bg-black font-medium border border-transparent text-sm;
&:disabled {
@apply bg-neutral-600 opacity-40;
}
&:not(:disabled):not([aria-busy='true']):hover {
@apply bg-primaryHover;
}
}
&[data-variant='light'] {
@apply text-neutral-900 bg-neutral-300 font-normal border border-transparent;
&:disabled {
@apply opacity-40;
}
&:not(:disabled):not([aria-busy='true']):hover {
@apply bg-neutral-400;
}
}
&[aria-busy='true'] {
@apply cursor-wait;
color: transparent !important;
}
&:disabled {
@apply cursor-not-allowed;
}
}
.input {
@apply w-full rounded-lg bg-transparent py-3 px-4 text-base;
@apply text-neutral-900 placeholder:text-neutral-600 caret-neutral-700;
@apply focus:placeholder:text-neutral-300 placeholder:transition-colors;
@apply focus:border-neutral-600 disabled:bg-neutral-300 transition-colors;
@apply border-neutral-400 disabled:border-transparent;
}
.font-mono {
font-family: 'Source Code Pro', monospace !important;
}
@layer base {
.max-w-4xl,
.max-w-5xl,
.max-w-6xl {
@apply px-4;
}
.font-number {
@apply font-mono tabular-nums;
}
.yearn--header {
@apply !p-0 !h-14;
}
/* 🔵 - Yearn Finance ******************************************************************************
** Table
** Fake table properties
***************************************************************************************************/
.yearn--table-head-wrapper {
@apply mb-2 hidden w-full grid-cols-9 px-6 md:grid;
}
.yearn--table-head-token-section {
@apply col-span-3;
}
.yearn--table-head-data-section {
@apply col-span-6 grid grid-cols-12 gap-x-7;
}
.yearn--table-head-label {
@apply text-start text-sm text-neutral-400;
}
.yearn--table-head-label-wrapper {
@apply col-span-1 flex flex-row items-center justify-start space-x-1;
&[datatype='number'] {
@apply justify-end;
& > .yearn--table-head-label {
@apply text-end;
}
}
}
.yearn--table-wrapper {
@apply grid w-full grid-cols-1 border-t border-neutral-200 py-2 px-4 md:grid-cols-9 md:border-none md:px-6;
}
.yearn--table-token-section {
@apply col-span-3 mb-2 flex flex-row items-center justify-between py-4 md:mb-0 md:py-0;
}
.yearn--table-token-section-item {
@apply flex flex-row items-center space-x-4 md:space-x-6;
}
.yearn--table-token-section-item-image {
@apply h-8 min-h-[32px] w-8 min-w-[32px] md:flex md:h-10 md:w-10;
}
.yearn--table-data-section {
@apply col-span-6 grid grid-cols-1 gap-x-0 md:grid-cols-12 gap-y-2 md:gap-y-0 mb-4 md:mb-0;
}
.yearn--table-data-section-item-label {
@apply inline text-start text-neutral-600 md:hidden text-xs ml-1;
}
.yearn--table-data-section-item-value {
@apply text-neutral-900;
}
.yearn--table-data-section-item {
@apply col-span-1 flex h-auto flex-col justify-between pt-0 px-0 md:h-14 md:py-2;
&[datatype='number'] {
@apply md:justify-end font-number;
& > .yearn--table-data-section-item-value {
@apply font-number text-end;
}
}
}
.yearn--table-label {
@apply inline text-start text-neutral-600 md:hidden;
}
/* 🔵 - Yearn Finance ******************************************************************************
** Details and summary nice styles.
***************************************************************************************************/
details > summary {
list-style: none;
}
details > summary::-webkit-details-marker {
display: none;
}
details {
& > summary {
@apply px-4 md:px-6 py-6 md:py-8 cursor-pointer flex flex-row items-center justify-between;
}
}
/* 🔵 - Yearn Finance ******************************************************************************
** Loader
** Custom style for the loader icon
***************************************************************************************************/
.loader {
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #fff;
box-shadow:
16px 0 #fff,
-16px 0 #fff;
position: relative;
animation: flash 1s ease-out infinite alternate;
}
@keyframes flash {
0% {
background-color: #fff2;
box-shadow:
12px 0 #fff2,
-12px 0 #fff;
}
50% {
background-color: #fff;
box-shadow:
12px 0 #fff2,
-12px 0 #fff2;
}
100% {
background-color: #fff2;
box-shadow:
12px 0 #fff,
-12px 0 #fff2;
}
}
}
@keyframes flash {
0% {
background-color: #aaaaaa;
box-shadow:
12px 0 #aaaaaa,
-12px 0 #000000;
}
50% {
background-color: #000000;
box-shadow:
12px 0 #aaaaaa,
-12px 0 #aaaaaa;
}
100% {
background-color: #aaaaaa;
box-shadow:
12px 0 #000000,
-12px 0 #aaaaaa;
}
}
.box-0 {
@apply bg-neutral-0 border border-primary/20 rounded-md shadow-sm;
&.hover {
@apply transition-colors hover:bg-neutral-200;
}
}
.tooltip {
@apply relative cursor-help;
}
.tooltip .tooltiptext,
.tooltip .tooltiptextsmall {
@apply text-xs text-center invisible bg-neutral-0 text-neutral-900 absolute z-50 right-1 opacity-0 transition-opacity p-2 rounded;
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.16);
}
.tooltip .tooltipLight {
@apply invisible absolute z-50 opacity-0 transition-opacity flex justify-center items-center;
}
.tooltiptext {
top: 110%;
width: 16rem;
margin-right: calc(-122px + 50%);
}
.tooltiptextsmall {
top: 150%;
width: 10rem;
margin-right: calc(-5rem + 4px);
}
.tooltip:hover .tooltiptext,
.tooltip:hover .tooltiptextsmall,
.tooltip:hover .tooltipLight {
@apply visible opacity-100;
}
.tooltip .tooltiptext::after,
.tooltip .tooltiptextsmall::after {
content: '';
position: absolute;
bottom: 98%;
right: 50%;
margin-right: -5px;
border-width: 5px;
border-style: solid;
border-color: hsl(var(--color-neutral-0)) transparent transparent transparent;
transform: rotate(180deg);
}
.tooltip.top .tooltiptext,
.tooltip.top .tooltiptextsmall {
top: -105%;
bottom: unset;
}
.tooltip.top .tooltiptext::after,
.tooltip.top .tooltiptextsmall::after {
top: 98%;
transform: rotate(0deg);
}
.modal {
@apply inline-block overflow-hidden relative z-50 w-full text-left align-bottom transition-all sm:my-8 sm:w-full sm:max-w-lg sm:align-middle md:mb-96 mx-auto md:max-w-4xl bg-transparent;
}
.modal-overlay {
@apply fixed inset-0 z-10 bg-neutral-900/40 transition-opacity backdrop-blur-[1px];
}
.detailsMigrate {
@apply bg-neutral-0 flex w-full flex-col justify-center border-t border-b-0 border-neutral-200 transition-colors;
}
/**************************************************************************************************
** AppBox is the style used to make the nices animations on the home page feel nice and smooth
** A custom overwrite is required for dark/light mode
**************************************************************************************************/
.appBox {
@apply relative flex aspect-video h-full w-full cursor-pointer flex-col items-start border border-neutral-200 p-4 transition-colors rounded-md bg-neutral-0 hover:bg-primary text-neutral-900;
}
.groupHoverText {
&:hover .noHoverContent {
@apply opacity-0;
}
&:hover .withHoverContent {
@apply opacity-100;
}
}
.approvalWizardDivider {
& > *:last-child {
@apply border-b-0 !mb-0 !pb-0;
}
}
.container {
@apply flex flex-row justify-between items-center space-x-10 relative max-w-xs;
& > dt {
@apply bg-primary z-10 pr-2;
}
& > dd {
@apply bg-primary z-10 pl-2 font-number whitespace-nowrap;
}
}
.filler {
@apply w-3/4 border-b-2 border-dashed border-neutral-0 absolute inset-0 h-full;
top: calc(-50% + 1px);
}
.svg-fit {
& > svg {
@apply w-full h-full;
}
}
.addr > span {
& > span {
@apply break-normal;
}
@apply break-all;
}
.scrollbar-show::-webkit-scrollbar {
-webkit-appearance: none;
overflow: hidden;
width: 4px;
}
.scrollbar-show::-webkit-scrollbar-thumb {
@apply rounded-md;
background-color: rgba(0, 0, 0, 0.1);
-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}
.scrollable {
@apply -mr-2 pr-1 overflow-y-auto;
scrollbar-gutter: stable;
}
* {
scrollbar-color: #f7f7f7;
scroll-behavior: smooth;
&::-webkit-scrollbar {
background: #f7f7f7;
border-radius: 14px;
width: 4px;
height: 4px;
}
&::-webkit-scrollbar-thumb {
background: #dcdddd;
border-radius: 14px;
background-clip: padding-box;
}
}