Opened 12 months ago
Closed 6 months ago
#64355 closed defect (bug) (fixed)
Plugin card width calculation and filter margin issues in install plugins screen
| Reported by: | abdalsalaam | Owned by: | westonruter |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.1 |
| Component: | Plugins | Version: | 5.3 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: | ui, administration |
Description
The plugin installation screen has two CSS issues affecting layout:
- 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.
- 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:
- Replace the plugin card width calculation with calc((100% - 32px) / 3) which correctly distributes width accounting for total gap spacing (4 gaps × 8px = 32px)
- Remove the unnecessary .plugin-install-php .wp-filter margin rule
Steps to reproduce:
- Navigate to Plugins → Add New
- Resize browser window to 1600px-2299px width
- Observe plugin card spacing/alignment issues
Attachments (2)
Change History (15)
This ticket was mentioned in PR #10596 on WordPress/wordpress-develop by @abdalsalaam.
12 months ago
#1
- Keywords has-patch added
#2
follow-ups:
↓ 3
↓ 6
@
12 months 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
@
12 months 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:
↓ 7
@
12 months 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.
#6
in reply to: ↑ 2
@
12 months 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
@
12 months 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
clearshould be obsolete too now that the container usesflex.
You are right, I'd like to work on fixing these issues, will have a fix ready shortly
#8
@
11 months 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
This ticket was mentioned in Slack in #core-css by abdalsalaam. View the logs.
6 months ago
@westonruter commented on PR #10596:
6 months ago
#10
This seems to work well.
# Before
https://github.com/user-attachments/assets/b9b6f0ba-8d26-452c-b185-18df9046bb3c
# After
https://github.com/user-attachments/assets/b1600ef3-6a00-490d-b500-dafb6fbabf53
There is no gap appearing on the right.
Trac ticket: https://core.trac.wordpress.org/ticket/64355