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

Block Inserter: Correctly apply style to the default inserter #47166

Merged
merged 2 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@

// Sibling inserter / "inbetweenserter".
.block-editor-block-list__empty-block-inserter,
.block-editor-default-block-appender,
Copy link
Contributor Author

@t-hamano t-hamano Jan 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the default inserter will not be used outside of the iframe editor, so I removed it.

.block-editor-block-list__insertion-point-inserter {
.block-editor-inserter__toggle.components-button.has-icon {
// Basic look
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@
.components-drop-zone__content-icon {
display: none;
}

.block-editor-inserter__toggle.components-button.has-icon {
// Basic look
background: $gray-900;
border-radius: $radius-block-ui;
color: $white;
padding: 0;

// Special dimensions for this button.
min-width: $button-size-small;
height: $button-size-small;

&:hover {
color: $white;
background: var(--wp-admin-theme-color);
}
}
}

// The black plus that shows up on the right side of an empty paragraph block, or the initial appender
Expand Down Expand Up @@ -78,6 +95,7 @@
box-shadow: none;
height: $button-size-small;
width: $button-size-small;
min-width: $button-size-small;

// Hide by default, then we unhide it when the selected block is a direct ancestor.
display: none;
Expand Down