Skip to content

Commit

Permalink
Polish side UI and multi select in nested.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joen Asmussen committed Mar 19, 2018
1 parent 53cbee6 commit 6d5845c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions blocks/library/columns/editor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// These margins make sure that nested blocks stack/overlay with the parent block chrome
// This is sort of an experiment at making sure the editor looks as much like the end result as possible
// Potentially the rules here can apply to all nested blocks and enable stacking, in which case it should be moved elsewhere
.wp-block-columns .editor-block-list__layout {
&:first-child {
margin-left: -$block-padding;
}
&:last-child {
margin-right: -$block-padding;
}
}
5 changes: 5 additions & 0 deletions blocks/library/paragraph/editor.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
.editor-block-list__block:not( .is-multi-selected ) .wp-block-paragraph {
background: white;
}

// Don't show white background when a nesting parent is selected
.editor-block-list__layout .editor-block-list__layout .editor-block-list__block .wp-block-paragraph {
background: inherit;
}
1 change: 1 addition & 0 deletions editor/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@
padding: 0;
width: $block-side-ui-width;
height: 100%; // increase hoverable area
//margin-top: -1px; // stack borders on nested side UI
}

// Elevate when selected or hovered
Expand Down
1 change: 1 addition & 0 deletions editor/components/block-mover/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
background: $white;
border-color: $light-gray-500;
border-style: solid;
margin-top: -1px; // stack top border

&:first-child {
border-width: 1px 1px 0 1px;
Expand Down
1 change: 1 addition & 0 deletions editor/components/block-settings-menu/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
border-color: $light-gray-500;
border-style: solid;
border-width: 1px;
margin-top: -1px; // stack top border
}

.dashicon {
Expand Down

0 comments on commit 6d5845c

Please sign in to comment.