Skip to content

Commit 1551d25

Browse files
egrace479annavik
andauthored
fix #18: set GitHub panel color to match on mobile/small screens (#19)
* fix #18: set gh panel color to match on mobile/small screens * fix: adjust text color for active parent item in small screen sidebar * Fix the active hover color for active parent item in small screen sidebar Also needed manual setting for this part or it stays constant --------- Co-authored-by: Anna Viklund <annamariaviklund@gmail.com>
1 parent a5e2a6b commit 1551d25

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/stylesheets/extra.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,15 @@ body {
4242
--md-accent-fg-color: var(--color-turquoise);
4343
}
4444

45+
/* GitHub panel color (mobile and small screen, issue 18) */
46+
.md-nav__source {
47+
background-color: var(--md-primary-fg-color);
48+
}
49+
50+
.md-source {
51+
background-color: var(--md-primary-fg-color);
52+
}
53+
4554
/* Set admonition (Note) colors to stand out better */
4655
.md-typeset .admonition.note, .md-typeset details.note {
4756
border-color: var(--color-turquoise);
@@ -117,3 +126,16 @@ body {
117126
[data-md-color-scheme="slate"] .md-nav .md-nav__link--active:hover {
118127
color: var(--color-turquoise);
119128
}
129+
130+
/* Small screen adjustments */
131+
@media screen and (max-width: 76.2344em) {
132+
/* Dark mode custom active parent color (side panel) */
133+
[data-md-color-scheme="slate"] .md-nav .md-nav__item--active > .md-nav__link {
134+
color: var(--color-gb-contrast);
135+
}
136+
137+
/* Dark mode custom active parent hover color (side panel) */
138+
[data-md-color-scheme="slate"] .md-nav .md-nav__item--active:hover > .md-nav__link {
139+
color: var(--color-turquoise);
140+
}
141+
}

0 commit comments

Comments
 (0)