Skip to content

Commit 447577a

Browse files
committed
WIP try to shrink last flex element
1 parent 370db00 commit 447577a

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

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

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

1010
// Font size slightly smaller to avoid cluttering up space too much
1111
font-size: 0.8rem;
1212

1313
li.breadcrumb-item {
1414
display: flex;
1515
align-items: baseline;
16+
white-space: nowrap;
17+
flex-shrink: 0;
18+
19+
&.active {
20+
flex-shrink: 1;
21+
min-width: 0;
22+
overflow-x: hidden;
23+
.ellipsis {
24+
flex-shrink: 1;
25+
min-width: 0;
26+
overflow-x: hidden;
27+
text-overflow: ellipsis;
28+
}
29+
}
1630

1731
// Style should look like heavier in-page links
1832
// keeping visited in the default link colour

src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<li class="breadcrumb-item">{{ doc.title }}</li>
2626
{% endif %}
2727
{%- endfor %}
28-
<li class="breadcrumb-item active" aria-current="page">{{ title|truncate(15, False) }}</li>
28+
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">{{ title }}</span></li>
2929
</ul>
3030
</nav>
3131
{% endif %}

0 commit comments

Comments
 (0)