From 8aa3b6df7c0fa13fba050468315f39102ff37bc8 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Tue, 31 Jul 2018 08:56:32 +0200 Subject: [PATCH] Try alternate fix for Classic toolbar This is an alternative to #8308, which doesn't rely on uncollapsing margins. What it does is position the classic toolbar using translate, which is the same way every other toolbar is positioned. This fixes the issue and cleans up the CSS. --- core-blocks/freeform/editor.scss | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core-blocks/freeform/editor.scss b/core-blocks/freeform/editor.scss index 56bf9a7aa52583..05188d3e0a1728 100644 --- a/core-blocks/freeform/editor.scss +++ b/core-blocks/freeform/editor.scss @@ -1,7 +1,5 @@ .wp-block-freeform.core-blocks-rich-text__tinymce { overflow: hidden; - margin: -4px; - padding: 4px; p, li { @@ -140,11 +138,11 @@ div[data-type="core/freeform"] .editor-block-contextual-toolbar + div { .freeform-toolbar { width: auto; - margin: #{ -$block-padding } #{ -$parent-block-padding }; - margin-bottom: $block-padding; + margin: 0 #{ -$parent-block-padding }; position: sticky; z-index: z-index( '.freeform-toolbar' ); - top: 0; + top: $block-padding; + transform: translateY( -$block-padding ); } .freeform-toolbar:empty {