From b0507bca9e232f289050e6bf72b914a3d0c2078a Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Mon, 21 Oct 2024 13:36:47 +0200 Subject: [PATCH] Fix alignment and block gap settings for columns and groups In this commit, I disabled the layout for both groups and columns. This allows using our custom css for alignment of images (left, right and center). The CSS for constrained layout uses floats and it breaks spacing in the editor. [MAILPOET-6249] --- .../assets/js/src/email-editor/engine/blocks/core/group.tsx | 4 ++++ .../email-editor/engine/components/block-editor/index.scss | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/mailpoet/assets/js/src/email-editor/engine/blocks/core/group.tsx b/mailpoet/assets/js/src/email-editor/engine/blocks/core/group.tsx index dce193faa9..c7a6175925 100644 --- a/mailpoet/assets/js/src/email-editor/engine/blocks/core/group.tsx +++ b/mailpoet/assets/js/src/email-editor/engine/blocks/core/group.tsx @@ -15,6 +15,10 @@ function disableGroupVariations() { variations: settings.variations.filter( (variation) => variation.name === 'group', ), + supports: { + ...settings.supports, + layout: false, + }, }; } // eslint-disable-next-line @typescript-eslint/no-unsafe-return diff --git a/mailpoet/assets/js/src/email-editor/engine/components/block-editor/index.scss b/mailpoet/assets/js/src/email-editor/engine/components/block-editor/index.scss index cff97fdea6..830ee5c3bd 100644 --- a/mailpoet/assets/js/src/email-editor/engine/components/block-editor/index.scss +++ b/mailpoet/assets/js/src/email-editor/engine/components/block-editor/index.scss @@ -164,6 +164,10 @@ margin-left: auto; margin-right: auto; } + + &.alignright { + margin-left: auto; + } } .editor-styles-wrapper {