Skip to content

Commit

Permalink
Make inserter patterns/media changes more minimal
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniGuardiola committed Sep 28, 2024
1 parent 83fa634 commit e80f76a
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -222,24 +222,45 @@ $block-inserter-tabs-height: 44px;
}

.block-editor-inserter__category-tablist {
&::before {
background-color: var(--wp-admin-theme-color) !important;
opacity: 0.04;
display: flex;
flex-direction: column;
border: none;
margin-bottom: $grid-unit-10;
// Push the listitem wrapping the "explore" button to the bottom of the panel.
div[role="listitem"]:last-child {
margin-top: auto;
}

margin-bottom: $grid-unit-10;
// Temporarily disable the component's indicator animation.
// TODO: remove in favor of using the native component's styles and behavior,
// see https://github.com/WordPress/gutenberg/pull/62879#issuecomment-2219720582
&[aria-orientation="vertical"]::after {
content: none;
}

.block-editor-inserter__category-tab {

// Account for the icon on the right so that it's visually balanced.
// TODO: this is a style override, either the design or the component should
// be updated (e.g. by adding a variant).
padding: $grid-unit-10 $grid-unit-05 $grid-unit-10 $grid-unit-15;
text-align: left;
font-weight: inherit;
display: block;
position: relative;
height: auto;

&[aria-selected="true"] {
color: var(--wp-admin-theme-color);
fill: currentColor;

.components-flex-item {
filter: brightness(0.95);
}

svg {
fill: var(--wp-admin-theme-color);
}
}

&::before {
display: none;
}
}
}
Expand Down

0 comments on commit e80f76a

Please sign in to comment.