Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Tweak heading sizing to ensure it uses available space without unexpe…
…ctedly extending the panel
  • Loading branch information
andrewserong committed Jul 11, 2022
commit 04ab515263017ccdff5fb5ae5b08e6fe5ec4a556
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,9 @@ function ListViewBlockSelectButton(
justify="flex-start"
spacing={ 1 }
>
<Truncate
className="block-editor-list-view-block-select-button__title"
ellipsizeMode="auto"
>
{ blockTitle }
</Truncate>
<span className="block-editor-list-view-block-select-button__title">
<Truncate ellipsizeMode="auto">{ blockTitle }</Truncate>
</span>
{ blockInformation?.anchor && (
<span className="block-editor-list-view-block-select-button__anchor">
{ blockInformation.anchor }
Expand Down
16 changes: 12 additions & 4 deletions packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
}

.block-editor-list-view-block__menu-cell {
padding-right: 4px;
padding-right: $grid-unit-05;

.components-button.has-icon {
height: 24px;
Expand Down Expand Up @@ -297,16 +297,24 @@
}
}

.block-editor-list-view-block-select-button__label-wrapper {
max-width: 240px;
.block-editor-list-view-block-select-button__title {
min-width: 120px;
width: 100%;
position: relative;

.components-truncate {
position: absolute;
width: 100%;
transform: translateY(-50%);
}
}

.block-editor-list-view-block-select-button__anchor {
background: rgba($black, 0.1);
border-radius: $radius-block-ui;
display: inline-block;
padding: 2px 6px;
max-width: 120px;
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
}
Expand Down