Skip to content

Commit

Permalink
css ellipsis for text overflow (#11850)
Browse files Browse the repository at this point in the history
* css ellipsis for text overflow

* use min-width: 0
  • Loading branch information
nkylstad authored Dec 12, 2023
1 parent 5bc0e1c commit f343b22
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@
margin-left: var(--vertical-line-left-spacing);
box-shadow: var(--vertical-line-colour) var(--vertical-line-width) 0 inset;
}

.label {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const TreeViewItem = ({
type='button'
variant='tertiary'
>
{label}
<div className={classes.label}>{label}</div>
</Button>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
}

.wrapper {
display: flex;
align-items: flex-start;
justify-content: space-between;
overflow-wrap: anywhere;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

.label {
flex: 1;
min-width: 0;
}

.root:hover .label {
Expand Down

0 comments on commit f343b22

Please sign in to comment.