Make WordPress Core

Opened 7 weeks ago

Last modified 5 weeks ago

#64355 new defect (bug)

Plugin card width calculation and filter margin issues in install plugins screen

Reported by: abdalsalaam's profile abdalsalaam Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Plugins Keywords: has-patch
Focuses: ui, administration Cc:

Description

The plugin installation screen has two CSS issues affecting layout:

  1. Plugin card width: At viewport widths between 1600px and 2299px, plugin cards use a redundant dual-width declaration (width: 30%; width: calc(33.1% - 8px);) that doesn't properly account for gap spacing in the 3-column layout.
  2. Filter margin: The .plugin-install-php .wp-filter rule sets margin-bottom: 0 causing unnecessary spacing issues.

Affected files:

  • wp-admin/css/list-tables.css
  • wp-admin/css/list-tables-rtl.css

Proposed solution:

  1. Replace the plugin card width calculation with calc((100% - 32px) / 3) which correctly distributes width accounting for total gap spacing (4 gaps × 8px = 32px)
  2. Remove the unnecessary .plugin-install-php .wp-filter margin rule

Steps to reproduce:

  1. Navigate to Plugins → Add New
  2. Resize browser window to 1600px-2299px width
  3. Observe plugin card spacing/alignment issues

Attachments (2)

Screenshot 2025-12-04 at 12.51.37 PM.png (219.9 KB) - added by abdalsalaam 7 weeks ago.
522419951-a11dd468-b587-452b-8185-52b7c339cc97.png (257.7 KB) - added by abdalsalaam 7 weeks ago.
After the fix

Download all attachments as: .zip

Change History (10)

This ticket was mentioned in PR #10596 on WordPress/wordpress-develop by @abdalsalaam.


7 weeks ago
#1

  • Keywords has-patch added

#2 follow-ups: @sabernhardt
7 weeks ago

  • Focuses administration added

Related: the .wp-filter (lack of) margin on the default 'Featured' tab is already reported on #64337.

#3 in reply to: ↑ 2 @abdalsalaam
7 weeks ago

Replying to sabernhardt:

Related: the .wp-filter (lack of) margin on the default 'Featured' tab is already reported on #64337.

Sorry I didn't see this, what about the card-width ?

#4 follow-up: @sabernhardt
7 weeks ago

The card width is an older issue, and I did not find an existing ticket about that. [29219] added the value, and I can see the slight discrepancy at least as early as WordPress 5.3.

If the width is worth adjusting, the clear should be obsolete too now that the container uses flex.

#5 @westonruter
7 weeks ago

  • Version set to 5.3

#6 in reply to: ↑ 2 @westonruter
7 weeks ago

Replying to sabernhardt:

Related: the .wp-filter (lack of) margin on the default 'Featured' tab is already reported on #64337.

The line break has been restored between the filter links row and the plugin cards. See [61353]. Please re-test on trunk for the remaining issue for the plugin card width.

#7 in reply to: ↑ 4 @abdalsalaam
7 weeks ago

Replying to sabernhardt:

The card width is an older issue, and I did not find an existing ticket about that. [29219] added the value, and I can see the slight discrepancy at least as early as WordPress 5.3.

If the width is worth adjusting, the clear should be obsolete too now that the container uses flex.

You are right, I'd like to work on fixing these issues, will have a fix ready shortly

#8 @abdalsalaam
6 weeks ago

Update: I just pushed some changes to the PR, to remove some unnecessary CSS, @westonruter Could you please review the PR when you have a chance?

thank you

Last edited 5 weeks ago by abdalsalaam (previous) (diff)
Note: See TracTickets for help on using tickets.