From a5c67f8156fa66bb55aee43750751ae0e697eef3 Mon Sep 17 00:00:00 2001 From: Grant Kinney Date: Fri, 31 Jan 2020 21:18:05 -0600 Subject: [PATCH 1/2] Eventbrite and OpenTable Blocks: Fix block preview sizing with Gutenberg 7.3 --- extensions/blocks/eventbrite/editor.scss | 3 ++- extensions/blocks/opentable/editor.scss | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/blocks/eventbrite/editor.scss b/extensions/blocks/eventbrite/editor.scss index b5aee8513e1b6..f5f5a5b93f527 100644 --- a/extensions/blocks/eventbrite/editor.scss +++ b/extensions/blocks/eventbrite/editor.scss @@ -12,7 +12,8 @@ } } -.block-editor-block-preview__content [data-type='jetpack/eventbrite'] div[data-block] { +.block-editor-block-preview__content [data-type='jetpack/eventbrite'] div[data-block], +.block-editor-block-preview__content [data-type='jetpack/eventbrite'][data-block] { display: table; } diff --git a/extensions/blocks/opentable/editor.scss b/extensions/blocks/opentable/editor.scss index 71209a951b459..120d42cda1698 100644 --- a/extensions/blocks/opentable/editor.scss +++ b/extensions/blocks/opentable/editor.scss @@ -134,6 +134,7 @@ } } -.block-editor-block-preview__content [data-type='jetpack/opentable'] div[data-block] { +.block-editor-block-preview__content [data-type='jetpack/opentable'] div[data-block], +.block-editor-block-preview__content [data-type='jetpack/opentable'][data-block] { display: table; } From e0e6bbfd6feb9f9c96247bddd97202586895b0b6 Mon Sep 17 00:00:00 2001 From: Grant Kinney Date: Fri, 31 Jan 2020 22:00:19 -0600 Subject: [PATCH 2/2] Adds comment for explanation --- extensions/blocks/eventbrite/editor.scss | 5 ++++- extensions/blocks/opentable/editor.scss | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/extensions/blocks/eventbrite/editor.scss b/extensions/blocks/eventbrite/editor.scss index f5f5a5b93f527..7b7840a9cdb5e 100644 --- a/extensions/blocks/eventbrite/editor.scss +++ b/extensions/blocks/eventbrite/editor.scss @@ -12,7 +12,10 @@ } } -.block-editor-block-preview__content [data-type='jetpack/eventbrite'] div[data-block], +// Display "table" is used because the button container should only wrap the content and not take the full width. +// Both selector rules needed because the block wrapper used in Gutenberg was removed in v7.3 +// @link https://github.com/WordPress/gutenberg/pull/19593 +.block-editor-block-preview__content [data-type='jetpack/eventbrite'] [data-block], .block-editor-block-preview__content [data-type='jetpack/eventbrite'][data-block] { display: table; } diff --git a/extensions/blocks/opentable/editor.scss b/extensions/blocks/opentable/editor.scss index 120d42cda1698..5136ebc3e4f46 100644 --- a/extensions/blocks/opentable/editor.scss +++ b/extensions/blocks/opentable/editor.scss @@ -134,7 +134,10 @@ } } -.block-editor-block-preview__content [data-type='jetpack/opentable'] div[data-block], +// Display "table" is used because the preview container should only wrap the content and not take the full width. +// Both selector rules needed because the block wrapper used in Gutenberg was removed in v7.3 +// @link https://github.com/WordPress/gutenberg/pull/19593 +.block-editor-block-preview__content [data-type='jetpack/opentable'] [data-block], .block-editor-block-preview__content [data-type='jetpack/opentable'][data-block] { display: table; }