From 5decd55bf7cc0333d3e3f0b0dd1b15271e86e40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lys=C3=BD?= Date: Wed, 8 Jan 2025 19:05:19 +0100 Subject: [PATCH] Improve CSS selectors for spacing inside columns and group blocks [MAILPOET-6364] --- .../email-editor/src/Engine/content-editor.css | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/php/email-editor/src/Engine/content-editor.css b/packages/php/email-editor/src/Engine/content-editor.css index 05e3a657c8..5b51d979a2 100644 --- a/packages/php/email-editor/src/Engine/content-editor.css +++ b/packages/php/email-editor/src/Engine/content-editor.css @@ -30,22 +30,24 @@ * This is needed because we disable layout for core/group, core/column and core/columns blocks, and .is-layout-flex is not applied. */ .wp-block-columns:not(.is-not-stacked-on-mobile) - > .wp-block-column - > .wp-block:first-child, -.wp-block-group > .wp-block:first-child { +> .wp-block-column +> .wp-block:not([aria-hidden="true"]):first-of-type, +.wp-block-group > .wp-block:not([aria-hidden="true"]):first-of-type { margin-top: 0; } -.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column > .wp-block, -.wp-block-group > .wp-block { +.wp-block-columns:not(.is-not-stacked-on-mobile) +> .wp-block-column +> .wp-block:not([aria-hidden="true"]), +.wp-block-group > .wp-block:not([aria-hidden="true"]) { margin-bottom: var(--wp--style--block-gap, 16px); margin-top: var(--wp--style--block-gap, 16px); } .wp-block-columns:not(.is-not-stacked-on-mobile) - > .wp-block-column - > .wp-block:last-child, -.wp-block-group > .wp-block:last-child { +> .wp-block-column +> .wp-block:not([aria-hidden="true"]):last-of-type, +.wp-block-group > .wp-block:not([aria-hidden="true"]):last-of-type { margin-bottom: 0; }