Skip to content

Commit

Permalink
Remove PyData Sphinx Theme pin (#161)
Browse files Browse the repository at this point in the history
Includes fixes for the primary sidebar compatible with PST 0.15.3

---------

Co-authored-by: Peter Sobolewski <76622105+psobolewskiPhD@users.noreply.github.com>
  • Loading branch information
melissawm and psobolewskiPhD authored May 30, 2024
1 parent 79847de commit 149c5a5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 41 deletions.
74 changes: 34 additions & 40 deletions napari_sphinx_theme/static/css/napari-sphinx-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,6 @@ h1 {
box-shadow: none;
}

.navbar .nav-item.active a {
font-weight: 700 !important;
}

.navbar .nav-item a>i {
margin-left: 0.5rem;
font-size: 0.875rem !important;
}

.navbar-brand {
vertical-align: middle;
font-size: 1.25rem;
Expand All @@ -237,35 +228,36 @@ h1 {
color: var(--napari-color-text-base) !important;
}

.navbar .navbar-brand p.title {
font-size: 1rem;
line-height: 125%;
.bd-header .navbar-nav li.pst-header-nav-item {
font-size: 1.0625rem;
font-weight: 500 !important;
}

.navbar .nav-item a {
text-decoration-line: none;
.navbar-icon-links li.nav-item a.nav-link {
color: var(--napari-color-text-base) !important;
font-size: 1.0625rem;
padding: 15px 1.0625rem 15px !important;
border-bottom: .1875rem solid transparent;
font-weight: 500 !important;
}

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

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

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

.col-lg-9.navbar-header-items {
max-width: 75%;
.bd-header .navbar-nav li.pst-header-nav-item.current>.nav-link {
border-bottom: 3px solid var(--pst-color-primary);
font-weight: 700 !important;
}

.bd-header .navbar-nav li.pst-header-nav-item>.nav-link {
padding: 15px 1.0625rem 15px !important;
}

/***************************
Expand Down Expand Up @@ -307,14 +299,21 @@ button.version-switcher__button {
sidebar
***************************/

.bd-sidebar label {
left: 0px;
.bd-search {
border: 1px solid transparent;
}

.bd-sidebar-primary label.toctree-toggle:hover {
background: none;
/* Remove "Section Navigation" caption */
.bd-links__title {
display: none;
}

/* Move chevron to the left */
.bd-sidebar-primary li.has-children>details>summary .toctree-toggle {
right: unset;
}

/* Fonts and styles */
.bd-sidebar a.reference,
.bd-sidebar .caption-text {
font-size: 0.875rem;
Expand All @@ -326,10 +325,6 @@ button.version-switcher__button {
margin-top: 0;
}

.bd-search {
border: 1px solid transparent;
}

.bd-sidebar .toctree-l1 a {
padding-left: 32px;
}
Expand Down Expand Up @@ -438,10 +433,6 @@ button.version-switcher__button {
color: var(--napari-color-text-base);
}

.navbar-nav .toctree-checkbox:checked~label i {
transform: rotate(90deg);
}

nav.bd-links li>a {
color: var(--napari-color-text-base);
display: block;
Expand Down Expand Up @@ -653,6 +644,10 @@ a.headerlink {
transform: scale(1.01);
}

.prev-next-area p {
color: var(--napari-color-text-base);
}

/***************************
Admonitions
***************************/
Expand Down Expand Up @@ -1020,7 +1015,6 @@ div.admonition.note>.admonition-title::after {
color: var(--napari-dark-gray);
}


/***************************
Calendar popup
***************************/
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ authors = [ {name = "napari team" }]

requires-python = ">=3.7"
dependencies = [
"pydata-sphinx-theme==0.14.4",
"pydata-sphinx-theme>=0.15.3",
"packaging",
]

Expand Down

0 comments on commit 149c5a5

Please sign in to comment.