Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistent sidebars close buttons sizes #66756

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function TabbedSidebar(
icon={ closeSmall }
label={ closeButtonLabel }
onClick={ () => onClose() }
size="small"
size="compact"
/>

<Tabs.TabList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
border-bottom: $border-width solid $gray-300;
display: flex;
justify-content: space-between;
padding-right: $grid-unit-15;
padding-right: $grid-unit-10;
}


Expand Down
7 changes: 4 additions & 3 deletions packages/edit-widgets/src/components/header/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@
.edit-widgets-header__actions {
display: flex;
align-items: center;
padding-right: $grid-unit-20;
gap: $grid-unit-05;
padding-right: $grid-unit-05;

@include break-small() {
gap: $grid-unit-10;
padding-right: $grid-unit-10;
}

gap: $grid-unit-10;
}

.edit-widgets-header-toolbar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ export default function ListViewSidebar() {
<div className="edit-widgets-editor__list-view-panel-header">
<strong>{ __( 'List View' ) }</strong>
<Button
__next40pxDefaultSize
icon={ closeSmall }
label={ __( 'Close' ) }
onClick={ closeListView }
size="compact"
/>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
justify-content: space-between;
height: $grid-unit-60;
padding-left: $grid-unit-20;
padding-right: $grid-unit-05;
padding-right: $grid-unit-10;
}
4 changes: 1 addition & 3 deletions packages/editor/src/components/sidebar/style.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
.components-panel__header.editor-sidebar__panel-tabs {
padding-left: 0;
padding-right: $grid-unit-15;
padding-right: $grid-unit-10;

.components-button.has-icon {
padding: 0;
min-width: $icon-size;
height: $icon-size;

@include break-medium() {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.interface-complementary-area-header {
background: $white;
padding-right: $grid-unit-15; // Reduced padding to account for close buttons.
gap: $grid-unit-10; // Always ensure space between contents and close buttons.
padding-right: $grid-unit-10; // Reduced padding to account for close buttons.
gap: $grid-unit-05; // Always ensure space between contents and close buttons.

.interface-complementary-area-header__title {
margin: 0 auto 0 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function ComplementaryArea( {
onClose={ () => disableComplementaryArea( scope ) }
toggleButtonProps={ {
label: closeLabel,
size: 'small',
size: 'compact',
shortcut: toggleShortcut,
scope,
identifier,
Expand Down
Loading