Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/pydata_sphinx_theme/assets/styles/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
color: var(--pst-color-table);
border: 1px solid var(--pst-color-table-outer-border);

// Our tables are zebra striped: header rows and odd-numbered rows have an
// off-white background, or off-black in dark mode. So they require a
// higher contrast link color.
a {
color: var(--pst-color-link-higher-contrast);
}

th,
td {
~ th,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ div.versionremoved {
margin-bottom: 0.6rem;
margin-top: 0.6rem;
}

// fix color contrast failures (accessibility)
a {
color: var(--pst-color-link-higher-contrast);
}
}

div.versionadded {
Expand All @@ -33,6 +38,14 @@ div.versionadded {
div.versionchanged {
border-color: var(--pst-color-warning);
background-color: var(--pst-color-warning-bg);

html[data-theme="dark"] & {
// This is a one-off because `--pst-color-link-higher-contrast` works for
// all of the other admonitions except this one in dark mode.
a {
color: map-deep-get($color-palette, "teal", "300");
}
}
}

div.deprecated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ aside.topic {
color: var(--pst-color-on-surface) !important;
}

a {
color: var(--pst-color-link-higher-contrast);
}

// Over-ride large default padding
ul.simple {
padding-left: 1rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ $pst-semantic-colors: (
--pst-color-heading: var(--pst-color-text-base);
--pst-color-link: var(--pst-color-primary);
--pst-color-link-hover: var(--pst-color-secondary);
--pst-color-link-higher-contrast: var(--pst-color-inline-code-links);
--pst-color-table-outer-border: var(--pst-color-surface);
--pst-color-table-heading-bg: var(--pst-color-surface);
--pst-color-table-row-zebra-high-bg: var(--pst-color-on-background);
Expand Down
3 changes: 2 additions & 1 deletion tests/intermittent_warning_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ WARNING: Cell printed to stderr:
Matplotlib is building the font cache; this may take a moment.
WARNING: failed to reach any of the inventories with the following issues:
intersphinx inventory
# THESE 3 WILL GO AWAY WHEN OUR MIN SPHINX VERSION IS 7.3 OR HIGHER
# THE FOLLOWING 4 LINES WILL GO AWAY WHEN OUR MIN SPHINX VERSION IS 7.3 OR HIGHER (because 7.3 introduces the versionremoved directive)
We also support *italic*, **bold**, ``code``, `links <https://www.sphinx-doc.org/en/master/>`_, and more.
Here's a version removed message.
.. versionremoved:: v0.1.1
ERROR: Unknown directive type "versionremoved".
3 changes: 3 additions & 0 deletions tests/sites/base/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@

# Base options, we can add other key/vals later
html_sidebars = {"section1/index": ["sidebar-nav-bs.html"]}

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
3 changes: 3 additions & 0 deletions tests/sites/breadcrumbs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@
"secondary_sidebar_items": ["breadcrumbs"],
"article_header_start": ["breadcrumbs"],
}

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
3 changes: 3 additions & 0 deletions tests/sites/colors/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
html_theme = "pydata_sphinx_theme"
html_copy_source = True
html_sourcelink_suffix = ""

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
3 changes: 3 additions & 0 deletions tests/sites/deprecated/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@
}

html_sidebars = {"section1/index": ["sidebar-nav-bs.html"]}

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
3 changes: 3 additions & 0 deletions tests/sites/sidebars/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
html_sidebars = {
"section2/no-sidebar": [], # Turn off primary/left sidebar
}

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
3 changes: 3 additions & 0 deletions tests/sites/test_included_toc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
# -- Options for HTML output -------------------------------------------------

html_theme = "pydata_sphinx_theme"

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
3 changes: 3 additions & 0 deletions tests/sites/test_navbar_no_in_page_headers/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@

html_copy_source = True
html_sourcelink_suffix = ""

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
3 changes: 3 additions & 0 deletions tests/sites/version_switcher/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
},
"navbar_start": ["navbar-logo", "version-switcher"],
}

# see https://github.com/sphinx-doc/sphinx/issues/13462
linkcheck_allowed_redirects = {}
Loading