Skip to content

Commit

Permalink
Try alternate fix for Classic toolbar
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jasmussen committed Jul 31, 2018
1 parent 656439c commit 8aa3b6d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions core-blocks/freeform/editor.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.wp-block-freeform.core-blocks-rich-text__tinymce {
overflow: hidden;
margin: -4px;
padding: 4px;

p,
li {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8aa3b6d

Please sign in to comment.