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 all 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
1 change: 1 addition & 0 deletions packages/block-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- `BlockInspector`: Fix browser warning error when block is not selected ([#46875](https://github.com/WordPress/gutenberg/pull/46875)).
- Move component styles needed for iframes to content styles ([#47103](https://github.com/WordPress/gutenberg/pull/47103)).
- Block Inserter: Correctly apply style to the default inserter ([#47166](https://github.com/WordPress/gutenberg/pull/47166)).

## 11.1.0 (2023-01-02)

Expand Down
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