Skip to content
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
17 changes: 17 additions & 0 deletions packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,23 @@
}
}

@mixin inserter-toggle() {
// Basic look
background: colors.$gray-900;
color: colors.$white;
padding: 0;

// TODO: Consider passing size="small" to the Inserter toggle instead.
// Special dimensions for this button.
min-width: variables.$button-size-small;
height: variables.$button-size-small;

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

@mixin selected-block-outline($widthRatio: 1) {
outline-color: var(--wp-admin-theme-color);
outline-style: solid;
Expand Down
15 changes: 1 addition & 14 deletions packages/block-editor/src/components/block-tools/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,7 @@
.block-editor-block-list__empty-block-inserter,
.block-editor-block-list__insertion-point-inserter {
.block-editor-inserter__toggle.components-button.has-icon {
// Basic look
background: $gray-900;
color: $white;
padding: 0;

// TODO: Consider passing size="small" to the Inserter toggle instead.
// Special dimensions for this button.
min-width: $button-size-small;
height: $button-size-small;

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "@wordpress/base-styles/colors" as *;
@use "@wordpress/base-styles/mixins" as *;
@use "@wordpress/base-styles/variables" as *;
@use "@wordpress/base-styles/z-index" as *;

Expand Down Expand Up @@ -41,20 +42,7 @@
}

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

// TODO: Consider passing size="small" to the Inserter toggle instead.
// Special dimensions for this button.
min-width: $button-size-small;
height: $button-size-small;

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

Expand Down Expand Up @@ -103,26 +91,16 @@
// treating them the same, one or both can be retired.
.block-editor-inserter__toggle.components-button.has-icon,
.block-list-appender__toggle {
@include inserter-toggle;
flex-direction: row;
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;

// Important to override styles form Button component.
padding: 0 !important;

// Basic look
background: $gray-900;
color: $white;

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

// This content only shows up inside the empty appender.
Expand Down
Loading