From 122a455a72f153cbdfb874d9f93701d9713662a7 Mon Sep 17 00:00:00 2001 From: Matt Sherman Date: Fri, 17 May 2024 07:34:12 -0400 Subject: [PATCH 1/3] Move styles to inserter --- .../block-editor/src/components/inserter/style.scss | 13 +++++++++++++ .../src/components/inserter-sidebar/style.scss | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/block-editor/src/components/inserter/style.scss b/packages/block-editor/src/components/inserter/style.scss index 604268fb1fe431..6108bca3ddc8d4 100644 --- a/packages/block-editor/src/components/inserter/style.scss +++ b/packages/block-editor/src/components/inserter/style.scss @@ -115,6 +115,19 @@ $block-inserter-tabs-height: 44px; flex-direction: column; overflow: hidden; + .block-editor-inserter-sidebar__header { + border-bottom: $border-width solid $gray-300; + padding-right: $grid-unit-10; + display: flex; + justify-content: space-between; + + .block-editor-inserter-sidebar__close-button { + /* stylelint-disable-next-line property-disallowed-list -- This should be refactored to avoid order if possible */ + order: 1; + align-self: center; + } + } + .block-editor-inserter__tablist { width: 100%; diff --git a/packages/editor/src/components/inserter-sidebar/style.scss b/packages/editor/src/components/inserter-sidebar/style.scss index c33e6eb7751c90..796bdebe221a6b 100644 --- a/packages/editor/src/components/inserter-sidebar/style.scss +++ b/packages/editor/src/components/inserter-sidebar/style.scss @@ -6,19 +6,6 @@ flex-direction: column; } -.block-editor-inserter-sidebar__header { - border-bottom: $border-width solid $gray-300; - padding-right: $grid-unit-15; - display: flex; - justify-content: space-between; - - .block-editor-inserter-sidebar__close-button { - /* stylelint-disable-next-line property-disallowed-list -- This should be refactored to avoid order if possible */ - order: 1; - align-self: center; - } -} - .editor-inserter-sidebar__content { // Leave space for the close button height: calc(100% - #{$button-size} - #{$grid-unit-10}); From babdbfd63525c9967d452363e73014bf7321a5bf Mon Sep 17 00:00:00 2001 From: Matt Sherman Date: Fri, 17 May 2024 07:59:55 -0400 Subject: [PATCH 2/3] Rename styles to be clearer --- .../block-editor/src/components/inserter/style.scss | 12 ++++++------ .../block-editor/src/components/inserter/tabs.js | 4 ++-- .../edit-widgets/src/components/layout/style.scss | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/block-editor/src/components/inserter/style.scss b/packages/block-editor/src/components/inserter/style.scss index 6108bca3ddc8d4..bebed230095ce0 100644 --- a/packages/block-editor/src/components/inserter/style.scss +++ b/packages/block-editor/src/components/inserter/style.scss @@ -115,17 +115,17 @@ $block-inserter-tabs-height: 44px; flex-direction: column; overflow: hidden; - .block-editor-inserter-sidebar__header { + .block-editor-inserter__tablist-and-close { border-bottom: $border-width solid $gray-300; padding-right: $grid-unit-10; display: flex; justify-content: space-between; + } - .block-editor-inserter-sidebar__close-button { - /* stylelint-disable-next-line property-disallowed-list -- This should be refactored to avoid order if possible */ - order: 1; - align-self: center; - } + .block-editor-inserter__close-button { + /* stylelint-disable-next-line property-disallowed-list -- This should be refactored to avoid order if possible */ + order: 1; + align-self: center; } .block-editor-inserter__tablist { diff --git a/packages/block-editor/src/components/inserter/tabs.js b/packages/block-editor/src/components/inserter/tabs.js index d3ce5d80993d3f..2bc20e76d4abba 100644 --- a/packages/block-editor/src/components/inserter/tabs.js +++ b/packages/block-editor/src/components/inserter/tabs.js @@ -39,9 +39,9 @@ function InserterTabs( { onSelect, children, onClose, selectedTab }, ref ) { return (
-
+