-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstackoverflow-syntax-themes.user.css
178 lines (176 loc) · 6.39 KB
/
stackoverflow-syntax-themes.user.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
/* ==UserStyle==
@name StackOverflow Syntax Themes
@version 2.0.12
@description A Syntax theme switcher for StackOverflow and associated sites
@namespace StylishThemes
@author StylishThemes
@homepageURL https://github.com/StylishThemes/Feature-Override-Styles
@supportURL https://github.com/StylishThemes/Feature-Override-Styles/issues/new/choose
@updateURL https://github.com/StylishThemes/Feature-Override-Styles/raw/master/stackoverflow-syntax-themes.user.css
@license MIT
@var select syntaxTheme "Choose syntax theme" [
"Ambiance",
"Twilight",
"Custom"
]
@var color highlight-bg "Highlight background" #000c18
@var color highlight-color "Highlight color" #A5A2A2
@var color highlight-comment "Highlight comment" #5C5855
@var color highlight-punctuation "Highlight punctuation" #B5E4F4
@var color highlight-namespace "Highlight namespace" #E8BBD0
@var color highlight-attribute "Highlight attribute" #01A0E4
@var color highlight-literal "Highlight literal" #CDAB53
@var color highlight-variable "Highlight variable" #FDED02
@var color highlight-addition "Highlight addition" #01A252
@var color highlight-deletion "Highlight deletion" #DB2D20
@preprocessor stylus
==/UserStyle== */
i = !important
@-moz-document regexp("^https?://((chat|meta|es|ja|pt|ru)\\.)*stackoverflow\\.com.*"),
regexp("^https?:\/\/((?!area51)\w+\.)*?stackexchange\.com.*"),
regexp("^https?:\/\/stackoverflow.[^\.]*\.com.*"),
domain("serverfault.com"),
domain("superuser.com"),
domain("stackapps.com"),
domain("mathoverflow.net"),
domain("askubuntu.com") {
// teststststs ddsd
:root {
if syntaxTheme == "Ambiance" {
body, .theme-light__forced, body.theme-system,
:root code, :root .full-diff {
--highlight-bg: #202020 i
--highlight-color: #e6e1dc i
--highlight-comment: #555 i
--highlight-punctuation: #ffb795 i
--highlight-namespace: #eed1b3 i
--highlight-attribute: #9b859d i
--highlight-literal: #b5ab9c i
--highlight-symbol: #f07746 i
--highlight-keyword: #cf7ea9 i
--highlight-variable: #eed1b3 i
--highlight-addition: #4e9a06 i
--highlight-deletion: #df382c i
}
.s-prose :not(.s-code-block) > code,
pre[class*="lang"] {
color: var(--highlight-color)
background-color: var(--highlight-bg) i
}
code, .full-diff {
background-color: var(--highlight-bg)
}
.comment-text code {
color: var(--highlight-color)
}
span.diff-delete, .suggested-edit .deleted, .markdown-diff .deleted {
background-color: var(--highlight-deletion)
color: lighten(#df382c, 60%)
}
#revisions .markdown-diff .full-diff .deleted > div {
background-color: darken(#df382c, 50%)
}
#revisions .markdown-diff .full-diff .inserted > div {
background-color: darken(#4e9a06, 60%)
}
.full-diff .inserted > div, span.diff-add {
background-color: var(--highlight-addition)
}
span.diff-add {
background-color: var(--highlight-addition)
color: darken(#4e9a06, 50%)
}
}
else if syntaxTheme == "Twilight" {
body, .theme-light__forced, body.theme-system,
:root code, :root .full-diff {
--highlight-bg: #141414 i
--highlight-color: #f7f7f7 i
--highlight-comment: #777 i
--highlight-punctuation: #ddf2a4 i
--highlight-namespace: #fc0 i
--highlight-attribute: #d6bb6d i
--highlight-literal: #CA7840 i
--highlight-symbol: #f7f7f7 i
--highlight-keyword: #f9ee98 i
--highlight-variable: #7587a6 i
--highlight-addition: #253B22 i
--highlight-deletion: #420E09 i
}
.s-prose :not(.s-code-block) > code,
pre[class*="lang"] {
color: var(--highlight-color)
background-color: var(--highlight-bg) i
}
code, .full-diff {
background-color: var(--highlight-bg)
}
.comment-text code {
color: var(--highlight-color)
}
span.diff-delete, .suggested-edit .deleted, .markdown-diff .deleted {
background-color: var(--highlight-deletion)
color: lighten(#420E09, 60%)
}
#revisions .markdown-diff .full-diff .deleted > div {
background-color: darken(#420E09, 50%)
}
#revisions .markdown-diff .full-diff .inserted > div {
background-color: darken(#253B22, 50%)
}
.full-diff .inserted > div, span.diff-add {
background-color: var(--highlight-addition)
}
span.diff-add {
background-color: var(--highlight-addition)
color: lighten(#8F9D6A, 20%)
}
}
else if syntaxTheme == "Custom" {
body, .theme-light__forced, body.theme-system,
body.unified-theme,
:root code, :root .full-diff {
--highlight-bg: highlight-bg i
--highlight-color: highlight-color i
--highlight-comment: highlight-comment i
--highlight-punctuation: highlight-punctuation i
--highlight-namespace: highlight-namespace i
--highlight-attribute: highlight-attribute i
--highlight-literal: highlight-literal i
--highlight-symbol: highlight-symbol i
--highlight-keyword: highlight-keyword i
--highlight-variable: highlight-variable i
--highlight-addition: highlight-addition i
--highlight-deletion: highlight-deletion i
}
.s-prose :not(.s-code-block) > code,
pre[class*="lang"] {
color: var(--highlight-color)
background-color: var(--highlight-bg) i
}
code, .full-diff {
background-color: var(--highlight-bg)
}
.comment-text code {
color: var(--highlight-color)
}
span.diff-delete, .suggested-edit .deleted, .markdown-diff .deleted {
background-color: var(--highlight-deletion)
color: lighten(highlight-deletion, 60%)
}
#revisions .markdown-diff .full-diff .deleted > div {
background-color: darken(highlight-deletion, 50%)
}
#revisions .markdown-diff .full-diff .inserted > div {
background-color: darken(highlight-addition, 50%)
}
.full-diff .inserted > div, span.diff-add {
background-color: var(--highlight-addition)
}
span.diff-add {
background-color: darken(highlight-addition, 30%)
color: lighten(highlight-color, 20%)
}
}
}
}