From 77f810842bf3d00e63ba9928d85f9ea1ff14bf42 Mon Sep 17 00:00:00 2001 From: "Matthew Riley MacPherson (tofumatt)" Date: Tue, 3 Jul 2018 14:49:24 +0100 Subject: [PATCH 1/2] chore: Fix unclear comments --- editor/components/block-list/style.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/components/block-list/style.scss b/editor/components/block-list/style.scss index 38fd8bee1c55af..e6f95349fd7cd0 100644 --- a/editor/components/block-list/style.scss +++ b/editor/components/block-list/style.scss @@ -369,7 +369,7 @@ } } - // The padding collapses, but the outline is still 1px to compensate for. + // Keep a 1px margin to compensate for the border/outline. .editor-block-contextual-toolbar { margin-bottom: 1px; } @@ -377,7 +377,8 @@ // Left &[data-align="left"] { - .editor-block-list__block-edit { // This is in the editor only, on the frontend, the img should be floated + // This is in the editor only; the image should be floated on the frontend. + .editor-block-list__block-edit { /*!rtl:begin:ignore*/ float: left; margin-right: 2em; From fa59f482a52089f28dba2b5368b5b80708d24a84 Mon Sep 17 00:00:00 2001 From: "Matthew Riley MacPherson (tofumatt)" Date: Tue, 3 Jul 2018 15:06:01 +0100 Subject: [PATCH 2/2] chore: Tidy up inline comments --- editor/components/block-list/style.scss | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/editor/components/block-list/style.scss b/editor/components/block-list/style.scss index e6f95349fd7cd0..d66969f9924629 100644 --- a/editor/components/block-list/style.scss +++ b/editor/components/block-list/style.scss @@ -388,7 +388,8 @@ // Right &[data-align="right"] { - .editor-block-list__block-edit { // This is in the editor only, on the frontend, the img should be floated + // This is in the editor only; the image should be floated on the frontend. + .editor-block-list__block-edit { /*!rtl:begin:ignore*/ float: right; margin-left: 2em; @@ -412,7 +413,8 @@ // Mover and settings above > .editor-block-mover, > .editor-block-settings-menu { - top: -$block-side-ui-width - $border-width; // This moves the menu up by the height of the button + border. + // This moves the menu up by the height of the button + border. + top: -$block-side-ui-width - $border-width; bottom: auto; min-height: 0; height: auto; @@ -548,8 +550,9 @@ position: absolute; top: 0; width: $block-side-ui-width + $block-side-ui-clearance; - height: 100%; // stretch to fill half of the available space to increase hoverable area - max-height: $block-side-ui-width * 4; // stretch to fill half of the available space to increase hoverable area + // stretch to fill half of the available space to increase hoverable area + height: 100%; + max-height: $block-side-ui-width * 4; } // Elevate when selected or hovered @@ -615,7 +618,8 @@ .editor-block-list__block-mobile-toolbar { display: flex; flex-direction: row; - margin-top: $item-spacing + $block-toolbar-height; // Make room for the height of the block toolbar above. + // Make room for the height of the block toolbar above. + margin-top: $item-spacing + $block-toolbar-height; margin-right: -$block-padding; margin-bottom: -$block-padding - $border-width; margin-left: -$block-padding; @@ -685,7 +689,7 @@ */ .editor-block-list .editor-inserter { margin: $item-spacing; - cursor: move;/* Fallback for IE/Edge < 14 */ + cursor: move; // Fallback for IE/Edge < 14 cursor: grab; } @@ -716,7 +720,8 @@ bottom: auto; left: 0; right: 0; - height: $block-padding * 2; // Matches the whole empty space between two blocks + // Matches the whole empty space between two blocks + height: $block-padding * 2; justify-content: center; // Show a clickable plus. @@ -762,7 +767,8 @@ > .editor-block-list__insertion-point { position: absolute; top: -$block-padding - $block-spacing / 2; - height: $block-padding * 2; // Matches the whole empty space between two blocks + // Matches the whole empty space between two blocks + height: $block-padding * 2; bottom: auto; left: -$border-width; right: -$border-width;