Skip to content

Commit

Permalink
DropdownMenu: fix icon style when dashicon is used (#43574)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jun 30, 2023
1 parent 37a9167 commit 4314ee4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- `ConfirmDialog`: Ensure onConfirm isn't called an extra time when submitting one of the buttons using the keyboard ([#51730](https://github.com/WordPress/gutenberg/pull/51730)).
- `ZStack`: ZStack: fix component bounding box to match children ([#51836](https://github.com/WordPress/gutenberg/pull/51836)).
- `Modal`: Add small top padding to the content so that avoid cutting off the visible outline when hovering items ([#51829](https://github.com/WordPress/gutenberg/pull/51829)).
- `DropdownMenu`: fix icon style when dashicon is used ([#43574](https://github.com/WordPress/gutenberg/pull/43574)).

### Internal

Expand Down
22 changes: 9 additions & 13 deletions packages/components/src/dropdown-menu/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,15 @@
height: 1px;
}

&.is-active svg {
// Block UI appearance.
color: $white;
background: $gray-900;
box-shadow: 0 0 0 $border-width $gray-900;
border-radius: $border-width;
}

// Formatting buttons
> svg {
border-radius: $radius-block-ui;
width: $button-size-small;
height: $button-size-small;
&.is-active {
svg,
.dashicon {
// Block UI appearance.
color: $white;
background: $gray-900;
box-shadow: 0 0 0 $border-width $gray-900;
border-radius: $border-width;
}
}

// If menu items are icon-only, make them stretch only to the icon size.
Expand Down

0 comments on commit 4314ee4

Please sign in to comment.