Debian Codegraph @

resources/skins/solarized-dark/html_style.scss

raw
1 @charset "utf-8";
2
3 $qtbg-base: #2F3134 !default; // clr_basbg
4 $qtbg-button: #2C2D30 !default; // clr_altbg // button bg (scrollbar, alt bg)
5 $qcselbg: #647595 !default; // clr_selbg
6
7 // {{{ Emulate Fusion colour processing (dark only)
8
9 // Scrollbar colours
10
11 //$qcbgbg: lighten($qtbg-button, 6%); // See toolbar bg
12 $bgscroll: lighten($qtbg-button, 2%) !default; // track and corner bg
13 $tr-border: darken($qtbg-button, 4%) !default; // track brdr
14
15 // {{{ Scrollbar thumb
16
17 // Thumb bg gradient
18
19 // Normal
20 $thscrlin: lighten($qtbg-button, 6%) !default;
21 $thscrlout: lighten($qtbg-button, 4%) !default;
22
23 // Hover
24 $thscrlhvin: lighten($qtbg-button, 7%) !default;
25 $thscrlhvout: $thscrlout;
26
27 // Light outline
28 $th-border: lighten($qtbg-button, 15%) !default;
29
30 // }}}
31
32 // }}}
33
34 // {{{ HTML palette (Colours)
35
36 $cbg00: $qtbg-base;
37
38 // {{{ Irrelevant, because colour switcher (see below) overrides all fg colours (either with JS on or off)
39 $cfg00: #f5f5f5 !default;
40 $cfg10: #E2E2E2 !default;
41 $cfg11: $cfg10;
42 // }}}
43
44 $cbor2: #545556 !default;
45
46 $ccodeblock: rgba(33, 35, 39, 0.4) !default;
47 $ccode: $ccodeblock;
48 $cbor3: $tr-border;
49 $cmark: #f8d08c66 !default; // 40% transparency
50
51 $clink: $qcselbg;
52
53 // }}}
54
55 // Other
56
57 $radius-unit: .3em !default;
58
59 @import
60 "../nudus-base/html_style_base"
61 ;
62
63 //
64 // Dark CSS style has following additions:
65 //
66
67 // {{{ Border around viewport
68
69 // https://csswizardry.com/2010/12/simplified-page-borders-in-pure-css/
70
71 html::before,
72 html::after,
73 body::before,
74 body::after {
75 content: "";
76 background-color: $tr-border;
77 display: block;
78 position: fixed;
79 z-index: 5;
80 }
81
82 html::before {
83 height: 1px;
84 left: 0;
85 right: 0;
86 top: 0;
87 }
88
89 html::after {
90 width: 1px;
91 top: 0;
92 right: 0;
93 bottom: 0;
94 }
95
96 body::before {
97 height: 1px;
98 right: 0;
99 bottom: 0;
100 left: 0;
101 }
102
103 body::after {
104 width: 1px;
105 top: 0;
106 bottom: 0;
107 left: 0;
108 }
109
110 // }}}
111
112 // {{{ Dark-coloured scrollbar
113
114 ::-webkit-scrollbar {
115 height: 13px;
116 width: 14px;
117 }
118
119 ::-webkit-scrollbar-track,
120 ::-webkit-scrollbar-corner {
121 background-color: $bgscroll;
122 box-shadow: inset 1px 1px lighten($tr-border, 4%);
123 }
124
125 // Part where vertical and horizontal scrollbars meet
126 ::-webkit-scrollbar-corner {
127 border-radius: 0 0 $radius-unit 0;
128 }
129
130 // TODO: Can be simplified to @include and function
131 $th-outline:
132 inset 1px 1px $th-border,
133 inset -1px -1px $th-border,
134
135 inset 0px 1px $th-border,
136 inset 0px -1px $th-border,
137
138 inset 1px 0px $th-border,
139 inset 1px -1px $th-border,
140
141 inset -1px 0px $th-border,
142 inset -1px 1px $th-border
143 ;
144
145 ::-webkit-scrollbar-thumb {
146 $th-min-unit: 25px;
147 box-shadow: $th-outline;
148
149 &:horizontal {
150 background-image: linear-gradient($thscrlin 5%, $thscrlout);
151 min-width: $th-min-unit;
152
153 &:hover {
154 background-image: linear-gradient($thscrlhvin 25%, $thscrlhvout);
155 }
156 }
157
158 &:vertical {
159 background-image: linear-gradient(to right, $thscrlin 5%, $thscrlout);
160 min-height: $th-min-unit;
161
162 &:hover {
163 background-image: linear-gradient(to right, $thscrlhvin 25%, $thscrlhvout);
164 }
165 }
166
167 &:active {
168 background-image: linear-gradient($thscrlout, $thscrlout) !important;
169 }
170 }
171
172 // Light and dark borders to outline the thumb
173 // Clockwise (x y)
174 :not(body)::-webkit-scrollbar-thumb {
175
176 &:horizontal {
177 box-shadow:
178 $th-outline,
179 1px 0px $tr-border,
180 1px 1px $tr-border,
181 -1px 1px $tr-border,
182 -1px 0px $tr-border
183 ;
184 }
185
186 &:vertical {
187 box-shadow:
188 $th-outline,
189 0px -1px $tr-border,
190 1px -1px $tr-border,
191 1px 1px $tr-border,
192 0px 1px $tr-border
193 ;
194 }
195 }
196
197 ::-webkit-scrollbar-thumb,
198 ::-webkit-scrollbar-track {
199
200 &:horizontal {
201 border-top: 1px solid $tr-border;
202 }
203
204 &:vertical {
205 border-left: 1px solid $tr-border;
206 }
207 }
208
209 // Complete the borders for body scrollbar
210 body::-webkit-scrollbar-thumb,
211 body::-webkit-scrollbar-track {
212
213 &:horizontal,
214 &:vertical {
215 border: 1px solid $tr-border;
216 }
217
218 &:horizontal {
219 border-top: none;
220 }
221
222 &:vertical {
223 border-left: none;
224 }
225 }
226
227 body::-webkit-scrollbar-corner {
228 border: 1px solid $tr-border;
229 border-top: none;
230 border-left: none;
231 }
232
233 ::-webkit-scrollbar-track,
234 ::-webkit-scrollbar-thumb {
235
236 &:corner-present {
237
238 &:horizontal {
239 border-radius: 0 0 0 $radius-unit;
240 }
241
242 &:vertical {
243 border-radius: 0 $radius-unit 0 0;
244 }
245 }
246
247 &:horizontal {
248 border-radius: 0 0 $radius-unit $radius-unit;
249 }
250
251 &:vertical {
252 border-radius: 0 $radius-unit $radius-unit 0;
253 }
254 }
255
256 // }}}
257
258 // {{{ Fg colour switcher
259
260 // Thank you so much!!
261 // https://css-tricks.com/switch-font-color-for-different-backgrounds-with-css/
262
263 /* Please enable JS for additional colouring features */
264 :root {
265 // Default RGB values for background colour
266 --rssguard-red: 0;
267 --rssguard-green: 0;
268 --rssguard-blue: 0;
269 // The threshold at which colours are considered "light
270 // Range: decimals from 0 to 1, recommended 0.5 - 0.6
271 --rssguard-threshold: 0.5;
272 }
273
274 :root {
275 // Calculates perceived lightness using the sRGB Luma method
276 // Luma = (red * 0.2126 + green * 0.7152 + blue * 0.0722) / 255
277 --rssguard-r: calc(var(--rssguard-red) * 0.2126);
278 --rssguard-g: calc(var(--rssguard-green) * 0.7152);
279 --rssguard-b: calc(var(--rssguard-blue) * 0.0722);
280 --rssguard-sum:
281 calc(
282 var(--rssguard-r) +
283 var(--rssguard-g) +
284 var(--rssguard-b)
285 );
286 --rssguard-perceived-lightness: calc(var(--rssguard-sum) / 255);
287 }
288
289 // Shows either white or black colour depending on perceived lightness
290 body,
291 ::selection,
292 mark, code, pre, pre > code,
293 blockquote, blockquote p { // TODO: why did not I add 'blockquote p' here before?
294 color:
295 hsla(
296 0,
297 0%,
298 calc(
299 (
300 var(--rssguard-perceived-lightness) -
301 var(--rssguard-threshold)
302 ) *
303 -10000000%
304 ),
305 .9
306 );
307 }
308 // }}}
309 // vim:foldmethod=marker