Skip to content

Commit 5fe965f

Browse files
committed
Allow breadcrumbs to span multiple lines but truncate each part to one line
1 parent 8879dbb commit 5fe965f

File tree

3 files changed

+6
-30
lines changed

3 files changed

+6
-30
lines changed

src/pydata_sphinx_theme/assets/styles/components/_breadcrumbs.scss

+5-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ul.bd-breadcrumbs {
55
list-style: none;
66
padding-left: 0;
77
display: flex;
8-
flex-wrap: nowrap;
8+
flex-wrap: wrap;
99

1010
// Font size slightly smaller to avoid cluttering up space too much
1111
font-size: 0.8rem;
@@ -14,16 +14,12 @@ ul.bd-breadcrumbs {
1414
display: flex;
1515
align-items: center;
1616
white-space: nowrap;
17-
flex-shrink: 0;
17+
overflow-x: hidden;
1818

19-
&.active {
20-
flex-shrink: 1;
19+
a,
20+
.ellipsis {
2121
overflow-x: hidden;
22-
23-
.ellipsis {
24-
overflow-x: hidden;
25-
text-overflow: ellipsis;
26-
}
22+
text-overflow: ellipsis;
2723
}
2824

2925
// Style should look like heavier in-page links

src/pydata_sphinx_theme/assets/styles/sections/_header-article.scss

-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
// The items define the height so that it disappears if there are no items
55
.header-article-item {
66
min-height: var(--pst-header-article-height);
7-
height: var(--pst-header-article-height);
8-
}
9-
10-
.header-article-items__start,
11-
.header-article-items__end {
12-
align-items: start;
13-
gap: 0.5rem;
147
}
158

169
.header-article-items__end {

tests/test_playwright.py

+1-14
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@
99
playwright = pytest.importorskip("playwright")
1010
from playwright.sync_api import Page, expect # noqa: E402
1111

12-
# Important note: automated accessibility scans can only find a fraction of
13-
# potential accessibility issues.
14-
#
15-
# This test file scans pages from the Kitchen Sink examples with a JavaScript
16-
# library called Axe-core, which checks the page for accessibility violations,
17-
# such as places on the page with poor color contrast that would be hard for
18-
# people with low vision to see.
19-
#
20-
# Just because a page passes the scan with no accessibility violations does
21-
# *not* mean that it will be generally usable by a broad range of disabled
22-
# people. It just means that page is free of common testable accessibility
23-
# pitfalls.
24-
2512
path_repo = Path(__file__).parent.parent
2613
path_docs_build = path_repo / "docs" / "_build" / "html"
2714

@@ -38,7 +25,7 @@ def _is_overflowing(element):
3825

3926

4027
def test_version_switcher_highlighting(page: Page, url_base: str) -> None:
41-
"""This isn't an a11y test, but needs a served site for Javascript to inject the version menu."""
28+
"""In sidebar and topbar - version switcher should apply highlight color to currently selected version."""
4229
page.goto(url=url_base)
4330
# no need to include_hidden here ↓↓↓, we just need to get the active version name
4431
button = page.get_by_role("button").filter(has_text="dev")

0 commit comments

Comments
 (0)