Skip to content

Commit

Permalink
Try: Make it easier to select the Separator
Browse files Browse the repository at this point in the history
The separator is usually very thin, almost by definition. This makes it hard to select.

This PR tries to make the hit area for the block bigger, therefore easier to select.

It does so at the cost of a little overlap — but this seems worth it. What are your thoughts?
  • Loading branch information
Joen Asmussen committed Feb 8, 2019
1 parent 8ba4a20 commit d205733
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/block-library/src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@import "./quote/editor.scss";
@import "./rss/editor.scss";
@import "./search/editor.scss";
@import "./separator/editor.scss";
@import "./shortcode/editor.scss";
@import "./spacer/editor.scss";
@import "./subhead/editor.scss";
Expand Down
13 changes: 13 additions & 0 deletions packages/block-library/src/separator/editor.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.wp-block-separator {
// Make the separator hit area bigger, to make it more easy to select.
&::after {
content: "";
display: block;
padding-bottom: $icon-button-size-small;
position: relative;
top: ($icon-button-size-small / 2);
}
margin-top: -($icon-button-size-small / 2);
margin-bottom: -$icon-button-size-small / 2;
transform: translateY(-$icon-button-size-small / 2);
}

0 comments on commit d205733

Please sign in to comment.