From 3101339e4c33132b328bab075304aa7a5f99dc54 Mon Sep 17 00:00:00 2001 From: Tetsuaki Hamano Date: Sat, 24 Jun 2023 20:51:57 +0900 Subject: [PATCH] Simpler approach --- packages/components/CHANGELOG.md | 1 + .../components/src/dropdown-menu/style.scss | 22 ++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index da0ba4d1b3ff32..4aea08d98b3f4a 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -17,6 +17,7 @@ - `Button`: Remove unnecessary margin from dashicon ([#51395](https://github.com/WordPress/gutenberg/pull/51395)). - `Autocomplete`: Announce how many results are available to screen readers when suggestions list first renders ([#51018](https://github.com/WordPress/gutenberg/pull/51018)). - `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)). +- `DropdownMenu`: fix icon style when dashicon is used ([#43574](https://github.com/WordPress/gutenberg/pull/43574)). ### Internal diff --git a/packages/components/src/dropdown-menu/style.scss b/packages/components/src/dropdown-menu/style.scss index 64303ea9049eb7..7d9e1b997f7804 100644 --- a/packages/components/src/dropdown-menu/style.scss +++ b/packages/components/src/dropdown-menu/style.scss @@ -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.