]> git.sev.monster Git - nightshift.git/blame - nightshift.css
(no commit message)
[nightshift.git] / nightshift.css
CommitLineData
57648ac9 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
7ba67014 26/* uncomment for firefox userStyle.css and some webkit implementations * /
57648ac9 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;
57648ac9 85}
86
87/* globally set default colors and remove shadows */
88body,
7ba67014 89/* fix: google
90 XXX: overrides some element colors we set later, eg headers
91 removing this fix also allows some site styles to override ours */
92body * { /* :not([class="mn-dwn-arw"]) { /* */
57648ac9 93 color: var(--S_base0) !important;
94 border-color: var(--S_base00) !important;
95 box-shadow: none !important;
96}
97
98/* tiered background color for depth */
99html,
100body,
101body>*:empty {
102 background-color: var(--S_base03) !important;
103}
104body>*:not(:empty),
105body>*>*:not(:empty)
106{
107 background-color: var(--S_base02_2) !important;
108}
109body>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark),
110body>*>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark),
111/* fix: google */
112body>#searchform>div.sfbg.nojsv * {
113 background-color: var(--S_base02_1) !important;
114}
115body>*>*>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark) {
116 background-color: var(--S_base02_0) !important;
117}
118/* note: checking ':empty' overrides some other options, at least on webkit
119 it doesn't seem to impact much so I decided to leave it out */
120body>*>*>*>*>* *:not(b):not(i):not(u):not(strong):not(em):not(mark) {
121 background-color: var(--S_base02) !important;
122}
123/* striped tables */
124body table:not(:empty) {
125 background-color: var(--S_base02_1) !important;
126}
127body table>tbody>tr>th {
128 background-color: rgba(0, 0, 0, 0.5) !important;
129}
130body table>tbody>tr:nth-child(even)>td:not([rowspan]) {
131 background-color: rgba(0, 0, 0, 0.25) !important;
132}
133body table>tbody>tr>td[rowspan] {
134 background-color: rgba(0, 0, 0, 0.1) !important;
135}
136
137/* remove backgrounds from headers */
138body h1,
139body h1 *,
140body h2,
141body h2 *,
142body h3,
143body h3 *,
144body h4,
145body h4 *,
146body h5,
147body h5 *,
148body h6,
149body h6 * {
150 background: transparent none !important;
151}
152/* remove background images from non-interactable and non-image elements
153 fix: youtube */
154*: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) {
155 background-image: none !important;
156 text-indent: 0 !important;
157}
158
159/* colored headers and important text */
160body h1,
161body h1 *,
162body h2,
163body h2 *,
164body h3,
165body h3 *,
166body h4,
167body h4 *,
168body b,
169body i,
170body u,
171body strong,
172body em,
173body mark {
174 color: var(--S_base2) !important;
175}
176
177/* styled horizontal rules */
178body hr {
179 background: var(--S_base01) none !important;
180 color: var(--S_base01) !important;
181 border: 1px solid var(--S_base01) !important;
182 height: 1px !important;
183 overflow: hidden !important;
184 display: block !important;
185}
186
187/* style links */
188body a:not([role="button"]),
189body a:not([role="button"]) *:not(button),
190body *[onclick]:not(input):not(button) {
191 color: var(--ns_link) !important;
192}
193body a:not([role="button"]):visited,
194body a:not([role="button"]):visited *:not(input):not(button) {
195 color: var(--ns_visited) !important;
196}
197body a:not([role="button"]):hover,
198body a:not([role="button"]):hover *:not(input):not(button),
199body *[onclick]:not(input):not(button):hover {
200 color: var(--ns_linkhover) !important;
201 text-decoration: underline !important;
202}
203
204/* transparent images */
205body a:has(img) {
206 background-color: transparent;
207}
208body * img,
209body input[type="image"],
210body *[onclick]:empty:not(input):not(button),
211body a:empty,
212body span:empty {
213 opacity: 0.5 !important;
214}
215body * img:hover,
216body a:hover img,
217body input[type="image"]:hover,
218body *[onclick]:empty:not(input):not(button):hover,
219body a:empty:hover,
220body span:empty:hover ,
221body span:hover img {
222 opacity: 1 !important;
223}
224
225/* style input elements + fix: bootstrap */
226body input,
227body textarea,
228body select,
229body button,
230body .btn,
231body a[role="button"] {
232 color: var(--S_base1) !important;
233 border-radius: 4px !important;
234 border-width: 1px !important;
235 border-color: rgba(100, 100, 100, 0.5) !important;
236 border-style: solid !important;
237 background: -webkit-linear-gradient(top, var(--S_base02_0), var(--S_base02_1) 40%, var(--S_base02)) !important;
238 box-shadow: inset 1px 1px 1px var(--S_base03) !important;
239}
240body input[type="submit"],
241body input[type="button"],
242body input[type="image"],
243body input[type="reset"],
244body button,
245body .btn,
246body a[role="button"] {
247 background: -webkit-linear-gradient(top, var(--ns_btnshine) 10%, var(--S_base02_1) 55%) !important;
248 box-shadow: 1px 1px 1px var(--S_base03) !important;
249}
250/* hover */
251body input:hover,
252body textarea:hover,
253body select:hover,
254body button:hover,
255body .btn:hover,
256body a[role="button"]:hover {
257 color: var(--S_base2) !important;
258 background: -webkit-linear-gradient(top, var(--S_base02), var(--S_base02_0) 40%, var(--ns_btnshine)) !important;
259}
260body input[type="submit"]:hover,
261body input[type="button"]:hover,
262body input[type="image"]:hover,
263body input[type="reset"]:hover,
264body button:hover,
265body .btn:hover,
266body a[role="button"]:hover {
267 background: -webkit-linear-gradient(top, var(--ns_btnshine) 30%, var(--S_base02_0) 70%) !important;
268}
269/* clicked */
270body input[type="submit"]:active,
271body input[type="button"]:active,
272body input[type="image"]:active,
273body input[type="reset"]:active,
274body button:active,
275body .btn:active,
276body a[role="button"]:active {
277 background: -webkit-linear-gradient(top, var(--S_base02) 5%, var(--S_base02_2) 75%, var(--S_base02_1)) !important;
278}
279
280/* style unique elements */
281pre:not(:empty),
282code:not(:empty),
283cite:not(:empty),
284blockquote:not(:empty) {
285 background-image: url(data:image/gif;base64,R0lGODlhBAAEAIAAABERESIiIiH5BAAAAAAALAAAAAAEAAQAAAIGTACXaHkFADs=) !important;
286 background-size: initial !important;
287 color: var(--S_base1) !important;
288}
289pre:not(:empty) *,
290code:not(:empty) *,
291cite:not(:empty) *,
292blockquote:not(:empty) * {
293 background: transparent none !important;
294}
295
296/* fix: lightbox */
297body #lightbox .lb-image {
298 opacity: 1 !important;
299}
300body #lightbox .lb-nav {
301 background: transparent none !important;
302}
303
304/* fix: vtabs */
305body .v-tabs-panel .v-tabs-item-active,
306body .v-tabs-panel .v-tabs-item-active * {
307 background-color: var(--S_base02_2) !important;
308}
309
310/* fix: youtube */
311body .ytp-title,
312body .ytp-title *,
313body .ytp-chrome-top,
314body .ytp-chrome-top-buttons,
315body .ytp-progress-bar-container,
316body .ytp-progress-bar,
317body .ytp-progress-bar-padding,
318body .ytp-scrubber-container,
319body .ytp-preview,
320body .ytp-tooltip-text-wrapper,
321body .caption-window * {
322 background: transparent none !important;
323}
324body .caption-window {
325 background: rgba(0, 0, 0, 0.5) !important;
326}
327body .ytp-menuitem[aria-checked="false"] .ytp-menuitem-toggle-checkbox {
328 background: var(--S_base00) none !important;
329}
330body .ytp-menuitem[aria-checked="true"] .ytp-menuitem-toggle-checkbox {
331 background: var(--S_base1) none !important;
332}
333body .ytp-swatch-background-color, body .ytp-volume-slider-handle {
334 background: var(--S_base1) none !important;
335}
336body .ytp-swatch-background-color-secondary {
337 background: var(--S_base2) none !important;
338}
339body .ytp-load-progress {
340 background: var(--S_base00) none !important;
341}
342body .ytp-hover-progress {
343 background: rgba(0, 0, 0, 0.5) none !important;
344}
345body .ytp-gradient-top,
346body .ytp-gradient-bottom {
347 visibility: hidden;
348}
349body .video-annotations .annotation {
350 background: rgba(0, 0, 0, 0.2) none !important;
351}
352
7ba67014 353/* uncomment for firefox, webkit * /
57648ac9 354}
355/* */
356
357/* vim: set sts=4 sw=4 et: */
This page took 0.064228 seconds and 4 git commands to generate.