GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — gdark/darkbox.css at main · texjer/gdark Expand file tree/ Copy pathdarkbox.cssMore file actions 496 lines (474 loc) · 18.7 KB / Copy pathdarkbox.cssFile metadata and controls496 lines (474 loc) · 18.7 KB 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 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 /* Gmail DarkBox — darkens the reading-pane card (div.nH.a98.iY), plus the rest * of the page on light themes (html.gdb-light, set by content.js). * * Every rule is scoped under html.gdark, which gate.js toggles according * to the user's mode (always / scheduled / follow system / off). With the * class absent this stylesheet is inert, so switching is instant and * needs no reload. * * Strategy: the card and Gmail's own chrome inside it get explicit dark * colors; the email body (.a3s) — arbitrary sender HTML — gets * invert(1) hue-rotate(180deg), with images counter-inverted back to * normal. content.js tags emails that are already dark with * .gdb-no-invert so they aren't flipped to light. * * Gmail's obfuscated class names (iY, a3s, M9, J-Z, ...) have been * stable for years, but if Google renames them this file is the place * to update selectors. */ /* the white card, and the pop-up "New Message" compose window (bottom-right * dialog, div.nH.Hd). Both share the same inner compose markup (.M9, * .Am.editable, .J-Z, .afV ...), so every rule below is scoped to * :is(.iY, .nH.Hd) and applies to either. */ html.gdark .nH.a98.iY, html.gdark .nH.Hd { background-color: #1c1c21 !important; } /* compose window title bar ("New Message" / "Re: ...") and its title text. * Gmail paints the bar on .l.m — #f0f4f9, a faint blue, rounded 8px on top — * inside the square .Hy. Painting .Hy squared the dialog's top corners off, * so .Hy stays clear and .l.m gets a lifted slate with the same blue hint. */ html.gdark .nH.Hd .nH.Hy, html.gdark .nH.Hd .Hy { background-color: transparent !important; } html.gdark .nH.Hd .Hy .l.m { background-color: #2d323d !important; } html.gdark .nH.Hd .aYF, html.gdark .nH.Hd .Hp { color: #e6e6eb !important; } /* subject line and its placeholder */ html.gdark .nH.Hd .aoT { background-color: transparent !important; color: #e6e6eb !important; } html.gdark .nH.Hd .aoT::placeholder, html.gdark .nH.Hd .agP::placeholder { color: #a2a2ac !important; } /* bottom action row (Send, attach, link, emoji ...) — glyphs are dark * gstatic sprites, so lighten them like the formatting toolbar */ html.gdark .nH.Hd .a8X .wG, html.gdark .nH.Hd .a8X .J-Z-I { filter: invert(0.8); } html.gdark .nH.Hd .a8X .T-I-atl { /* keep the blue Send button un-inverted */ filter: none; } /* white bars inside the card: reply-button row, smart-reply row */ html.gdark :is(.iY, .nH.Hd) .nH, html.gdark :is(.iY, .nH.Hd) .nr.wR { background-color: transparent !important; } /* .aC2 / .aC3 are Gmail's opaque sheet behind the docked compose shelf — the * white that hides the reply body scrolling below the toolbar. Blanking them * let the inverted body show through under the shelf (its text legible in the * strip below the Send row), so they get painted the card color instead. */ html.gdark :is(.iY, .nH.Hd) .aC2, html.gdark :is(.iY, .nH.Hd) .aC3 { background-color: #1c1c21 !important; } /* .btDi4d is the same idea at the bottom of the card: an empty 68px * position:sticky strip, white on light, that masks the thread scrolling out * under the card's lower edge. The .nH blanket above made it transparent, so * smart-reply chips and separators showed through it; paint it too. */ html.gdark .iY .nH.btDi4d { background-color: #1c1c21 !important; } /* Gmail chrome text inside the card */ html.gdark :is(.iY, .nH.Hd) .hP, /* subject */ html.gdark :is(.iY, .nH.Hd) .gD, /* sender name */ html.gdark :is(.iY, .nH.Hd) .gH, html.gdark :is(.iY, .nH.Hd) .amn, html.gdark :is(.iY, .nH.Hd) h2 { color: #e6e6eb !important; } html.gdark :is(.iY, .nH.Hd) .go, /* sender email */ html.gdark :is(.iY, .nH.Hd) .g3, /* date */ html.gdark :is(.iY, .nH.Hd) .g2, html.gdark :is(.iY, .nH.Hd) .hb, html.gdark :is(.iY, .nH.Hd) .adx, html.gdark :is(.iY, .nH.Hd) .ams { /* Reply / Forward buttons */ color: #a2a2ac !important; } html.gdark :is(.iY, .nH.Hd) .gs { color: #d8d8de; } html.gdark :is(.iY, .nH.Hd) .ams { border-color: #5f5f6a !important; } /* the email body itself: invert whatever the sender styled. * The explicit light background is what the inversion turns dark — * without it, transparent bodies would invert against nothing. */ html.gdark :is(.iY, .nH.Hd) .a3s { filter: invert(1) hue-rotate(180deg); background-color: #e3e3e8; border-radius: 8px; } /* counter-invert real imagery so photos/logos look normal */ html.gdark :is(.iY, .nH.Hd) .a3s img, html.gdark :is(.iY, .nH.Hd) .a3s video, html.gdark :is(.iY, .nH.Hd) .a3s [style*="background-image"] { filter: invert(1) hue-rotate(180deg); } /* emails that are already dark (tagged by content.js) are left alone */ html.gdark :is(.iY, .nH.Hd) .a3s.gdb-no-invert, html.gdark :is(.iY, .nH.Hd) .a3s.gdb-no-invert img, html.gdark :is(.iY, .nH.Hd) .a3s.gdb-no-invert video, html.gdark :is(.iY, .nH.Hd) .a3s.gdb-no-invert [style*="background-image"] { filter: none; background-color: transparent; } /* inline reply / forward compose inside the card */ html.gdark :is(.iY, .nH.Hd) .M9, html.gdark :is(.iY, .nH.Hd) .aoI { background-color: transparent !important; color: #d8d8de; } html.gdark :is(.iY, .nH.Hd) .M9 :is(table, td):not(.Am.editable *) { background-color: transparent !important; } /* the editable body gets the same invert treatment as read emails, * so quoted content below the cursor matches what was read above */ html.gdark :is(.iY, .nH.Hd) .Am.editable { filter: invert(1) hue-rotate(180deg); background-color: #e3e3e8 !important; } html.gdark :is(.iY, .nH.Hd) .Am.editable img { filter: invert(1) hue-rotate(180deg); } /* expanded compose header: From / To / Cc / Bcc rows */ html.gdark :is(.iY, .nH.Hd) .M9 .agh, /* recipient area */ html.gdark :is(.iY, .nH.Hd) .M9 .aGb { /* recipient row bar */ background-color: transparent !important; } /* message-header icons, all matched to the reply/more gray (#a2a2ac): * - star: a dark gstatic sprite on span.T-KT::before — filter the span; * the starred state (T-KT-Jp) is yellow, leave it un-inverted * - "show details" dropdown arrow: dark sprite on img.ajz * - reply / reply-all / more / emoji buttons draw with currentColor, * so recoloring the button is enough */ html.gdark :is(.iY, .nH.Hd) .T-KT { filter: invert(0.8); } html.gdark :is(.iY, .nH.Hd) .T-KT.T-KT-Jp { filter: none; } html.gdark :is(.iY, .nH.Hd) .ajz { filter: invert(0.8); } html.gdark :is(.iY, .nH.Hd) button[class*="pYTkkf"] { color: #a2a2ac !important; } /* ...except the importance marker when it's on (.FqWqLc.bns): Gmail's yellow, * or blue for the .Uieduc variant — the gray above flattened it to "off" */ html.gdark :is(.iY, .nH.Hd) button.FqWqLc.bns { color: rgb(251, 188, 4) !important; } html.gdark :is(.iY, .nH.Hd) button.FqWqLc.bns.Uieduc { color: #8ab4f8 !important; } /* separators between messages in a conversation: Gmail's * rgba(100,121,143,0.12) border is invisible on dark */ html.gdark :is(.iY, .nH.Hd) .G3 { border-top-color: rgba(162, 162, 172, 0.5) !important; } /* "Show trimmed content" / quoted-text "⋯" pill — visible but not glaring; * the dots are a dark gstatic more_horiz image, so invert them light */ html.gdark :is(.iY, .nH.Hd) .ajR { background-color: #3a3a42 !important; } html.gdark :is(.iY, .nH.Hd) .ajT { filter: invert(0.8); } html.gdark :is(.iY, .nH.Hd) .M9 input { /* recipient + subject inputs */ background-color: transparent !important; color: #e6e6eb !important; } html.gdark :is(.iY, .nH.Hd) .M9 label.gO { /* "From" / "To" / "Cc" labels */ color: #a2a2ac !important; } html.gdark :is(.iY, .nH.Hd) .M9 .aB { /* "Cc" / "Bcc" toggle links */ color: #a2a2ac !important; } html.gdark :is(.iY, .nH.Hd) .M9 .az2 { /* From account selector */ border-color: #5f5f6a !important; } html.gdark :is(.iY, .nH.Hd) .M9 .az2, html.gdark :is(.iY, .nH.Hd) .M9 .az2 * { color: #d8d8de !important; } html.gdark :is(.iY, .nH.Hd) .M9 .agh, html.gdark :is(.iY, .nH.Hd) .M9 .agh span { /* collapsed recipient summary */ color: #d8d8de; } /* recipient chips */ html.gdark :is(.iY, .nH.Hd) .M9 .afV { background-color: #2f2f36 !important; border-color: #5f5f6a !important; } html.gdark :is(.iY, .nH.Hd) .M9 .afV, html.gdark :is(.iY, .nH.Hd) .M9 .afV * { color: #e6e6eb !important; } /* Google Chat documents (gate.js adds .gdb-chat): dark base — the sweep * in content.js dims every remaining white surface and lightens dark text */ html.gdark.gdb-chat, html.gdark.gdb-chat body { background-color: #1c1c21 !important; color: #d8d8de; color-scheme: dark; } /* text selection: the default highlight is too close to our dark * backgrounds (and inside inverted email bodies it gets inverted into * near-invisibility). Dark chrome and chat get an explicit blue; * inverted bodies get pre-inverted values that the filter turns into the * same blue. Not a light blue: a sender's dark box (an OTP code on * #111827) inverts to a light one, and a light highlight vanished on it. */ html.gdark :is(.iY, .nH.Hd, .J-M, .aM7) ::selection, html.gdark :is(.iY, .nH.Hd, .J-M, .aM7)::selection, html.gdark.gdb-chat ::selection, html.gdark.gdb-light ::selection { background-color: #3b5b8f !important; color: #f2f2f5 !important; } html.gdark :is(.iY, .nH.Hd) .a3s:not(.gdb-no-invert) ::selection, html.gdark :is(.iY, .nH.Hd) .a3s:not(.gdb-no-invert)::selection, html.gdark :is(.iY, .nH.Hd) .Am.editable ::selection, html.gdark :is(.iY, .nH.Hd) .Am.editable::selection { background-color: #8aaade !important; /* → #3b5b8f after invert + hue-rotate */ color: #0d0d10 !important; /* → #f2f2f5 */ } /* chat: the compose box (toolbar row + message field) is one slate * surface. Google tints its container with a ::before of blue at 8% * opacity — over our dark base that lands as a muddy navy — so content.js * tags that container .gdb-compose and the tint layer is repainted solid. * The textbox itself stays transparent so nothing breaks the surface. */ html.gdark.gdb-chat .gdb-compose::before { background-color: #323b50 !important; opacity: 1 !important; } html.gdark.gdb-chat [role="textbox"] { background-color: transparent !important; caret-color: #e3e3e8; } /* wrappers around the field that the sweep dimmed (Firefox paints the * field's own box) go transparent too — but only the field's own ancestor * chain (.gdb-field-wrap, tagged by content.js). Popups mounted inside the * same container (the "+" Workspace tools menu) keep their dimmed surface. */ html.gdark.gdb-chat .gdb-compose .gdb-field-wrap:is(.gdb-dim, .gdb-dim2) { background-color: transparent !important; } /* chat: Google's blue-600 (#0b57d0) text — smart-reply chips, "more * unread", links — is too intense on dark; content.js tags it and it gets * the blue Google itself uses on dark surfaces */ html.gdark.gdb-chat .gdb-blue { color: #8ab4f8 !important; } html.gdark.gdb-chat hr { border-color: #3f3f48 !important; background-color: #3f3f48 !important; } html.gdark.gdb-chat .gdb-border, html.gdark.gdb-light .gdb-border { border-color: #3f3f48 !important; } html.gdark.gdb-chat .gdb-svg, html.gdark.gdb-light .gdb-svg { filter: invert(0.75) hue-rotate(180deg); } /* generic sweep tags applied by content.js — inside the card, the compose * dialog, or a pop-up menu (.J-M lives under <body>): near-white * backgrounds get dimmed (two levels so hover/selected rows still read), * light ::before/::after state layers get dimmed via their host, and dark * text sitting on a dark background gets lightened */ html.gdark :is(.iY, .nH.Hd, .J-M, .aM7) .gdb-dim, html.gdark :is(.J-M, .aM7).gdb-dim, html.gdark.gdb-chat .gdb-dim, html.gdark.gdb-light .gdb-dim { background-color: #26262c !important; } html.gdark :is(.iY, .nH.Hd, .J-M, .aM7) .gdb-dim2, html.gdark :is(.J-M, .aM7).gdb-dim2, html.gdark.gdb-chat .gdb-dim2, html.gdark.gdb-light .gdb-dim2 { background-color: #34343c !important; } html.gdark :is(.iY, .nH.Hd, .J-M, .aM7) .gdb-dim-before::before, html.gdark :is(.iY, .nH.Hd, .J-M, .aM7) .gdb-dim-after::after, html.gdark.gdb-chat .gdb-dim-before::before, html.gdark.gdb-chat .gdb-dim-after::after, html.gdark.gdb-light .gdb-dim-before::before, html.gdark.gdb-light .gdb-dim-after::after { background-color: #3f3f48 !important; } html.gdark :is(.iY, .nH.Hd, .J-M, .aM7) .gdb-lighten, html.gdark.gdb-chat .gdb-lighten, html.gdark.gdb-light .gdb-lighten { color: #d8d8de !important; } /* ...and colored text that would lose its meaning if it were flattened to * gray (the amber "You were BCC'd" banner, warning reds, link blues) keeps * its hue: content.js computes the lightened value per element and hands it * over as --gdb-tint */ html.gdark :is(.iY, .nH.Hd, .J-M, .aM7) .gdb-tint, html.gdark :is(.J-M, .aM7).gdb-tint, html.gdark.gdb-chat .gdb-tint, html.gdark.gdb-light .gdb-tint { color: var(--gdb-tint) !important; } /* subject-line label chips: the remove "×" (.hO) is a ::before glyph with no * text node, so the sweep dims its half of the chip but never lightens it — * it stayed #444746 (or black) on the dark chip. Colored chips the sweep * leaves alone (the yellow "External") keep their own dark ×. */ html.gdark :is(.iY, .nH.Hd) .ahR .hO:is(.gdb-dim, .gdb-dim2) { color: #d8d8de !important; } /* Gmail pop-up menus (.J-M) — the sweep dims the white panel, but three * pieces need explicit rules, and the highlight has to be static: * - .J-N-JX / .J-N-Jo icons are gstatic gm3 sprites (background-image on * a spacer <img>), near-black glyphs that disappear on the dark panel * - .J-Kh separator is a 1px #ebebeb border-top — a glaring white rule * - .J-N-JT / .J-N-JW (hover / keyboard highlight) is #eee, which the * sweep WOULD dim — but the class it adds never comes off, so every row * the mouse crossed stayed lit and hover read as no feedback at all. * Painting it here keeps hover a state instead of a scar: the computed * background is already dark when the sweep looks, so no tag is added. * These rules sit after the sweep-tag block so they win specificity ties. */ html.gdark .J-M { background-color: #26262c !important; border-color: #3f3f48 !important; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important; } html.gdark .J-M .J-N, html.gdark .J-M .J-N .J-N-Jz { color: #e6e6eb !important; } html.gdark .J-M .J-N-JE .J-N-Jz, /* disabled items keep reading as disabled */ html.gdark .J-M .J-N-JE .J-N-atj { color: #6f6f7a !important; } html.gdark .J-M .J-N-JX, html.gdark .J-M .J-N-Jo { filter: invert(0.8); } html.gdark .J-M .J-N.J-N-JT, html.gdark .J-M .J-N.J-N-JW, html.gdark .J-M .J-N:hover { background-color: #3a3a44 !important; border-color: #3a3a44 !important; } html.gdark .J-M .J-Kh { border-top-color: #3f3f48 !important; } /* floating compose action shelf (toolbar + Send dock over the content * when you scroll a tall reply): its white backdrop is an ::after * pseudo-element on .aDj — pseudo-elements have no classList, so the * content.js sweep can never tag them; this must stay a static rule */ html.gdark :is(.iY, .nH.Hd) .aDj::after { background-color: #1c1c21 !important; } /* ...and the shelf's own edges. Gmail lifts it off the content with a * rgba(0,0,0,.1) top shadow and outlines it with a #e1e3e1 border on ::before; * both vanish on dark, so the toolbar had no outline and text scrolled into it * with no seam. A light hairline on top does the separating here. */ html.gdark :is(.iY, .nH.Hd) .aDj { box-shadow: 0 -1px 0 rgba(162, 162, 172, 0.3), 0 -6px 12px rgba(0, 0, 0, 0.55) !important; } html.gdark :is(.iY, .nH.Hd) .aDj::before { border-color: rgba(162, 162, 172, 0.4) !important; } /* undo/redo pill that rides on the docked shelf */ html.gdark :is(.iY, .nH.Hd) .Bswxkd { background-color: #2a2a31 !important; color: #d8d8de !important; } /* inline compose window frame (1px rounded border on td.I5) */ html.gdark :is(.iY, .nH.Hd) td.I5 { border-color: rgba(162, 162, 172, 0.4) !important; } /* discard-draft trash: a gstatic delete sprite on div.og, in the inline * reply's footer row rather than the .a8X row the pop-out compose rule covers */ html.gdark :is(.iY, .nH.Hd) .oh .og { filter: invert(0.8); } /* compose formatting toolbar (Sans Serif / B / I / U ...) */ html.gdark :is(.iY, .nH.Hd) .J-Z { background-color: #2a2a31 !important; } html.gdark :is(.iY, .nH.Hd) .J-Z, html.gdark :is(.iY, .nH.Hd) .J-Z div { color: #d8d8de !important; } /* toolbar glyphs are gstatic sprite background-images on .aaA divs */ html.gdark :is(.iY, .nH.Hd) .M9 .aaA { filter: invert(0.8); } /* Smart Compose suggestion: the ghost text (.bxX inside the * contenteditable=false .XjviVd span) and its "tab" key badge (.by3 > .by4) * are mid-gray on light. On dark the ghost text reads like part of what you * typed, and the sweep dims the badge to the generic dark well, so both get * Google's dark-surface blue — the suggestion now reads as a suggestion. * Must sit after the .gdb-dim rule: same specificity, later wins. */ html.gdark :is(.iY, .nH.Hd) .XjviVd .bxX { color: #8ab4f8 !important; } html.gdark :is(.iY, .nH.Hd) .XjviVd .by3 { background-color: rgba(138, 180, 248, 0.2) !important; border-color: rgba(138, 180, 248, 0.6) !important; box-shadow: none !important; } html.gdark :is(.iY, .nH.Hd) .XjviVd .by4 { color: #a8c7fa !important; } /* emoji picker (.aM7 — in the card for reactions, under <body> for compose). * The sweep dims the panel, but two things it can't reach: * - the search box is an <input>, whose typed value is no text node, so the * "dark text on dark" check never fires and it stayed #1f1f1f * - the category row and the search glyph are SVGs drawn with currentColor * (#444746 on .bnH / .PETVs), with no text of their own either */ html.gdark .aM7 input { color: #e6e6eb !important; caret-color: #e6e6eb; } html.gdark .aM7 input::placeholder { color: #a2a2ac !important; } html.gdark .aM7 :is(.bnH, .PETVs) { color: #c4c4cc !important; } /* light Gmail themes (content.js adds .gdb-light when the inbox rows carry dark * text): the sweep tags above darken the rest of the page, these are the parts * that need to hold a state or that the sweep can't see. Row colors are static * because sweep tags never come off, and selecting a row must be reversible. * Read rows sit darker than unread, as they do in Gmail's own Dark theme. */ html.gdark.gdb-light [role="main"], html.gdark.gdb-light .aeF, html.gdark.gdb-light .aeN { background-color: #1c1c21 !important; } html.gdark.gdb-light .gdb-backdrop { background-image: none !important; background-color: #1c1c21 !important; } html.gdark.gdb-light .zA { background-color: #26262c !important; } html.gdark.gdb-light .zA.yO { background-color: #1c1c21 !important; } html.gdark.gdb-light .zA:hover { background-color: #2f2f36 !important; } html.gdark.gdb-light .zA.x7 { background-color: #33415c !important; } html.gdark.gdb-light .gdb-sprite, html.gdark.gdb-light .T-KT { filter: invert(0.8); } html.gdark.gdb-light .T-KT.T-KT-Jp { filter: none; } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |