Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try sibling inserter tweaks #7220

Merged
merged 5 commits into from
Jun 21, 2018
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions editor/components/block-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@
height: $block-padding * 2; // Matches the whole empty space between two blocks
justify-content: center;

// Show a clickable plus
// Show a clickable plus.
.editor-block-list__insertion-point-button {
margin-top: -4px;
border-radius: 50%;
Expand All @@ -694,29 +694,32 @@
&:not(:disabled):not([aria-disabled="true"]):hover {
box-shadow: none;
}

}

// Show a line indicator when hovering, but this is unclickable
&:before {
position: absolute;
top: calc( 50% - #{ $border-width } );
height: 2px;
left: 0;
right: 0;
background: $dark-gray-100;
content: '';
}

// Hide both the line and button until hovered
// Hide both the button until hovered.
opacity: 0;
transition: opacity 0.1s linear 0.1s;

&:hover, &.is-visible {
&:hover,
&.is-visible {
opacity: 1;
}
}

// Don't show the sibling inserter before the selected block.
.edit-post-layout:not( .has-fixed-toolbar ) {
// The child selector is necessary for this to work properly in nested contexts.
.is-selected > .editor-block-list__insertion-point > .editor-block-list__insertion-point-inserter {
opacity: 0;
pointer-events: none;

&.is-visible {
opacity: 1;
pointer-events: auto;
}
}
}

.editor-block-list__block {
> .editor-block-list__insertion-point {
position: absolute;
Expand Down