Make WordPress Core

Opened 2 months ago

Last modified 6 weeks ago

#60499 assigned enhancement

Duplicate CSS in src/wp-includes/css/media-views.css

Reported by: afercia's profile afercia Owned by: afercia's profile afercia
Milestone: 6.6 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch
Focuses: css Cc:


There's about 60 lines (including empty lines) of duplicate CSS in src/wp-includes/css/media-views.css all related to the 'load more' button shown at the bottom of the media grid.

Compare the CSS starting at line 1272:

with the one starting at line 1317:

While it doesn't harm anything, it's just redundant code that can be safely removed.

Hint: use a tool of your choice to find all the duplicated CSS rulesets. There are a few online tools as well.

Attachments (1)

60499.diff (1.1 KB) - added by afercia 2 months ago.

Download all attachments as: .zip

Change History (5)

#1 @afercia
2 months ago

  • Owner set to afercia
  • Status changed from new to assigned

2 months ago

#2 @afercia
2 months ago

  • Keywords has-patch added

60499.diff removes the duplicate CSS.

  • Check the removed CSS is actually duplicate.
  • Apply the patch.
  • Build and go to the media grid.
  • Make sure you have more than 80 media files so that the 'load more' button is shown.
  • Observe there are no visual or layout differences.

This ticket was mentioned in Slack in #core-media by joedolson. View the logs.

6 weeks ago

#4 @joedolson
6 weeks ago

  • Milestone changed from Awaiting Review to 6.6
Note: See TracTickets for help on using tickets.