Skip to content

Commit 9467f60

Browse files
committed
docs: give the dark scheme the home page's ink colors
Switching the palette toggle to dark brought back Material's indigo header and grey pages. The dark scheme now uses the same layout in the home page's ink tones: #16182a background and header, warm light text, a lighter indigo for links and a darker footer.
1 parent 632877e commit 9467f60

1 file changed

Lines changed: 72 additions & 1 deletion

File tree

‎docs/stylesheets/extra.css‎

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696

9797
/*
9898
* Light scheme: the paper, ink and light header of the home page.
99-
* The dark scheme keeps Material's colors.
10099
*/
101100
[data-md-color-scheme="default"] {
102101
--md-default-fg-color: #171a2ede;
@@ -160,3 +159,75 @@
160159
color: #454a63;
161160
}
162161
}
162+
163+
/* Dark scheme: the same layout in the ink tones of the home page */
164+
[data-md-color-scheme="slate"] {
165+
--md-default-fg-color: #ece9e1d6;
166+
--md-default-fg-color--light: #ece9e194;
167+
--md-default-fg-color--lighter: #ece9e152;
168+
--md-default-fg-color--lightest: #ece9e11f;
169+
--md-default-bg-color: #16182a;
170+
--md-default-bg-color--light: #16182a8a;
171+
--md-default-bg-color--lighter: #16182a42;
172+
--md-default-bg-color--lightest: #16182a12;
173+
--md-code-bg-color: #1f2237;
174+
--md-code-bg-color--light: #1f2237e6;
175+
--md-code-bg-color--lighter: #1f22378a;
176+
--md-typeset-kbd-border-color: #16182a;
177+
--md-footer-bg-color: #10121f;
178+
--md-footer-bg-color--dark: #0b0d17;
179+
}
180+
181+
[data-md-color-scheme="slate"][data-md-color-primary="indigo"] {
182+
--md-typeset-a-color: #8e9cf5;
183+
}
184+
185+
[data-md-color-scheme="slate"] .md-header,
186+
[data-md-color-scheme="slate"] .md-tabs {
187+
background-color: #16182a;
188+
color: #ece9e1;
189+
}
190+
191+
[data-md-color-scheme="slate"] .md-header {
192+
border-bottom: 1px solid #2b2e45;
193+
}
194+
195+
[data-md-color-scheme="slate"] .md-tabs__link {
196+
color: #b3b6c9;
197+
opacity: 1;
198+
}
199+
200+
[data-md-color-scheme="slate"] .md-tabs__item--active .md-tabs__link,
201+
[data-md-color-scheme="slate"] .md-tabs__link:hover {
202+
color: #fff;
203+
}
204+
205+
[data-md-color-scheme="slate"] .md-tabs__item--active .md-tabs__link {
206+
font-weight: 700;
207+
}
208+
209+
[data-md-color-scheme="slate"] .md-nav--primary .md-nav__title[for="__drawer"] {
210+
background-color: #16182a;
211+
color: #ece9e1;
212+
}
213+
214+
[data-md-color-scheme="slate"] .md-nav__source {
215+
background-color: #10121f;
216+
}
217+
218+
@media screen and (min-width: 60em) {
219+
[data-md-color-scheme="slate"] .md-search__form,
220+
[data-md-color-scheme="slate"] .md-search__form:hover {
221+
background-color: #1f2237;
222+
border: 1px solid #2b2e45;
223+
border-radius: 0.4rem;
224+
}
225+
226+
[data-md-color-scheme="slate"] .md-search__input::placeholder {
227+
color: #9b9eb3;
228+
}
229+
230+
[data-md-color-scheme="slate"] .md-search__input + .md-search__icon {
231+
color: #b3b6c9;
232+
}
233+
}

0 commit comments

Comments
 (0)