|
| 1 | +/*--------------------- CSS Variables ----------------------------*/ |
| 2 | +:root { |
| 3 | + --black: #000000; |
| 4 | + --black1: #090c15; |
| 5 | + --black2: #2c3437; |
| 6 | + --black3: #0d111d; |
| 7 | + --white: #ffffff; |
| 8 | + --white-smoke: #f2f2f2; |
| 9 | + --grey-smoke: #e9edf0; |
| 10 | + --red1: #d60027; |
| 11 | + --red2: #d50027; |
| 12 | + --red3: #ca5010; |
| 13 | + --green1: #43853d; |
| 14 | + --green2: #5a8147; |
| 15 | + --green3: #454545; |
| 16 | + --green4: #99cc7d; |
| 17 | + --green5: #84ba64; |
| 18 | + --gray1: #707070; |
| 19 | + --gray2: #b4b4b4; |
| 20 | + --gray3: #cccccc; |
| 21 | + --gray4: #040404; |
| 22 | + --gray5: #7a7a7a; |
| 23 | + --gray6: #333333; |
| 24 | + --gray7: #c1c1c1; |
| 25 | + --grey8: #ddd; |
| 26 | + |
| 27 | + --color-brand-primary: var(--gray6); |
| 28 | + --color-brand-secondary: var(--green1); |
| 29 | + --color-text-primary: var(--gray6); |
| 30 | + --color-text-secondary: var(--green2); |
| 31 | + --color-fill-app: var(--white); |
| 32 | + --color-text-nav: var(--gray3); |
| 33 | + --highlight-background-color: var(--white-smoke); |
| 34 | + --color-links: var(--green1); |
| 35 | + --color-fill-side-nav: var(--gray6); |
| 36 | + --api-stability-links-bg: rgba(255, 255, 255, .4) |
| 37 | +} |
| 38 | + |
| 39 | +.dark-mode { |
| 40 | + --color-links: var(--green5); |
| 41 | + --color-fill-app: var(--black1); |
| 42 | + --color-text-primary: var(--white); |
| 43 | + --color-fill-side-nav: var(--black3); |
| 44 | + --highlight-background-color: var(--black2); |
| 45 | +} |
| 46 | + |
| 47 | +.dark-mode code, |
| 48 | +.dark-mode tt { |
| 49 | + color: var(--grey-smoke); |
| 50 | + background-color: var(--highlight-background-color); |
| 51 | +} |
| 52 | + |
1 | 53 | /*--------------------- Layout and Typography ----------------------------*/ |
2 | 54 | html { |
3 | 55 | font-size: 1rem; |
|
16 | 68 | font-family: Lato, "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, Tahoma, sans-serif; |
17 | 69 | margin: 0; |
18 | 70 | padding: 0; |
19 | | - color: #333; |
20 | | - background-color: #fff; |
| 71 | + color: var(--color-text-primary); |
| 72 | + background-color: var(--color-fill-app); |
21 | 73 | } |
22 | 74 |
|
23 | 75 | h1, h1 code { font-size: 2.5rem; } |
@@ -67,16 +119,16 @@ a.type { |
67 | 119 | a:link, |
68 | 120 | a:active, |
69 | 121 | a:visited { |
70 | | - color: #43853d; |
| 122 | + color: var(--color-links); |
71 | 123 | text-decoration: none; |
72 | 124 | border-radius: 2px; |
73 | 125 | padding: 1px 3px; |
74 | 126 | } |
75 | 127 |
|
76 | 128 | a:hover, |
77 | 129 | a:focus { |
78 | | - color: #fff; |
79 | | - background-color: #43853d; |
| 130 | + color: var(--white); |
| 131 | + background-color:var(--green1); |
80 | 132 | outline: none; |
81 | 133 | } |
82 | 134 |
|
@@ -109,7 +161,7 @@ em code { |
109 | 161 |
|
110 | 162 | #gtoc > ul > li { |
111 | 163 | display: inline; |
112 | | - border-right: 1px #000 solid; |
| 164 | + border-right: 1px currentColor solid; |
113 | 165 | margin-right: .4rem; |
114 | 166 | padding-right: .4rem; |
115 | 167 | } |
@@ -138,8 +190,8 @@ li.version-picker a span { |
138 | 190 | } |
139 | 191 |
|
140 | 192 | ol.version-picker { |
141 | | - background-color: #fff; |
142 | | - border: 1px solid #43853d; |
| 193 | + background-color: var(--color-fill-app); |
| 194 | + border: 1px solid var(--color-brand-secondary); |
143 | 195 | border-radius: 0 0 2px 2px; |
144 | 196 | display: none; |
145 | 197 | list-style: none; |
@@ -175,14 +227,14 @@ ol.version-picker li:last-child a { |
175 | 227 | } |
176 | 228 |
|
177 | 229 | .api_stability { |
178 | | - color: #fff !important; |
| 230 | + color: var(--white) !important; |
179 | 231 | margin: 0 0 1rem; |
180 | 232 | padding: 1rem; |
181 | 233 | line-height: 1.5; |
182 | 234 | } |
183 | 235 |
|
184 | 236 | .api_stability * { |
185 | | - color: #fff !important; |
| 237 | + color: var(--white) !important; |
186 | 238 | } |
187 | 239 |
|
188 | 240 | .api_stability a { |
@@ -192,23 +244,23 @@ ol.version-picker li:last-child a { |
192 | 244 | .api_stability a:hover, |
193 | 245 | .api_stability a:active, |
194 | 246 | .api_stability a:focus { |
195 | | - background-color: rgba(255, 255, 255, .4); |
| 247 | + background-color: var(--api-stability-links-bg); |
196 | 248 | } |
197 | 249 |
|
198 | 250 | .api_stability a code { |
199 | 251 | background-color: transparent; |
200 | 252 | } |
201 | 253 |
|
202 | 254 | .api_stability_0 { |
203 | | - background-color: #d60027; |
| 255 | + background-color: var(--red1); |
204 | 256 | } |
205 | 257 |
|
206 | 258 | .api_stability_1 { |
207 | | - background-color: #ca5010; |
| 259 | + background-color: var(--red3); |
208 | 260 | } |
209 | 261 |
|
210 | 262 | .api_stability_2 { |
211 | | - background-color: #5a8147; |
| 263 | + background-color: var(--green2); |
212 | 264 | } |
213 | 265 |
|
214 | 266 | .api_metadata { |
@@ -386,7 +438,7 @@ code { |
386 | 438 | pre { |
387 | 439 | padding: 1rem; |
388 | 440 | vertical-align: top; |
389 | | - background-color: #f2f2f2; |
| 441 | + background-color: var(--highlight-background-color); |
390 | 442 | margin: 1rem; |
391 | 443 | overflow-x: auto; |
392 | 444 | } |
@@ -409,14 +461,14 @@ code.pre { |
409 | 461 | } |
410 | 462 |
|
411 | 463 | #intro a { |
412 | | - color: #ddd; |
| 464 | + color: var(--grey8); |
413 | 465 | font-weight: 700; |
414 | 466 | } |
415 | 467 |
|
416 | 468 | hr { |
417 | 469 | background-color: transparent; |
418 | 470 | border: medium none; |
419 | | - border-bottom: 1px solid #7a7a7a; |
| 471 | + border-bottom: 1px solid var(--gray5); |
420 | 472 | margin: 0 0 1rem; |
421 | 473 | } |
422 | 474 |
|
|
442 | 494 | } |
443 | 495 |
|
444 | 496 | #toc .stability_0::after { |
445 | | - background-color: #d50027; |
446 | | - color: #fff; |
| 497 | + background-color: var(--red2); |
| 498 | + color: var(--white); |
447 | 499 | content: "deprecated"; |
448 | 500 | margin-left: .25rem; |
449 | 501 | padding: 1px 3px; |
@@ -488,7 +540,7 @@ a code { |
488 | 540 |
|
489 | 541 | #column2.interior { |
490 | 542 | width: 234px; |
491 | | - background-color: #333; |
| 543 | + background-color: var(--color-fill-side-nav); |
492 | 544 | position: fixed; |
493 | 545 | left: 0; |
494 | 546 | top: 0; |
@@ -500,7 +552,7 @@ a code { |
500 | 552 | #column2 ul { |
501 | 553 | list-style: none; |
502 | 554 | margin: .9rem 0 .5rem; |
503 | | - background-color: #333; |
| 555 | + background-color: var(--color-fill-side-nav); |
504 | 556 | } |
505 | 557 |
|
506 | 558 | #column2 > :first-child { |
@@ -532,23 +584,23 @@ a code { |
532 | 584 | } |
533 | 585 |
|
534 | 586 | #column2 ul li a { |
535 | | - color: #ccc; |
| 587 | + color: var(--color-text-nav); |
536 | 588 | border-radius: 0; |
537 | 589 | } |
538 | 590 |
|
539 | 591 | #column2 ul li a.active, |
540 | 592 | #column2 ul li a.active:hover, |
541 | 593 | #column2 ul li a.active:focus { |
542 | 594 | font-weight: 700; |
543 | | - color: #fff; |
| 595 | + color: var(--white); |
544 | 596 | background-color: transparent; |
545 | 597 | } |
546 | 598 |
|
547 | 599 | #intro a:hover, |
548 | 600 | #intro a:focus, |
549 | 601 | #column2 ul li a:hover, |
550 | 602 | #column2 ul li a:focus { |
551 | | - color: #fff; |
| 603 | + color: var(--white); |
552 | 604 | background-color: transparent; |
553 | 605 | } |
554 | 606 |
|
@@ -563,7 +615,7 @@ span > .mark:visited { |
563 | 615 | span > .mark:hover, |
564 | 616 | span > .mark:focus, |
565 | 617 | span > .mark:active { |
566 | | - color: #43853d; |
| 618 | + color: var(--color-brand-secondary); |
567 | 619 | background-color: transparent; |
568 | 620 | } |
569 | 621 |
|
@@ -577,7 +629,7 @@ kbd { |
577 | 629 | border-radius: 3px; |
578 | 630 | border: 1px solid #b4b4b4; |
579 | 631 | box-shadow: 0 1px 1px rgba(0, 0, 0, .2); |
580 | | - color: #333; |
| 632 | + color: var(--color-text-primary); |
581 | 633 | display: inline-block; |
582 | 634 | font-size: .85em; |
583 | 635 | font-weight: 700; |
@@ -649,6 +701,23 @@ kbd { |
649 | 701 | } |
650 | 702 | } |
651 | 703 |
|
| 704 | +.header-container { |
| 705 | + display: flex; |
| 706 | + align-items: center; |
| 707 | + margin: 1.5rem 0 1rem; |
| 708 | + justify-content: space-between; |
| 709 | +} |
| 710 | + |
| 711 | +.header-container h1 { |
| 712 | + margin: 0; |
| 713 | +} |
| 714 | + |
| 715 | +.theme-toggle-btn { |
| 716 | + border: none; |
| 717 | + background: transparent; |
| 718 | + outline: var(--brand3) dotted 2px; |
| 719 | +} |
| 720 | + |
652 | 721 | @media only screen and (max-width: 1024px) { |
653 | 722 | #content { |
654 | 723 | overflow: visible; |
@@ -665,6 +734,28 @@ kbd { |
665 | 734 | } |
666 | 735 | } |
667 | 736 |
|
| 737 | +.icon { |
| 738 | + cursor: pointer; |
| 739 | +} |
| 740 | + |
| 741 | +.dark-icon { |
| 742 | + display: block; |
| 743 | +} |
| 744 | + |
| 745 | +.light-icon { |
| 746 | + fill: var(--white); |
| 747 | + display: none; |
| 748 | +} |
| 749 | + |
| 750 | +.dark-mode .dark-icon { |
| 751 | + display: none; |
| 752 | +} |
| 753 | + |
| 754 | +.dark-mode .light-icon { |
| 755 | + fill: var(--white); |
| 756 | + display: block; |
| 757 | +} |
| 758 | + |
668 | 759 | @media print { |
669 | 760 | html { |
670 | 761 | height: auto; |
|