Skip to content

Commit

Permalink
Merge pull request #3265 from WordPress/fix/freeform-toolbar-z-index
Browse files Browse the repository at this point in the history
Blocks: Restore freeform block toolbar z-index
  • Loading branch information
aduth authored Oct 31, 2017
2 parents 95d6c39 + 9f31268 commit 81328e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blocks/library/freeform/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
.freeform-toolbar {
width: auto;
top: $header-height - 1px;
z-index: z-index( '.editor-block-toolbar' );
z-index: z-index( '.freeform-toolbar' );
position: sticky;

@include break-medium() {
Expand Down
7 changes: 6 additions & 1 deletion editor/assets/stylesheets/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $z-layers: (
'.editor-visual-editor__block:before': -1,
'.editor-visual-editor__block .wp-block-more:before': -1,
'.editor-visual-editor__block {core/image aligned left or right}': 20,
'.freeform-toolbar': 10,
'.editor-visual-editor__block-warning': 1,
'.editor-visual-editor__sibling-inserter': 1,
'.components-form-toggle__input': 1,
Expand Down Expand Up @@ -42,5 +43,9 @@ $z-layers: (
);

@function z-index( $key ) {
@return map-get( $z-layers, $key );
@if map-has-key( $z-layers, $key ) {
@return map-get( $z-layers, $key );
}

@error "Error: Specified z-index `#{$key}` does not exist in the mapping";
}

0 comments on commit 81328e1

Please sign in to comment.