2 | NIGHTSHIFT - eye care: |
3 | A darkening style for all websites. |
5 | contact: vetinari.userstyles@inode.at |
6 | --------------------------------------- |
7 | last modified: 13.06.2012 |
8 |_________________________________________|
12 - colors ported to variables, solarized theme added
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
26 /* uncomment for firefox userStyle.css and some webkit implementations * /
27 @-moz-document url-prefix(http://), url-prefix(https://), url-prefix(ftp://), url-prefix(file://), url-prefix(luakit:) {
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;*/
51 /*--S_green: #859900;*/
54 /* these colors are similar to the original NightShift * /
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;
74 /* and for original NightShift * /
76 --S_base02_1: #282828;
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;
87 /* globally set default colors and remove shadows */
90 XXX: overrides some element colors we set later, eg headers
91 removing this fix also allows some site styles to override ours */
92 body * { /* :not([class="mn-dwn-arw"]) { /* */
93 color: var(--S_base0) !important;
94 border-color: var(--S_base00) !important;
95 box-shadow: none !important;
98 /* tiered background color for depth */
102 background-color: var(--S_base03) !important;
107 background-color: var(--S_base02_2) !important;
109 body>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark),
110 body>*>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark),
112 body>#searchform>div.sfbg.nojsv * {
113 background-color: var(--S_base02_1) !important;
115 body>*>*>*>*>*:not(:empty):not(b):not(i):not(u):not(strong):not(em):not(mark) {
116 background-color: var(--S_base02_0) !important;
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 */
120 body>*>*>*>*>* *:not(b):not(i):not(u):not(strong):not(em):not(mark) {
121 background-color: var(--S_base02) !important;
124 body table:not(:empty) {
125 background-color: var(--S_base02_1) !important;
127 body table>tbody>tr>th {
128 background-color: rgba(0, 0, 0, 0.5) !important;
130 body table>tbody>tr:nth-child(even)>td:not([rowspan]) {
131 background-color: rgba(0, 0, 0, 0.25) !important;
133 body table>tbody>tr>td[rowspan] {
134 background-color: rgba(0, 0, 0, 0.1) !important;
137 /* remove backgrounds from headers */
150 background: transparent none !important;
152 /* remove background images from non-interactable and non-image elements
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;
159 /* colored headers and important text */
174 color: var(--S_base2) !important;
177 /* styled horizontal rules */
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;
188 body a:not([role="button"]),
189 body a:not([role="button"]) *:not(button),
190 body *[onclick]:not(input):not(button) {
191 color: var(--ns_link) !important;
193 body a:not([role="button"]):visited,
194 body a:not([role="button"]):visited *:not(input):not(button) {
195 color: var(--ns_visited) !important;
197 body a:not([role="button"]):hover,
198 body a:not([role="button"]):hover *:not(input):not(button),
199 body *[onclick]:not(input):not(button):hover {
200 color: var(--ns_linkhover) !important;
201 text-decoration: underline !important;
204 /* transparent images */
206 background-color: transparent;
209 body input[type="image"],
210 body *[onclick]:empty:not(input):not(button),
213 opacity: 0.5 !important;
217 body input[type="image"]:hover,
218 body *[onclick]:empty:not(input):not(button):hover,
220 body span:empty:hover ,
221 body span:hover img {
222 opacity: 1 !important;
225 /* style input elements + fix: bootstrap */
231 body 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;
240 body input[type="submit"],
241 body input[type="button"],
242 body input[type="image"],
243 body input[type="reset"],
246 body 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;
256 body 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;
260 body input[type="submit"]:hover,
261 body input[type="button"]:hover,
262 body input[type="image"]:hover,
263 body input[type="reset"]:hover,
266 body a[role="button"]:hover {
267 background: -webkit-linear-gradient(top, var(--ns_btnshine) 30%, var(--S_base02_0) 70%) !important;
270 body input[type="submit"]:active,
271 body input[type="button"]:active,
272 body input[type="image"]:active,
273 body input[type="reset"]:active,
276 body a[role="button"]:active {
277 background: -webkit-linear-gradient(top, var(--S_base02) 5%, var(--S_base02_2) 75%, var(--S_base02_1)) !important;
280 /* style unique elements */
284 blockquote:not(:empty) {
285 background-image: url(data:image/gif;base64,R0lGODlhBAAEAIAAABERESIiIiH5BAAAAAAALAAAAAAEAAQAAAIGTACXaHkFADs=) !important;
286 background-size: initial !important;
287 color: var(--S_base1) !important;
292 blockquote:not(:empty) * {
293 background: transparent none !important;
297 body #lightbox .lb-image {
298 opacity: 1 !important;
300 body #lightbox .lb-nav {
301 background: transparent none !important;
305 body .v-tabs-panel .v-tabs-item-active,
306 body .v-tabs-panel .v-tabs-item-active * {
307 background-color: var(--S_base02_2) !important;
313 body .ytp-chrome-top,
314 body .ytp-chrome-top-buttons,
315 body .ytp-progress-bar-container,
316 body .ytp-progress-bar,
317 body .ytp-progress-bar-padding,
318 body .ytp-scrubber-container,
320 body .ytp-tooltip-text-wrapper,
321 body .caption-window * {
322 background: transparent none !important;
324 body .caption-window {
325 background: rgba(0, 0, 0, 0.5) !important;
327 body .ytp-menuitem[aria-checked="false"] .ytp-menuitem-toggle-checkbox {
328 background: var(--S_base00) none !important;
330 body .ytp-menuitem[aria-checked="true"] .ytp-menuitem-toggle-checkbox {
331 background: var(--S_base1) none !important;
333 body .ytp-swatch-background-color, body .ytp-volume-slider-handle {
334 background: var(--S_base1) none !important;
336 body .ytp-swatch-background-color-secondary {
337 background: var(--S_base2) none !important;
339 body .ytp-load-progress {
340 background: var(--S_base00) none !important;
342 body .ytp-hover-progress {
343 background: rgba(0, 0, 0, 0.5) none !important;
345 body .ytp-gradient-top,
346 body .ytp-gradient-bottom {
349 body .video-annotations .annotation {
350 background: rgba(0, 0, 0, 0.2) none !important;
353 /* uncomment for firefox, webkit * /
357 /* vim: set sts=4 sw=4 et: */