Skip to content

Commit 3c26d5a

Browse files
DOC: update for latest pydata-sphinx-theme (fix sidebar + use CSS variables) (#168)
1 parent 274ea74 commit 3c26d5a

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

docs/_static/css/custom.css

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
/* Override some aspects of the pydata-sphinx-theme */
22

3-
body {
4-
padding-top: 0px;
3+
:root {
4+
--color-active-navigation: 0, 91, 129;
5+
/* Use normal text color (like h3, ..) instead of primary color */
6+
--color-h1: var(--color-text-base);
7+
--color-h2: var(--color-text-base);
58
}
69

7-
h1,
8-
h2 {
9-
color: #333;
10+
11+
body {
12+
padding-top: 0px;
1013
}
1114

1215
@media (min-width: 768px) {
@@ -22,22 +25,11 @@ code {
2225
color: #3b444b;
2326
}
2427

25-
/* Default link color for active + larger font size for sidebar*/
28+
/* Larger font size for sidebar*/
2629
.bd-sidebar .nav > li > a {
2730
font-size: 1em;
2831
}
2932

30-
.bd-sidebar .nav>li>a:hover,
31-
.bd-sidebar .nav > .active:hover > a,
32-
.bd-sidebar .nav > .active > a {
33-
color: #005b81;
34-
}
35-
.toc-entry > .nav-link.active {
36-
color: #005b81;
37-
border-left:2px solid #005b81;
38-
}
39-
40-
4133
/* New element: brand text instead of logo */
4234

4335
/* .navbar-brand-text {

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
'css/custom.css',
7171
]
7272

73+
html_sidebars = {
74+
'**': ['docs-sidebar.html'],
75+
}
7376

7477
# ---------------------------------------------------------------------------
7578

0 commit comments

Comments
 (0)