From 88b94d47fce691330375b8ec8df8720242ebf876 Mon Sep 17 00:00:00 2001 From: Jon Waldstein Date: Mon, 4 Nov 2024 12:41:00 -0500 Subject: [PATCH] fix: block sidebar style for wp 6.7 --- .../src/styles/_form-builder.scss | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/FormBuilder/resources/js/form-builder/src/styles/_form-builder.scss b/src/FormBuilder/resources/js/form-builder/src/styles/_form-builder.scss index d121237aa5..1d3a2e7e0e 100644 --- a/src/FormBuilder/resources/js/form-builder/src/styles/_form-builder.scss +++ b/src/FormBuilder/resources/js/form-builder/src/styles/_form-builder.scss @@ -46,13 +46,6 @@ //overflow: hidden; // The Inspector Popout needs to be visible. overflow-y: scroll; - // WP 6.6+ - hide the Blocks, Patterns, Media tabs - &.givewp-next-gen-sidebar-secondary { - .block-editor-inserter__tablist-and-close-button { - display: none; - } - } - &.givewp-next-gen-sidebar-primary { .block-editor-block-inspector { > h2 { @@ -315,3 +308,30 @@ .iti { width: 100%; } + +/** + * WordPress 6.6 compatibility + */ +.givewp-next-gen-sidebar-secondary { + // Hide the Blocks, Patterns, Media tabs + .block-editor-inserter__tablist-and-close-button { + display: none; + } +} + + +/** + * WordPress 6.7 compatibility + */ +.givewp-next-gen-sidebar-secondary { + // Hide the Blocks, Patterns, Media tabs (css name change) + .block-editor-tabbed-sidebar__tablist-and-close-button { + display: none; + } + + // WP adds a fixed width to the tabbed sidebar, we need to override it + .block-editor-inserter__main-area .block-editor-tabbed-sidebar { + width: 100%; + } +} +