Skip to content

use ellipsis to truncate breadcrumbs #1583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,26 @@ ul.bd-breadcrumbs {
list-style: none;
padding-left: 0;
display: flex;
flex-wrap: wrap;
flex-wrap: nowrap;

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

li.breadcrumb-item {
display: flex;
align-items: center;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

align-items was changed to center and was this conflicting, I resolved the conficlt.

white-space: nowrap;
flex-shrink: 0;

&.active {
flex-shrink: 1;
overflow-x: hidden;

.ellipsis {
overflow-x: hidden;
text-overflow: ellipsis;
}
}

// Style should look like heavier in-page links
// keeping visited in the default link colour
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.header-article__inner {
display: flex;
// display: flex;
padding: 0 0.5rem;

// The items define the height so that it disappears if there are no items
Expand All @@ -10,7 +10,7 @@

.header-article-items__start,
.header-article-items__end {
display: flex;
// display: flex;
align-items: start;
gap: 0.5rem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<li class="breadcrumb-item">{{ doc.title }}</li>
{% endif %}
{%- endfor %}
<li class="breadcrumb-item active" aria-current="page">{{ title|truncate(15, False) }}</li>
<li class="breadcrumb-item active" aria-current="page"><span class="ellipsis">{{ title }}</span></li>
</ul>
</nav>
{% endif %}
Expand Down
Loading