Skip to content

Commit

Permalink
Improve consistency of block card and multi-selection card.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Dec 6, 2024
1 parent 958be5e commit e186f05
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/block-card/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
display: flex;
align-items: center;
gap: $grid-unit-05;
padding-top: $grid-unit-20;
padding-top: $grid-unit-10;

svg {
flex-shrink: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ export default function MultiSelectionInspector() {
<HStack
justify="flex-start"
align="flex-start"
spacing={ 2 }
spacing={ 0 }
className="block-editor-multi-selection-inspector__card"
>
<BlockIcon icon={ copy } showColors />
<VStack spacing={ 1 }>
<p className="block-editor-multi-selection-inspector__card-title">
<h2 className="block-editor-multi-selection-inspector__card-title">
{ sprintf(
/* translators: %d: number of blocks */
_n( '%d Block', '%d Blocks', selectedBlockCount ),
selectedBlockCount
) }
</p>
</h2>
{ isUsingBindings && (
<Text
as="p"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,28 @@

.block-editor-multi-selection-inspector__card-title {
font-weight: 500;

&.block-editor-multi-selection-inspector__card-title {
font-size: $default-font-size;
line-height: $default-line-height;
margin: 0;
padding: 3px 0; // This makes the title as high as the icon.
}
}

.block-editor-multi-selection-inspector__card .block-editor-block-icon {
margin-left: -2px;
padding: 0 3px;
width: $button-size;
flex: 0 0 $button-size-small;
margin-left: 0;
margin-right: $grid-unit-15;
width: $button-size-small;
height: $button-size-small;
}

.block-editor-multi-selection-inspector__connected-block-description {
display: flex;
align-items: center;
gap: $grid-unit-05;
padding-top: $grid-unit-20;
padding-top: $grid-unit-10;

svg {
flex-shrink: 0;
Expand Down

0 comments on commit e186f05

Please sign in to comment.