From d25de883e765a646b476e2c52fd45305c5aead01 Mon Sep 17 00:00:00 2001 From: Rostislav Wolny Date: Mon, 2 Dec 2019 17:30:39 +0100 Subject: [PATCH] Add css fixes for block editor [MAILPOET-2451] --- .../formEditor/components/_block_editor.scss | 31 +++++++++++++++++++ assets/css/src/formEditor.scss | 1 + 2 files changed, 32 insertions(+) create mode 100644 assets/css/src/components/formEditor/components/_block_editor.scss diff --git a/assets/css/src/components/formEditor/components/_block_editor.scss b/assets/css/src/components/formEditor/components/_block_editor.scss new file mode 100644 index 0000000000..e79f6630e1 --- /dev/null +++ b/assets/css/src/components/formEditor/components/_block_editor.scss @@ -0,0 +1,31 @@ +// Fix for scrolling within editor +// This is fixed in Gutenberg's master branch. +// We should remove this fix after we update @wordpress/edit-post to version newer than 3.9.0 + +@media (min-width: 600px) { + .edit-post-layout__content { + overflow-y: auto; + overscroll-behavior-y: none; + padding-bottom: 0; + } +} + +// Fix for broken drag and drop for blocks +// This is fixed in Gutenberg's master branch +// https://github.com/WordPress/gutenberg/pull/15054 +// We should remove this fix after we update @wordpress/components to version newer than 8.4.0 +.edit-post-layout__content { + .block-editor-block-mover__control-drag-handle { + display: none; + } +} + +// We don't want to allow user to remove Submit or Email. +// There is no way to hide the delete button programmatically so we hide last toolbar that contains the delete option +// There is a feature request for adding that into Gutenberg https://github.com/WordPress/gutenberg/issues/16364 +#block-email, +#block-submit { + .components-toolbar:last-child { + display: none; + } +} diff --git a/assets/css/src/formEditor.scss b/assets/css/src/formEditor.scss index d037038bbc..5111e54312 100644 --- a/assets/css/src/formEditor.scss +++ b/assets/css/src/formEditor.scss @@ -6,3 +6,4 @@ @import './components/formEditor/components/form_title'; @import './components/formEditor/components/sidebar'; +@import './components/formEditor/components/block_editor';