]> git.sev.monster Git - nightshift.git/blame_incremental - nightshift.css
(no commit message)
[nightshift.git] / nightshift.css
... / ...
CommitLineData
1/* original:
2 | NIGHTSHIFT - eye care: |
3 | A darkening style for all websites. |
4 | by vetinari - 2009 |
5 | contact: vetinari.userstyles@inode.at |
6 | --------------------------------------- |
7 | last modified: 13.06.2012 |
8 |_________________________________________|
9
10edited by ds6
11changes:
12 - colors ported to variables, solarized theme added
13 - lightbox image fix
14 - youtube support
15 - compatibility with vTabs Chrome extension (not tested recently)
16 - fixed some nested elements being miscolored
17 - fixed some images and icons being removed when they shouldn't
18 (note: it's still pretty aggressive)
19 - added bootstrap btn support
20 - fixed and modified themed inputs, other rules overwrote them
21 - fixed pre, code, cite styles, they were also overwritten
22 - added google search fixes
23 - fixed striped tables and simplified detection for better coloring
24*/
25
26/* uncomment for firefox userStyle.css, webkit * /
27@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(ftp://), url-prefix(file://), url-prefix(luakit:) {
28/* */
29
30/* set up colors */
31:root {
32 /* solarized colors, changed values have commented originals above them
33 S_base3 and all colors except yellow, orange, and violet are not used */
34 /*--S_base03: #002b36;*/
35 --S_base03: #000a0d;
36 --S_base02: #073642;
37 --S_base01: #586e75;
38 --S_base00: #657b83;
39 --S_base0: #839496;
40 --S_base1: #93a1a1;
41 --S_base2: #eee8d5;
42 --S_base3: #fdf6e3;
43
44 --S_yellow: #b58900;
45 --S_orange: #cb4b16;
46 --S_red: #dc322f;
47 --S_magenta: #d33682;
48 --S_violet: #6c71c4;
49 --S_blue: #268bd2;
50 --S_cyan: #2aa198;
51 /*--S_green: #859900;*/
52 --S_green: #85c000;
53
54 /* these colors are similar to the original NightShift * /
55 --S_base03: #111;
56 --S_base02: #383838;
57 --S_base01: #666;
58 --S_base00: #60666a;
59 --S_base0: #c0c0c0;
60 --S_base1: #a98;
61 --S_base2: #ccc;
62
63 --S_yellow: #B6AA7B;
64 --S_orange: #EC8;
65 --S_violet: #75A;
66 /* */
67
68 /* background colors for elem depth, a subset of my base03 to base02 */
69 --S_base02_2: #02151a;
70 --S_base02_1: #042028;
71 --S_base02_0: #052b35;
72 /* */
73
74 /* and for original NightShift * /
75 --S_base02_2: #222;
76 --S_base02_1: #282828;
77 --S_base02_0: #333;
78 /* */
79
80 /* changeable colors */
81 --ns_link: var(--S_yellow);
82 --ns_visited: var(--S_violet);
83 --ns_linkhover: var(--S_orange);
84 --ns_btnshine: #404040;
85 --ns_btnshade: #;
86}
87
88/* globally set default colors and remove shadows */
89body,
90/* fix: google */
91body *:not([class="mn-dwn-arw"]) {
92 color: var(--S_base0) !important;
93 border-color: var(--S_base00) !important;
94 box-shadow: none !important;
95}
96
97/* tiered background color for depth */
98html,
99body,
100body>*:empty {
101 background-color: var(--S_base03) !important;
102}
103body>*:not(:empty),
104body>*>*:not(:empty)
105{
106 background-color: var(--S_base02_2) !important;
107}
108body>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark),
109body>*>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark),
110/* fix: google */
111body>#searchform>div.sfbg.nojsv * {
112 background-color: var(--S_base02_1) !important;
113}
114body>*>*>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark) {
115 background-color: var(--S_base02_0) !important;
116}
117/* note: checking ':empty' overrides some other options, at least on webkit
118 it doesn't seem to impact much so I decided to leave it out */
119body>*>*>*>*>* *:not(b):not(i):not(u):not(strong):not(em):not(mark) {
120 background-color: var(--S_base02) !important;
121}
122/* striped tables */
123body table:not(:empty) {
124 background-color: var(--S_base02_1) !important;
125}
126body table>tbody>tr>th {
127 background-color: rgba(0, 0, 0, 0.5) !important;
128}
129body table>tbody>tr:nth-child(even)>td:not([rowspan]) {
130 background-color: rgba(0, 0, 0, 0.25) !important;
131}
132body table>tbody>tr>td[rowspan] {
133 background-color: rgba(0, 0, 0, 0.1) !important;
134}
135
136/* remove backgrounds from headers */
137body h1,
138body h1 *,
139body h2,
140body h2 *,
141body h3,
142body h3 *,
143body h4,
144body h4 *,
145body h5,
146body h5 *,
147body h6,
148body h6 * {
149 background: transparent none !important;
150}
151/* remove background images from non-interactable and non-image elements
152 fix: youtube */
153*:not(:empty):not([onclick]):not(a):not(input):not(textarea):not(select):not(button):not(img):not(pre):not(code):not(cite):not(.ytp-menuitem-content) {
154 background-image: none !important;
155 text-indent: 0 !important;
156}
157
158/* colored headers and important text */
159body h1,
160body h1 *,
161body h2,
162body h2 *,
163body h3,
164body h3 *,
165body h4,
166body h4 *,
167body b,
168body i,
169body u,
170body strong,
171body em,
172body mark {
173 color: var(--S_base2) !important;
174}
175
176/* styled horizontal rules */
177body hr {
178 background: var(--S_base01) none !important;
179 color: var(--S_base01) !important;
180 border: 1px solid var(--S_base01) !important;
181 height: 1px !important;
182 overflow: hidden !important;
183 display: block !important;
184}
185
186/* style links */
187body a:not([role="button"]),
188body a:not([role="button"]) *:not(button),
189body *[onclick]:not(input):not(button) {
190 color: var(--ns_link) !important;
191}
192body a:not([role="button"]):visited,
193body a:not([role="button"]):visited *:not(input):not(button) {
194 color: var(--ns_visited) !important;
195}
196body a:not([role="button"]):hover,
197body a:not([role="button"]):hover *:not(input):not(button),
198body *[onclick]:not(input):not(button):hover {
199 color: var(--ns_linkhover) !important;
200 text-decoration: underline !important;
201}
202
203/* transparent images */
204body a:has(img) {
205 background-color: transparent;
206}
207body * img,
208body input[type="image"],
209body *[onclick]:empty:not(input):not(button),
210body a:empty,
211body span:empty {
212 opacity: 0.5 !important;
213}
214body * img:hover,
215body a:hover img,
216body input[type="image"]:hover,
217body *[onclick]:empty:not(input):not(button):hover,
218body a:empty:hover,
219body span:empty:hover ,
220body span:hover img {
221 opacity: 1 !important;
222}
223
224/* style input elements + fix: bootstrap */
225body input,
226body textarea,
227body select,
228body button,
229body .btn,
230body a[role="button"] {
231 color: var(--S_base1) !important;
232 border-radius: 4px !important;
233 border-width: 1px !important;
234 border-color: rgba(100, 100, 100, 0.5) !important;
235 border-style: solid !important;
236 background: -webkit-linear-gradient(top, var(--S_base02_0), var(--S_base02_1) 40%, var(--S_base02)) !important;
237 box-shadow: inset 1px 1px 1px var(--S_base03) !important;
238}
239body input[type="submit"],
240body input[type="button"],
241body input[type="image"],
242body input[type="reset"],
243body button,
244body .btn,
245body a[role="button"] {
246 background: -webkit-linear-gradient(top, var(--ns_btnshine) 10%, var(--S_base02_1) 55%) !important;
247 box-shadow: 1px 1px 1px var(--S_base03) !important;
248}
249/* hover */
250body input:hover,
251body textarea:hover,
252body select:hover,
253body button:hover,
254body .btn:hover,
255body a[role="button"]:hover {
256 color: var(--S_base2) !important;
257 background: -webkit-linear-gradient(top, var(--S_base02), var(--S_base02_0) 40%, var(--ns_btnshine)) !important;
258}
259body input[type="submit"]:hover,
260body input[type="button"]:hover,
261body input[type="image"]:hover,
262body input[type="reset"]:hover,
263body button:hover,
264body .btn:hover,
265body a[role="button"]:hover {
266 background: -webkit-linear-gradient(top, var(--ns_btnshine) 30%, var(--S_base02_0) 70%) !important;
267}
268/* clicked */
269body input[type="submit"]:active,
270body input[type="button"]:active,
271body input[type="image"]:active,
272body input[type="reset"]:active,
273body button:active,
274body .btn:active,
275body a[role="button"]:active {
276 background: -webkit-linear-gradient(top, var(--S_base02) 5%, var(--S_base02_2) 75%, var(--S_base02_1)) !important;
277}
278
279/* style unique elements */
280pre:not(:empty),
281code:not(:empty),
282cite:not(:empty),
283blockquote:not(:empty) {
284 background-image: url(data:image/gif;base64,R0lGODlhBAAEAIAAABERESIiIiH5BAAAAAAALAAAAAAEAAQAAAIGTACXaHkFADs=) !important;
285 background-size: initial !important;
286 color: var(--S_base1) !important;
287}
288pre:not(:empty) *,
289code:not(:empty) *,
290cite:not(:empty) *,
291blockquote:not(:empty) * {
292 background: transparent none !important;
293}
294
295/* fix: lightbox */
296body #lightbox .lb-image {
297 opacity: 1 !important;
298}
299body #lightbox .lb-nav {
300 background: transparent none !important;
301}
302
303/* fix: vtabs */
304body .v-tabs-panel .v-tabs-item-active,
305body .v-tabs-panel .v-tabs-item-active * {
306 background-color: var(--S_base02_2) !important;
307}
308
309/* fix: youtube */
310body .ytp-title,
311body .ytp-title *,
312body .ytp-chrome-top,
313body .ytp-chrome-top-buttons,
314body .ytp-progress-bar-container,
315body .ytp-progress-bar,
316body .ytp-progress-bar-padding,
317body .ytp-scrubber-container,
318body .ytp-preview,
319body .ytp-tooltip-text-wrapper,
320body .caption-window * {
321 background: transparent none !important;
322}
323body .caption-window {
324 background: rgba(0, 0, 0, 0.5) !important;
325}
326body .ytp-menuitem[aria-checked="false"] .ytp-menuitem-toggle-checkbox {
327 background: var(--S_base00) none !important;
328}
329body .ytp-menuitem[aria-checked="true"] .ytp-menuitem-toggle-checkbox {
330 background: var(--S_base1) none !important;
331}
332body .ytp-swatch-background-color, body .ytp-volume-slider-handle {
333 background: var(--S_base1) none !important;
334}
335body .ytp-swatch-background-color-secondary {
336 background: var(--S_base2) none !important;
337}
338body .ytp-load-progress {
339 background: var(--S_base00) none !important;
340}
341body .ytp-hover-progress {
342 background: rgba(0, 0, 0, 0.5) none !important;
343}
344body .ytp-gradient-top,
345body .ytp-gradient-bottom {
346 visibility: hidden;
347}
348body .video-annotations .annotation {
349 background: rgba(0, 0, 0, 0.2) none !important;
350}
351
352/* * /
353}
354/* */
355
356/* vim: set sts=4 sw=4 et: */
This page took 0.032722 seconds and 4 git commands to generate.