Skip to content

Commit 149c5a5

Browse files
Remove PyData Sphinx Theme pin (#161)
Includes fixes for the primary sidebar compatible with PST 0.15.3 --------- Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
1 parent 79847de commit 149c5a5

File tree

2 files changed

+35
-41
lines changed

2 files changed

+35
-41
lines changed

napari_sphinx_theme/static/css/napari-sphinx-theme.css

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,6 @@ h1 {
215215
box-shadow: none;
216216
}
217217

218-
.navbar .nav-item.active a {
219-
font-weight: 700 !important;
220-
}
221-
222-
.navbar .nav-item a>i {
223-
margin-left: 0.5rem;
224-
font-size: 0.875rem !important;
225-
}
226-
227218
.navbar-brand {
228219
vertical-align: middle;
229220
font-size: 1.25rem;
@@ -237,35 +228,36 @@ h1 {
237228
color: var(--napari-color-text-base) !important;
238229
}
239230

240-
.navbar .navbar-brand p.title {
241-
font-size: 1rem;
242-
line-height: 125%;
231+
.bd-header .navbar-nav li.pst-header-nav-item {
232+
font-size: 1.0625rem;
233+
font-weight: 500 !important;
243234
}
244235

245-
.navbar .nav-item a {
246-
text-decoration-line: none;
236+
.navbar-icon-links li.nav-item a.nav-link {
247237
color: var(--napari-color-text-base) !important;
248-
font-size: 1.0625rem;
249-
padding: 15px 1.0625rem 15px !important;
250-
border-bottom: .1875rem solid transparent;
251-
font-weight: 500 !important;
252238
}
253239

254-
.bd-header .navbar-nav li a.nav-link {
255-
font-weight: bold;
240+
.bd-header .navbar-nav li.pst-header-nav-item>.nav-link {
241+
color: var(--napari-color-text-base) !important;
242+
border-bottom: 3px solid transparent;
256243
}
257244

258-
.bd-header .navbar-nav li a.nav-link:hover {
259-
text-decoration: none !important;
260-
border-bottom: .1875rem solid var(--napari-color-text-base);
245+
.bd-header .navbar-nav li.pst-header-nav-item>.nav-link:hover {
246+
color: var(--napari-color-text-base) !important;
247+
border-bottom: 3px solid var(--pst-color-primary);
261248
}
262249

263-
.bd-header .navbar-nav>.current>.nav-link {
264-
border-bottom: .1875rem solid var(--napari-color-text-base);
250+
.bd-header .navbar-nav li.pst-header-nav-item.current>.nav-link::before {
251+
border-bottom: 0px solid var(--pst-color-primary);
265252
}
266253

267-
.col-lg-9.navbar-header-items {
268-
max-width: 75%;
254+
.bd-header .navbar-nav li.pst-header-nav-item.current>.nav-link {
255+
border-bottom: 3px solid var(--pst-color-primary);
256+
font-weight: 700 !important;
257+
}
258+
259+
.bd-header .navbar-nav li.pst-header-nav-item>.nav-link {
260+
padding: 15px 1.0625rem 15px !important;
269261
}
270262

271263
/***************************
@@ -307,14 +299,21 @@ button.version-switcher__button {
307299
sidebar
308300
***************************/
309301

310-
.bd-sidebar label {
311-
left: 0px;
302+
.bd-search {
303+
border: 1px solid transparent;
312304
}
313305

314-
.bd-sidebar-primary label.toctree-toggle:hover {
315-
background: none;
306+
/* Remove "Section Navigation" caption */
307+
.bd-links__title {
308+
display: none;
316309
}
317310

311+
/* Move chevron to the left */
312+
.bd-sidebar-primary li.has-children>details>summary .toctree-toggle {
313+
right: unset;
314+
}
315+
316+
/* Fonts and styles */
318317
.bd-sidebar a.reference,
319318
.bd-sidebar .caption-text {
320319
font-size: 0.875rem;
@@ -326,10 +325,6 @@ button.version-switcher__button {
326325
margin-top: 0;
327326
}
328327

329-
.bd-search {
330-
border: 1px solid transparent;
331-
}
332-
333328
.bd-sidebar .toctree-l1 a {
334329
padding-left: 32px;
335330
}
@@ -438,10 +433,6 @@ button.version-switcher__button {
438433
color: var(--napari-color-text-base);
439434
}
440435

441-
.navbar-nav .toctree-checkbox:checked~label i {
442-
transform: rotate(90deg);
443-
}
444-
445436
nav.bd-links li>a {
446437
color: var(--napari-color-text-base);
447438
display: block;
@@ -653,6 +644,10 @@ a.headerlink {
653644
transform: scale(1.01);
654645
}
655646

647+
.prev-next-area p {
648+
color: var(--napari-color-text-base);
649+
}
650+
656651
/***************************
657652
Admonitions
658653
***************************/
@@ -1020,7 +1015,6 @@ div.admonition.note>.admonition-title::after {
10201015
color: var(--napari-dark-gray);
10211016
}
10221017

1023-
10241018
/***************************
10251019
Calendar popup
10261020
***************************/

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = [ {name = "napari team" }]
1111

1212
requires-python = ">=3.7"
1313
dependencies = [
14-
"pydata-sphinx-theme==0.14.4",
14+
"pydata-sphinx-theme>=0.15.3",
1515
"packaging",
1616
]
1717

0 commit comments

Comments
 (0)