-
Notifications
You must be signed in to change notification settings - Fork 0
/
discord.user.styl
1923 lines (1684 loc) · 58.8 KB
/
discord.user.styl
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
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* ==UserStyle==
@name Dark-Discord
@namespace gitlab.com/vednoc/dark-discord
@description Dark and light, very customizable theme for Discord.
@author vednoc <vednoc@pm.me> (https://github.com/vednoc)
@homepageURL https://gitlab.com/vednoc/dark-discord
@supportURL https://gitlab.com/vednoc/dark-discord/issues
@updateURL https://userstyles.world/api/style/15.user.css
@version 0.63.0
@license MIT
@preprocessor stylus
@var checkbox cg_debug 'Color generator debug' 0
@var select cg_theme 'Base color-scheme toggle' {
'Custom colors *': 'custom',
'Dark blue (old) ': 'old',
'Dark gray (new) ': 'new',
}
@var color cg_bg 'Base background color' #1f232a
@var color cg_fg 'Base foreground color' #eeeeee
@var color cg_ac 'Base accent color ' #7289da
@var range _bg_a 'Adjust background color tones' [0, -25, 25, 0.1, '%']
@var range _fg_a 'Adjust foreground color tones' [0, -25, 25, 0.1, '%']
@var range _ac_a 'Adjust accent color tones ' [0, 0, 25, 1, '%']
@var range _sc_a 'Adjust syntax color tones ' [0, 0, 25, 1, '%']
@var range e_size 'Emotes: Reduce emote size' [32, 24, 64, 8, 'px']
@var checkbox e_reaction 'Emotes: Larger reaction emotes' 1
@var checkbox chat_short 'Shorter chat mode' 0
@var text chat_short_w 'Shorter chat width' 800px
@var checkbox guild_avatar 'Move user menu to guilds bar' 0
@var checkbox sb_short 'Smaller sidebar mode' 1
@var text sb_short_s 'Smaller sidebar mode size' 64px
@var text sb_short_w 'Smaller sidebar mode breakpoint' 940px
@var text sb_short_d 'Smaller sidebar mode hover delay' 1000ms
@var checkbox g_minimize 'Minimize guild area width' 1
@var text g_minimize_w 'Minimize guild area breakpoint' 700px
@var checkbox g_icons 'Small guild icons' 0
@var text g_icons_s 'Small guild icon size' 32px
@var select compact 'Compact mode' {
'Hide guilds ': 'guilds',
'Hide sidebar ': 'sidebar',
'Hide both *': 'both',
}
@var text compact_w 'Compact mode breakpoint' 540px
@var range avatar_size 'Avatar size in info menus' [80, 80, 128, 16, 'px']
@var checkbox avatar_c_m 'Enable avatar context menu in profiles' 1
@var checkbox code_lines 'Enable code line numbers' 1
@var checkbox hide_dl_btn 'Hide "Download Apps" button' 1
@var text f_ui 'UI font' ''font_name''
@var text f_code 'Monospace font' ''font_name''
@var text b_radius 'Border radius for menus' 4px
@var color _red 'Base red color ' #f07178
@var color _orange 'Base orange color ' #f78c6c
@var color _yellow 'Base yellow color ' #ffcb6b
@var color _green 'Base green color ' #aede62
@var color _cyan 'Base cyan color ' #89ddff
@var color _blue 'Base blue color ' #82aaff
@var color _magenta 'Base magenta color ' #9a91ea
@var color _violet 'Base violet color ' #c792ea
@var color _gray 'Gray color ' #bbbbbb
@var color _white 'White color ' #ffffff
@var color _sh 'Shadow color ' #00000025
==/UserStyle== */
// Class mixin.
// TODO: Add examples.
a(args, prefix = '', attr = 'class', i = '') {
lst ?= ''
dbg ?= args
len ?= length(args)
u = unquote
// Check arguments.
if args[0] == 0 {
error('Must provide valid arguments. Length of arguments is: ' + len)
}
// Process.
for v, k in args {
content: s('%s --- %s', k, v)
// Iterate over arguments.
if k {
// { '--%s' % k }: 'argument: ' + args[k]
if k == length(args) - 1 {
lst += s('[%s*=%s]', u(attr), v)
} else {
lst += s('[%s*=%s], ', u(attr), v)
}
} else {
// { '--%s' % k }: 'argument: ' + args[k]
if k == length(args) - 1 {
lst += s('[%s*=%s]', u(attr), v)
} else {
lst += s('[%s*=%s], ', u(attr), v)
}
}
}
// Combine.
list = (i != '') ? s('%s%s', u(i), u(lst)) : lst
dbg = list
// Generate.
{ list } {
{ block }
}
}
// Old class mixin.
/// Use it instead of: [class*='foo_bar']
w(prefix, args, attr = class, sel = '*=', i = ' ') {
r = unquote
list = ''
selectors = (prefix == '>' || prefix == '~' || prefix == '+')
prefix = (selectors) ? s('%s ', r(prefix)) : (prefix == '') ? '' : prefix
inline_cases = (prefix == '/' || prefix == '../' || prefix == '~/' || prefix == '')
inline = ((selectors || inline_cases) && length(args) == 1) ? '' : i
attr = (attr == 0) ? 'class' : (attr == '_') ? '' : attr
sel = (sel == 0) ? '*=' : (sel == '_') ? '' : sel
// dbg_{ attr }: s('%s ::: %s ::: %s ::: %s', prefix, attr, inline, args)
for item, index in args {
// dbg: '' + item + ' :::::: ' + index
if index {
if (inline == '0') {
list += s(' [%s%s%s]', r(attr), r(sel), item)
} else if (inline == ' ') {
list += s('%s%s[%s%s%s],', r(inline), r(prefix), r(attr), r(sel), item)
} else {
list += s('[%s%s%s]', r(attr), r(sel), item)
}
} else {
if (inline == '0') {
list += s('%s[%s%s%s]', r(prefix), r(attr), r(sel), item)
} else if (inline != '') {
list += s('%s%s[%s%s%s],', r(inline), r(prefix), r(attr), r(sel), item)
} else {
list += s('%s[%s%s%s]', r(prefix), r(attr), r(sel), item)
}
}
}
list = replace(',$', '', list)
// dbg_list: '' + list
{ list } {
{ block }
}
}
// Colors mixin.
/// All colors: `c: fg bd bg`
/// Only border-color: `c: 0 bd`
c(x, y = 0, z = 0, xi = 1, yi = 1, zi = 1) {
if x != 0 && x != '_' { color: xi is 0 ? x : x i }
if y != 0 && y != '_' { border-color: yi is 0 ? y : y i }
if z != 0 && z != '_' { background-color: zi is 0 ? z : z i }
}
// SVG colors.
v(x, y = 0, xi = 1, yi = 1) {
if x != 0 && x != '_' { fill: xi is 0 ? x : x i }
if y != 0 && y != '_' { stroke: yi is 0 ? y : y i }
}
// Pseudo-element builder.
P(a, _z = 0, _c = '', _p = absolute) {
z-index: _z
content: _c
position: _p
if a[0] is a 'call' or a[0] is a 'unit' { top: a[0] }
if a[1] is a 'call' or a[1] is a 'unit' { right: a[1] }
if a[2] is a 'call' or a[2] is a 'unit' { bottom: a[2] }
if a[3] is a 'call' or a[3] is a 'unit' { left: a[3] }
}
// Raw RGB mixin.
/// Convert RGBA (if t = 1) or HEX to raw rrr-ggg-bbb format.
to_rgb(input, t = 0) {
if (t) {
unquote(substr(join(',', slice(split(',', s('%s', input)), 0, -1)), 5))
} else {
unquote(slice(s('%s', rgba(input, 0)), 5, -3))
}
}
// Raw RGBA mixin.
/// Combine `*-rgb` vars and alpha value.
to_rgba(input, alpha) {
unquote(s('rgba(var(--%s-rgb), %s)', unquote(input), alpha))
}
// Border radius mixin.
r() { border-radius: arguments }
// Box-shadow mixin.
b() { box-shadow: arguments }
/// Remove old browser prefixes.
vendors = official
/// Feat -> Base color-scheme toggle. #32
if (cg_theme == 'custom') {
BG = cg_bg
FG = cg_fg
AC = cg_ac
} else if (cg_theme == 'old') {
BG = #1f232a
FG = #eeeeee
AC = #7289da
} else if (cg_theme == 'new') {
BG = #292929
FG = #e6e6e6
AC = #d47d3f
}
/// Helpers.
t = transparent
i = !important
BA = _bg_a
FA = _fg_a
AA = _ac_a
SA = _sc_a
//w = W // TODO: Developer only.
// Color generator.
/// NOTE: Fix the scope to avoid conflicts.
/{
g = global
/// Generator rules.
if (dark(BG)) {
a1 = (AA + 15); a2 = (AA + 30); a3 = (AA + 45); a4 = (AA + 65); a5 = (AA + 75)
s1 = (SA + 15); s2 = (SA + 30); s3 = (SA + 45); s4 = (SA + 65); s5 = (SA + 75)
b1 = (BA + 10); b2 = (BA - 05); b3 = (BA - 10); b4 = (BA - 15); b5 = (BA - 20)
f1 = (FA - 10); f2 = (FA + 10); f3 = (FA + 20); f4 = (FA + 30); f5 = (FA + 40)
} else {
a1 = (AA + 15); a2 = (AA + 30); a3 = (AA + 45); a4 = (AA + 65); a5 = (AA + 75)
s1 = (SA + 15); s2 = (SA + 30); s3 = (SA + 45); s4 = (SA + 65); s5 = (SA + 75)
b1 = (BA - 10); b2 = (BA + 08); b3 = (BA + 16); b4 = (BA + 24); b5 = (BA + 32)
f1 = (FA - 05); f2 = (FA - 10); f3 = (FA - 15); f4 = (FA - 20); f5 = (FA - 30)
}
/// Generate tones for base colors.
C = {
bg: {
'0': darken(BG, b1)
'1': darken(BG, 0%)
'2': darken(BG, b2)
'3': darken(BG, b3)
'4': darken(BG, b4)
'5': darken(BG, b5)
},
fg: {
'0': darken(FG, f1)
'1': darken(FG, 0%)
'2': darken(FG, f2)
'3': darken(FG, f3)
'4': darken(FG, f4)
'5': darken(FG, f5)
},
ac: {
'0': mix(darken(BG, 0%), AC, 0%)
'1': mix(darken(BG, 40%), AC, a1)
'2': mix(darken(BG, 40%), AC, a2)
'3': mix(darken(BG, 40%), AC, a3)
'4': mix(darken(BG, 65%), AC, a4)
'5': mix(darken(BG, 50%), AC, a5)
},
b1: {
'0': spin(_red, 0deg - 0%)
'1': spin(_red, 15deg - s1)
'2': spin(_red, 30deg - s2)
'3': mix(darken(BG, 20%), _red, s3)
'4': mix(darken(BG, 40%), _red, s4)
'5': mix(darken(BG, 40%), _red, s5)
},
b2: {
'0': spin(_orange, 0deg - 0%)
'1': spin(_orange, 15deg - s1)
'2': spin(_orange, 30deg - s2)
'3': mix(darken(BG, 20%), _orange, s3)
'4': mix(darken(BG, 40%), _orange, s4)
'5': mix(darken(BG, 40%), _orange, s5)
},
b3: {
'0': spin(_yellow, 0deg - 0%)
'1': spin(_yellow, 15deg - s1)
'2': spin(_yellow, 30deg - s2)
'3': mix(darken(BG, 20%), _yellow, s3)
'4': mix(darken(BG, 40%), _yellow, s4)
'5': mix(darken(BG, 40%), _yellow, s5)
},
b4: {
'0': spin(_green, 0deg - 0%)
'1': spin(_green, 15deg - s1)
'2': spin(_green, 30deg - s2)
'3': mix(darken(BG, 20%), _green, s3)
'4': mix(darken(BG, 40%), _green, s4)
'5': mix(darken(BG, 40%), _green, s5)
},
b5: {
'0': spin(_cyan, 0deg - 0%)
'1': spin(_cyan, 15deg - s1)
'2': spin(_cyan, 30deg - s2)
'3': mix(darken(BG, 20%), _cyan, s3)
'4': mix(darken(BG, 40%), _cyan, s4)
'5': mix(darken(BG, 40%), _cyan, s5)
},
b6: {
'0': spin(_blue, 0deg - 0%)
'1': spin(_blue, 15deg - s1)
'2': spin(_blue, 30deg - s2)
'3': mix(darken(BG, 20%), _blue, s3)
'4': mix(darken(BG, 40%), _blue, s4)
'5': mix(darken(BG, 40%), _blue, s5)
},
b7: {
'0': spin(_magenta, 0deg - 0%)
'1': spin(_magenta, 15deg - s1)
'2': spin(_magenta, 30deg - s2)
'3': mix(darken(BG, 20%), _magenta, s3)
'4': mix(darken(BG, 40%), _magenta, s4)
'5': mix(darken(BG, 40%), _magenta, s5)
},
b8: {
'0': spin(_violet, 0deg - 0%)
'1': spin(_violet, 15deg - s1)
'2': spin(_violet, 30deg - s2)
'3': mix(darken(BG, 20%), _violet, s3)
'4': mix(darken(BG, 40%), _violet, s4)
'5': mix(darken(BG, 40%), _violet, s5)
}
}
/// Generate Stylus-lang variables.
define('bg-' + key, val, g) for key, val in C.bg
define('fg-' + key, val, g) for key, val in C.fg
define('ac-' + key, val, g) for key, val in C.ac
define('b1-' + key, val, g) for key, val in C.b1
define('b2-' + key, val, g) for key, val in C.b2
define('b3-' + key, val, g) for key, val in C.b3
define('b4-' + key, val, g) for key, val in C.b4
define('b5-' + key, val, g) for key, val in C.b5
define('b6-' + key, val, g) for key, val in C.b6
define('b7-' + key, val, g) for key, val in C.b7
define('b8-' + key, val, g) for key, val in C.b8
/// Generate Stylus-lang helpers for CSS variables.
define('bg' + key, s('var(--bg-%s)', unquote(key)), g) for key, val in C.bg
define('fg' + key, s('var(--fg-%s)', unquote(key)), g) for key, val in C.fg
define('ac' + key, s('var(--ac-%s)', unquote(key)), g) for key, val in C.ac
define('b1' + key, s('var(--b1-%s)', unquote(key)), g) for key, val in C.b1
define('b2' + key, s('var(--b2-%s)', unquote(key)), g) for key, val in C.b2
define('b3' + key, s('var(--b3-%s)', unquote(key)), g) for key, val in C.b3
define('b4' + key, s('var(--b4-%s)', unquote(key)), g) for key, val in C.b4
define('b5' + key, s('var(--b5-%s)', unquote(key)), g) for key, val in C.b5
define('b6' + key, s('var(--b6-%s)', unquote(key)), g) for key, val in C.b6
define('b7' + key, s('var(--b7-%s)', unquote(key)), g) for key, val in C.b7
define('b8' + key, s('var(--b8-%s)', unquote(key)), g) for key, val in C.b8
}
@-moz-document regexp('https?://discord(app)?.com/(app|channels|discovery|library|store|gui.*|log.*)(/.*)?') {
/// Show debug.
if (cg_debug) {
:root {
content: 'a mixin'
+a('x', i: '/') {
--divider: _;
--debug: dbg
--len: len
}
+a(x y z) {
--divider: _;
--debug: dbg
--len: len
}
+a(1 2 3) {
--divider: _;
--debug: dbg
--len: len
}
}
:root {
&::before {
content: \
' ⭐ BG: ' + luminosity(BG) + \
' ⭐ FG: ' + luminosity(FG) + \
' 🌟 bg1: ' + bg-1 + \
' 🌟 fg1: ' + fg-1 + \
' 🌟 ac1: ' + ac-1 i
P(0 0 0 0)
text-align: center
line-height: 2em
height: 2em
c: fg1 0 bg3
}
body > div[id] {
margin-top: calc(2em + 0px)
max-height: calc(100vh - 2em)
b: 0 -1px bg5
}
}
}
// Use stylus-lang variables with CSS variables.
shadow = var(--shadow)
sh = var(--shadow)
bsh = var(--bshadow)
white = var(--white)
outer = 0 0 0 1px bg5
inner = inset outer
rc = var(--radius)
:root, .theme-dark {
/// Userstyle info.
--note: 'Dark-Discord v0.63.0'
/// Native variables.
--header-primary: fg1 //#ffffff
--header-secondary: fg4 //#b9bbbe
--text-normal: fg1 //#dcddde
--text-muted: fg5 //#72767d
--text-link: ac0 //#00b0f4
--channels-default: fg4 //#8e9297
--interactive-normal: fg2 //#b9bbbe
--interactive-hover: fg1 //#dcddde
--interactive-active: fg0 //#ffffff
--interactive-muted: fg5 //#4f545c
--background-primary: bg1 //#36393f
--background-secondary: bg2 //#2f3136
--background-secondary-alt: bg3 //#292b2f
--background-tertiary: bg4 //#202225
--background-accent: bg5 //#4f545c
--background-mobile-primary: bg1 //#36393f
--background-mobile-secondary: bg2 //#2f3136
--background-floating: bg0 //#18191c
--background-modifier-hover: bg3 //rgba(79,84,92,0.16)
--background-modifier-active: bg4 //rgba(79,84,92,0.24)
--background-modifier-selected: bg5 //rgba(79,84,92,0.32)
--background-modifier-accent: bg3 //hsla(0,0%,100%,0.06)
--background-mentioned: mix(ac-5, bg-1, 40) //rgba(250,166,26,0.05)
--background-mentioned-hover: mix(ac-4, bg-1) //rgba(250,166,26,0.08)
--background-message-hover: bg0 //rgba(4,4,5,0.07)
/// Scrollbars.
--scrollbar-thin-thumb: bg5 //#202225
--scrollbar-thin-track: transparent
--scrollbar-auto-thumb: bg5 //#202225
--scrollbar-auto-track: bg1 //#2e3338
--scrollbar-auto-scrollbar-color-thumb: bg5 //#202225
--scrollbar-auto-scrollbar-color-track: bg1 //#2f3136
/// Shadows.
--elevation-stroke: inner //0 0 0 1px rgba(4,4,5,0.15)
--elevation-low: 0 1px bg5 // ...0 2px 0 rgba(4,4,5,0.05)
// --elevation-medium: 0 4px 4px rgba(0,0,0,0.16)
--elevation-high: 0 8px 16px 2px sh //0 8px 16px rgba(0,0,0,0.24)
/// Various backgrounds.
--radio-group-dot-foreground: ac1 //#8ea1e1
--channeltextarea-background: bg3 //#40444b
--activity-card-background: bg0 //#202225
--textbox-markdown-syntax: fg4 //#8e9297
--deprecated-card-bg: bg3 //#20222599
--deprecated-card-editable-bg: bg2 //#2022254d
--deprecated-store-bg: bg1 //#36393f
/// Settings -> My account -> Edit settings.
--deprecated-text-input-bg: bg3 //#0000001a
--deprecated-text-input-border: bg4 //#0000004d
--deprecated-text-input-border-hover: bg5 //#040405
--deprecated-text-input-border-disabled: bg0 //#202225
--deprecated-text-input-prefix: ac1 //#dcddde
/// Modals -> Quickswitcher -> Fix input colors.
--deprecated-quickswitcher-input-background: bg4 //#72767d
--deprecated-quickswitcher-input-placeholder: fg2 //#ffffff4d
/// Reduce emoji size.
--e-size: e_size
/// Generate color variables.
for _v in (bg fg ac b1 b2 b3 b4 b5 b6 b7 b8) {
for _i in 0..5 {
key = s('--%s-%s', _v, _i)
/// Escape `\` for `*-0` vars.
val = _v + \- + _i
/// Generate CSS variables.
{ key }: val i
{ key + '-rgb' }: to_rgb(val)
}
}
/// Various theme variables.
--shadow : _sh
--bshadow : 0 8px 16px var(--shadow)
--white : _white
--t : transparent i
--radius : b_radius
--f-mono : f_code, Consolas, Liberation Mono, Menlo, Courier, monospace
--f-ui : f_ui, Whitney, Helvetica Neue, Helvetica, Arial, sans-serif
--avatar-s: avatar_size
}
// Base styles.
body {
c: 0 0 bg0
/// Global -> Browser defaults.
::selection { c: bg5 0 fg1 }
::-moz-selection { c: bg5 0 fg1 }
/// Global -> Text placeholders.
+w('', 'emptyPlaceholder') {
&, ../ ::placeholder { c: fg2 }
}
/// Chat -> Placeholders in member list.
+w('', 'GroupsPlaceholder' 'placeholderAvatar-' 'placeholderUsername-') {
--background-primary: bg3
}
/// Feat -> Custom UI font.
&, button, input, select, textarea, ::placeholder {
font-family: var(--f-ui) i
}
/// Shortcuts.
+w('', 'keybindShortcut') {
span {
c: fg1 bg4 bg2
b: inset 0 -4px 0 bg5 i
svg g { v: fg4 }
}
}
/// App -> Core.
+w('', 'appMount-') {
c: 0 0 t
/// Skeleton/Crashed page.
+w('>', 'errorPage-') { c: 0 0 bg1 }
/// 'No channel' page.
+w('', 'noChannel-') {
c: 0 0 bg1
h4 { c: fg1 }
h4 + div { c: fg4 }
}
/// Notice alert.
+w('', 'notice-') {
r: 0px
+w('&', 'Brand-') { c: 0 0 ac3 }
+w('&', 'Default-') { c: 0 0 b33 }
+w('&', 'height36-') { c: 0 0 bg3 }
+w('&', 'Neutral-') {
c: fg1 0 bg4
+w('', 'button-') {
c: fg1 bg5 bg4
&:hover { c: 0 0 bg5 }
}
}
}
}
/// Status colors.
svg {
rect[fill^='hsl(38'] { v: b20 }
rect[fill^='hsl(139'] { v: b40 }
rect[fill^='hsl(214'] { v: fg5 }
rect[fill^='hsl(359'] { v: b10 }
/// User status menu.
[mask*='status-offline'] > div { c: 0 0 fg5 }
[mask*='status-online'] > div { c: 0 0 b40 }
[mask*='status-idle'] > div { c: 0 0 b20 }
[mask*='status-dnd'] > div { c: 0 0 b10 }
}
/// Badges.
+w('', 'numberBadge-') {
/// Global -> 'NEW' alerts.
/.badge-_BgAUQ,
/// Inbox -> Unreads.
/.wrapper-232cHJ,
/// Unread messages.
&[style *= 'nd-color: rgb(240\, 71\, 71)'],
&[style *= 'nd-color: rgb(237\, 66\, 69)'],
/// Quickswitcher -> Unread messages.
/[class *= 'quickswitcher-'] [class *= 'badge'],
/// Guilds -> New messages.
/[class *= 'mention-'][class *= 'bar'],
/// Guilds -> Settings -> New settings.
/[class *= 'gearWithBadge-'] > div:last-child,
/// Chat -> Pinned messages.
/[class *= 'iconBadge-'] {
c: white 0 ac0
}
}
/// Buttons.
[role = 'button'] {
&[style *= 'b(67\, 181\, 129'] { c: white 0 b42 }
}
/// Feat -> Line numbers for code blocks.
if (code_lines) {
pre code {
c: fg1
position: relative
padding-left: 3em i
/// -> Generate a range of numbers.
n = ''
for num in 1..128 {
n += s('%s ', num)
if (num == 128) {
n += s('%s', num)
}
}
/// -> Use a psuedo-element as line numbers.
&::before {
width: 2ch
overflow-y: hidden
P(0.5em 0 0.5em 0px, 0, n)
padding: 0 0.5em 0 1.5em
white-space: pre-line
text-align: right
c: fg5
}
}
}
/// Global -> Tooltips.
+a(tooltipBlack-, i: '/') {
border: 1px solid bg5
c: fg1 0 bg3
b: 0 4px 8px shadow i
+w('', 'Pointer-') { border-top-color: bg5 i }
}
/// Fix 'Server Boosting' and similar tooltips.
+a(subscribeTooltipWrapper-, i: '/') {
c: 0 0 ac3
&::after { border-bottom-color: ac3 i }
}
/// Guilds -> Voice -> Activity popout.
+w('', 'container-3JTnYm') {
border: 1px solid bg5 i
r: rc
}
/// Chat -> Inline mentions.
+w('', 'mention interactive', i: '') {
transition: 0.2s ease-in-out
/// Hover/active states.
&:hover, &.popout-open { c: white 0 ac1 }
+w('/', 'mentioned-' 'mention', i: 0) { &:not(#z) { c: ac0 0 t }}
/// Search -> Highlighted matches.
/.highlight { c: 0 0 ac4 }
}
/// Global -> Bot tags.
+a(botTagInvert-, i: '/') { c: white 0 ac0 }
/// Global -> Context menus.
+w('', 'contextMenu-') {
border: 1px solid bg5 i
}
/// Global -> Login page.
+w('', 'authBox-') {
border: 1px solid bg5 i
b: var(--elevation-high) i
r: rc i
c: fg5
}
}
// Global -> Switches/Checkboxes.
+w('', 'switch-') {
&:not([class*='themeClear-']) {
c: 0 0 bg4
&::after { c: 0 0 fg1 }
/// Enabled.
+w('&', 'Checked-') {
c: 0 0 ac1
&::after { c: 0 0 white }
}
}
+a(checkbox-, i: '/') {
/// Squared.
+w('&', 'box-') {
c: 0 bg5
/// 'Mark as spoiler' checkbox.
&[style*='r-color: rgb(114\, 137\, 218)'] {
c: 0 ac1
svg path { v: ac1 }
}
/// In bars or standalone.
&[style*='d-color: rgb(114\, 137\, 218)'] {
c: white ac1 ac1
svg path { v: white }
}
}
/// Rounded.
+w('&', 'round-') {
&[style *= '67\, 181\, 129'] { c: 0 b41 b41 }
}
}
}
// Global -> Sliders.
+w('', 'control-') {
[style*="d-color: rgb(67\, 181\, 129"] { c: 0 0 b43 }
[style*="d-color: rgb(114\, 118\, 125"] { c: 0 0 bg5 }
rect[fill='white'] { v: bg0 }
+w('', 'slider-') {}
}
// Global -> Dropdown menus.
+w('', 'select-') {
+w('', '-control') {
c: red bg4 bg2
&:hover, &:focus-within { c: 0 bg5 }
}
+w('', '-menu') {
c: red bg5 bg2
+w('', '-option') { &:hover { c: 0 0 bg3 }}
.css-1ba14n5-option { c: 0 0 bg4 }
}
}
// Guilds.
+w('', 'wrapper-' 'guilds-', i: '') {
/// Use theme colors.
+w('', 'scroller-') {
c: 0 0 bg3
b: inset -1px 0 bg5 i
/// Feat -> Hide 'Download Apps' button.
if hide_dl_btn {
+w('>', 'listItem-') {
&:nth-last-child(-1n+3) { display: none i }
}
}
}
/// Home item.
+w('', 'listItem-' 'wrapper') {
+w('', 'childWrapper-') { c: fg3 }
+w('&', 'selected-') {
+w('', 'childWrapper-') { c: white 0 ac2 }
}
}
/// Feat -> Minimize guild area width.
if (g_minimize) {
@media screen and (max-width: g_minimize_w) {
transition: 0.3s cubic-bezier(0, 0, 0.2, 1)
max-width: 10px
/// Expand hover region.
overflow: unset i
> * { z-index: 9 i }
&::after {
P(0 -15px 0 0, 8)
// opacity: 0.5
// c: 0 0 ac1
}
/// Expand guilds area on hover.
&:hover {
max-width: (g_icons_s + 20px)
transition-delay: 0.6s
}
}
}
/// Feat -> Smaller guild icons.
if (g_icons) {
$size = g_icons_s
width: ($size + 20px)
/// Mentions bar.
+w('', 'nreadMentions' 'bar', i: '') { width: $size }
/// Dividers.
+w('', 'Separator-') {
width: $size
c: 0 0 bg5
}
/// DM icons.
div[style*='height: 56px'] {
margin-bottom: 8px
height: $size i
}
/// Icons.
+w('', 'listItem-') {
padding-left: 10px
justify-content: flex-start
/// Unread indicators.
+w('>', 'pill-') {
height: $size
/// Guild placeholder icon.
+ div > [draggable = 'false'] svg {
width: $size i
height: $size i
div { c: 0 0 bg5 }
}
}
/// 1: Home icon.
/// 2: Guild icons.
+w('', 'listItemWrapper-' 'blobContainer-') {
+w('>', 'wrapper-') { width: $size; height: $size }
+w('', 'svg-') { width: $size; height: $size }
+w('', 'Badge-') {
r: 50% i
b: 0 0 0 3px bg3
}
}
/// Folder icons.
> [draggable] {
--background-primary: bg5 // Folder placeholders.
+w('>', 'wrapper-') { &, ../ { width: $size; height: $size i }}
svg { width: $size; height: $size }
+w('', 'Badge-') {
r: 50% i
b: 0 0 0 3px bg3
}
}
/// Expanded folders.
+a(expandedFolderBackground-, i: '/') {
width: $size
left: 10px i
r: 16px i
/// Add borders to expanded folders.
&:not([class*='collapsed']) { b: 0 0 0 2px bg4 }
/// Reset list height.
~ [style*='height'] {
height: unset i
padding-bottom: 1px
}
}
}
}
/// Feat -> Compact mode.
if (compact == 'guilds' || compact == 'both') {
@media screen and (max-width: compact_w) {
display: none i
+w('+', 'base-') { left: 0px i }
}
}
}
// Sidebar.
/// NOTE: Excludes user settings.
:not([class*='Region']) {
+w('>', 'sidebar-') {
border-right: 1px solid bg5 i
/// User status menu.
+w('', 'panels-') {
border-top: 1px solid bg5 i
/// Popouts -> Status menu.
+a(menu-, i: '/') { border: 1px solid bg5 i }
}
/// Main/friends area.
+w('+', 'container-') {
c: 0 0 bg1
/// Header.
+w('>', 'container-') {
c: 0 0 bg2
b: 0 1px bg5
}
/// 'Now playing' sidebar.
+w('', 'nowPlaying') { b: inset 1px 0 bg5 i }
}
/// Guild notifications.
+w('', 'bar-') {
c: fg1 0 bg3
b: inner, bsh i
+w('&', 'mention-') {
c: white 0 ac1
b: bsh i
}
}
/// Feat -> Small sidebar mode.
if (sb_short) {
@media screen and (max-width: sb_short_w) {
transition: 0.3s cubic-bezier(0, 0, 0.2, 1)
max-width: sb_short_s
/// Center user icon.
+w('', 'panels-' 'container-', i: 0) {
padding: 0 16px i
}
/// Expand on hover.
&:hover {
max-width: 240px
transition-delay: sb_short_d i
}
/// Remove extra stuff for channels.
+w('', 'wrapper-' 'content-') {
margin: 0
r: 0px
+w('', 'icon-' 'iconItem-') { display: none i }
}
/// Reset whitespace for category name.
+w('', 'containerDefault-' 'clickable-', i: 0) {
padding-left: 8px i
h2 { c: fg2 }
}
/// More compact bars.
+w('', 'unread-' 'bar-', i: '') {
margin: -8px -9px 0
padding: 8px
r: 0px
span { font-size: 10px i }
}
}
}
/// Feat -> Compact mode.
if (compact == 'sidebar' || compact == 'both') {
@media screen and (max-width: compact_w) {
display: none i
}
}
/// App -> Server discovery.
+w('+', 'pageWrapper-') {
c: 0 0 bg1
}
}
}
// Settings.
+w('', 'SidebarView-') {
+w('', 'sidebarRegion-') {
/// -> Add userstyle version.
nav > div:first-child::before {
padding: 16px 0
margin-bottom: 16px
content: '🌚 ' var(--note)
text-transform: initial
font-weight: 500
font-size: 16px
display: block
b: 0 1px bg5