Skip to content

Commit

Permalink
Merge pull request #2492 from nextcloud/fix/noid/breadcrumbs-last-child
Browse files Browse the repository at this point in the history
Fix shrinking of last breadcrumb for narrow width
  • Loading branch information
raimund-schluessler authored Feb 14, 2022
2 parents 362c40c + 96bd4d8 commit dc14a71
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 dc14a71

Please sign in to comment.