Make WordPress Core

Opened 9 years ago

Last modified 7 months ago

#37712 new defect (bug)

Opacity not applied to admin menu icon when it selected

Reported by: chandrapatel's profile chandrapatel Owned by:
Milestone: Future Release Priority: normal
Severity: minor Version:
Component: Administration Keywords: has-patch
Focuses: ui, css Cc:

Description

Opacity not applied to single menu with custom menu logo when it selected.

But it work fine where menu has sub-menu and following css applied for it.

#adminmenu li.menu-top:hover .wp-menu-image img, #adminmenu li.wp-has-current-submenu .wp-menu-image img {
  opacity: 1;
}

So here css rule missing for single menu with custom menu logo.

When I applied following css then it work fine.

#adminmenu li.menu-top.current .wp-menu-image img {
  opacity: 1;
}

Attachments (5)

37712.patch (503 bytes) - added by chandrapatel 9 years ago.
Added patch
opacity-issue-in-menu.png (9.3 KB) - added by chandrapatel 9 years ago.
screenshot to show issue.
37712.1.patch (654 bytes) - added by sabernhardt 5 years ago.
option to keep the image at full opacity
#37712.patch (457 bytes) - added by rehanali 4 years ago.
Patch Added
admin-menu-png-opacity.png (28.3 KB) - added by sabernhardt 7 months ago.
opacity of PNG images in the admin menu (current)

Download all attachments as: .zip

Change History (12)

@chandrapatel
9 years ago

Added patch

@chandrapatel
9 years ago

screenshot to show issue.

#1 @swissspidy
9 years ago

  • Component changed from Menus to Administration
  • Focuses administration removed
  • Summary changed from Opacity not applied to single menu with custom menu logo when it selected to Opacity not applied to admin menu icon when it selected
  • Version 4.6 deleted

#2 @Presskopp
9 years ago

  • Keywords has-patch added

#3 @swissspidy
9 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to Future Release

#4 @sabernhardt
5 years ago

  • Focuses css added

37712.patch still applies and makes the image fully opaque when its menu item is the current page.

Because dashicons and background images show at full opacity even when not current/mouseover now, it may be better to make the image fully opaque all the time as well.

@sabernhardt
5 years ago

option to keep the image at full opacity

@rehanali
4 years ago

Patch Added

#5 @SirLouen
7 months ago

  • Keywords close reporter-feedback added; needs-testing removed

Reproduction Report

Description

❌This report can't validate that the issue can be reproduced.

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.28
  • Server: nginx/1.29.0
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 137.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Five 1.2
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ❌ Error condition is not occurring

Additional Notes

  • I can't reproduce this. Was this being tested back in the day in Internet Explorer? If anyone can throw a screencast reproducing the issue (instead of some screenshots), it would be good to proceed with this.
  • Although I prefer the patch by @sabernhardt, better removing than adding more classes to the mix. I will not do any harm, regardless that it can be reproduced or not.
  • For now adding reporter-feedback and close, worksforme preemptively.

Supplemental Artifacts

Opacity on current selected menu showing at 100%.

https://i.imgur.com/EEEuIAX.png

#6 follow-up: @sabernhardt
7 months ago

  • Keywords close reporter-feedback removed
  • Severity changed from normal to minor

Transcoder has its own CSS for the current menu item in rt-transcoder-admin.css now:

#adminmenu li.menu-top.current .wp-menu-image img {
  opacity: 1;
}

Two TeamUpdraft plugins use PNG images that still show the lower opacity:

  • UpdraftPlus only has the top-level link, which has the partially transparent image whether that is the current page or not. The image has full opacity when hovering over the link.
  • All-In-One Security (AIOS) has a submenu, so the image shows at full opacity when one of its pages is current (without needing to hover over it).

@sabernhardt
7 months ago

opacity of PNG images in the admin menu (current)

#7 in reply to: ↑ 6 @SirLouen
7 months ago

Replying to sabernhardt:

Two TeamUpdraft plugins use PNG images that still show the lower opacity:

  • UpdraftPlus only has the top-level link, which has the partially transparent image whether that is the current page or not. The image has full opacity when hovering over the link.
  • All-In-One Security (AIOS) has a submenu, so the image shows at full opacity when one of its pages is current (without needing to hover over it).

https://i.imgur.com/RR34S7I.png

This looks pretty good to me

And its taking default CSS without patch

https://i.imgur.com/RPUNNZi.png

Judging by this image you posted:

https://core.trac.wordpress.org/raw-attachment/ticket/37712/admin-menu-png-opacity.png

I see that the only problem is in no-hover for UpDraft Plus, but this is not happening with WP Security that is the one I tried here.

So I can assume that this is the bug? Or is the no-hover in WP Security without Opacity?

Not sure now which should be the expected behaviour here.

Last edited 7 months ago by SirLouen (previous) (diff)
Note: See TracTickets for help on using tickets.