Make WordPress Core

Opened 6 years ago

Last modified 10 months ago

#35717 new defect (bug)

Audit the .icon16 selectors in admin-menu.css

Reported by: afercia Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: needs-patch
Focuses: ui, css Cc:


Noticed while investigating the admin stylesheets for color contrast, looks like the .icon16 selectors in admin-menu.css are no more used. I'm not 100% sure and I'd really appreciate some feedback though.

As far as I see, the .icon16 selectors were used only for the Welcome Panel at some point, while the admin menu always used its own selectors. It seems to me they can be safely removed.

Some history:
Introduced in WordPress 3.3 to reuse the admin menu icons on the Welcome Screen, see [19163] and [19197].

The icons were then removed with the Welcome Panel redesign for WP 3.5, see [22018] and #21368.

The selectors were still present in the MP6 stylesheets, see [26072], but no more used in any screen? If so, it would be a nice opportunity to do some cleaning.

Attachments (1)

35717.0.patch (2.8 KB) - added by mmaumio 6 years ago.
Removed the .icon16 class from wp-admin/admin-menu.css

Download all attachments as: .zip

Change History (5)

6 years ago

Removed the .icon16 class from wp-admin/admin-menu.css

This ticket was mentioned in Slack in #core by peterwilsoncc. View the logs.

11 months ago

#2 @isabel_brison
11 months ago

  • Focuses css added
  • Keywords dev-feedback removed

The icon16 selector is no longer used in Core, but a few plugins still use it:

It would be great to work out a deprecation policy for CSS so that 3rd party code can gradually move off these unused selectors.

@mmaumio : regarding your patch, the aim is to remove the CSS rules targeting icon16 altogether, not just the selector. However, we can only do that once we have come up with a way to address the deprecation issue. All the same, thanks for your effort!

#3 @sabernhardt
11 months ago

Checking for spaces and/or quotes narrows down the plugin directory search a bit more. A few of those matches are still not classes, and the top two plugins contain the same link.

The directory search also found one theme, but that's quite outdated and the icon link is not necessary when the link URLs are visible anyway.

Last edited 11 months ago by sabernhardt (previous) (diff)

This ticket was mentioned in Slack in #core-css by sabernhardt. View the logs.

10 months ago

Note: See TracTickets for help on using tickets.