Skip to content

Commit 0f7be6e

Browse files
authored
docs: fix up sphinx tabs 🌚 (#2045)
1 parent 294d434 commit 0f7be6e

File tree

3 files changed

+21
-18
lines changed

3 files changed

+21
-18
lines changed

docs/_static/custom.css

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -302,32 +302,36 @@ div.contents.local.topic > ul > li > ul {
302302
margin-top: 0;
303303
}
304304

305-
.sphinx-tabs .sphinx-menu a.item {
306-
color: #c77c11 !important;
305+
[role="tablist"] {
306+
border-color: #eee;
307307
}
308308

309-
.sphinx-tabs .sphinx-menu a.item:hover{
310-
color: #f0ad4e !important;
309+
.sphinx-tabs-panel {
310+
border-color: #eee;
311+
padding: 4px 1rem;
311312
}
312313

313-
.sphinx-tabs .sphinx-menu {
314-
border-bottom-color: #eee !important;
314+
.sphinx-tabs-tab {
315+
top: 2px;
316+
border-color: #eee;
317+
color: #c77c11;
315318
}
316319

317-
.sphinx-tabs .sphinx-menu a.active.item {
318-
border-color: #eee !important;
320+
.sphinx-tabs-tab[aria-selected="true"] {
321+
border-color: #eee;
319322
}
320323

321-
.sphinx-tab {
322-
border-color: #eee !important;
324+
.sphinx-tabs-tab[aria-selected="false"]:hover {
325+
color: #f0ad4e;
326+
text-decoration: underline;
323327
}
324328

325-
.sphinx-tab.tab.active {
326-
background-color: rgb(245,245,245);
329+
.sphinx-tabs-tab:focus {
330+
z-index: 0;
327331
}
328332

329-
.sphinx-tabs .sphinx-menu a.active.item {
330-
background-color: rgb(245,245,245) !important;
333+
.sphinx-tabs-panel .highlight-python {
334+
margin: 4px 0;
331335
}
332336

333337
div.note, pre {
@@ -363,4 +367,4 @@ div.highlight > pre {
363367
/* TODO: remove once alabaster is updated */
364368
span.descname, span.descclassname {
365369
font-size: 0.95em;
366-
}
370+
}

requirements/docs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ pygments
66
pygments-style-github
77
sphinx
88
sphinx_rtd_theme
9-
# NOTE(vytas): pin until we figure out how to deal with the dark mode.
10-
sphinx-tabs < 3.3.0
9+
sphinx-tabs

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ commands =
400400
basepython = python3.8
401401
deps = -r{toxinidir}/requirements/docs
402402
commands =
403-
sphinx-build -W -E -b html docs docs/_build/html []
403+
sphinx-build -j auto -W -E -b html docs docs/_build/html []
404404

405405
[testenv:towncrier]
406406
deps = -r{toxinidir}/requirements/docs

0 commit comments

Comments
 (0)