Skip to content

Commit

Permalink
Fix shrinking of last breadcrumb for narraow width
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
  • Loading branch information
raimund-schluessler committed Feb 11, 2022
1 parent a4cf345 commit 96bd4d8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/components/Breadcrumb/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,22 @@ export default {
// Adjust action item appearance for crumbs with actions
// to match other crumbs
&::v-deep .action-item {
// Adjustments necessary to correctly shrink on small screens
max-width: 100%;
.trigger {
max-width: 100%;
}

&__menutoggle--with-title,
&--single--with-title {
// Adjustments necessary to correctly shrink on small screens
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
display: inline-block;

background-color: unset;
border: none;

Expand Down
12 changes: 11 additions & 1 deletion src/components/Breadcrumbs/Breadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,21 @@ export default {
flex-grow: 1;
display: inline-flex;

&--collapsed .crumb:last-child {
&--collapsed .vue-crumb:last-child {
min-width: 100px;
flex-shrink: 1;
}

& #{&}__crumbs {
flex-shrink: 1;
max-width: 100%;
/**
* This value is given by the min-width of the last crumb (100px) plus
* two times the width of a crumb with an icon (first crumb and hidden crumbs actions).
*/
min-width: 228px;
}

& #{&}__crumbs,
& #{&}__actions {
display: inline-flex;
Expand Down

0 comments on commit 96bd4d8

Please sign in to comment.