Make WordPress Core

Opened 18 months ago

Closed 16 months ago

Last modified 16 months ago

#63306 closed defect (bug) (duplicate)

Uneven Horizontal Spacing in WordPress Admin .wrap Container

Reported by: vijaysinh9094 Owned by:
Priority: normal Milestone:
Component: Administration Version: 3.8
Severity: trivial Keywords: needs-design-feedback has-patch has-test-info dev-feedback
Cc: Focuses: ui, css

Description

There is already 20px padding on the right side, and an additional 2px margin is being applied, making the total spacing 22px. To maintain equal spacing of 20px on both sides so that is better for user perspective.

Attachments (3)

Screenshot 2025-04-18 at 12.52.40 PM.png​ (269.3 KB ) - added by vijaysinh9094 18 months ago.
Screenshot 2025-04-18 at 12.53.07 PM.png​ (266.8 KB ) - added by vijaysinh9094 18 months ago.
63306.diff​ (330 bytes ) - added by kananiparth1326 18 months ago.
As per the issue, I have removed the 2px left margin. Now, there is 20px spacing on both sides.

Download all attachments as: .zip

Change History (10)

@kananiparth1326
18 months ago

As per the issue, I have removed the 2px left margin. Now, there is 20px spacing on both sides.

#1 @sabernhardt
17 months ago

  • Keywords needs-design-feedback added
  • Severity normal → trivial
  • Summary There is already 20px padding on the right side, and an additional 2px margin is being applied, making the total spacing 22px.. → Uneven Horizontal Spacing in WordPress Admin .wrap Container
  • Version 6.8 → 3.8

@dvpatel also set the left margin to zero—but ​without the unit—in ​PR 8822.

However, adding the 2 pixels on .wrap seems intentional. [26072] imported MP6, which changed the .wrap spacing
margin: 4px 15px 0 0;
to
margin: 10px 20px 0 2px;

On the other hand, #wpfooter has padding of 20 pixels on both sides.

Related: #63305 (on smaller screens, the opposite side has 2 more pixels of spacing)

#2 @sabernhardt
17 months ago

#63464 was marked as a duplicate.

#3 @SirLouen
16 months ago

  • Resolution → duplicate
  • Status new → closed

This report has to be sorted at the same time as #63305
Both are focusing on a problem with identical characteristics, for the two versions (long width and short width versions)

I've sent a patch in #63305 aiming to sorting both in one shot as it should.

For these reasons, I'm marking this as duplicate.

#4 @sandeepdahiya
16 months ago

  • Keywords has-patch has-test-info dev-feedback added

Firstly, I would recommend you to ​checkout this image to understand the issue better for #63305 and #63306. Both tickets relate to the same kind of bugs, with the only difference of screen-sizes.

Bug Reproduction and Test Report

Description

✅ This report validates that the indicated patch works as expected.

Patch tested: ​Patch-8938.diff

Environment

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

Bug Reproduction

  1. Before the patch, on Desktop view in Settings -> General section, we have #wpcontent with left-padding: 20px while .wrap with left-margin: 2px and right-margin: 20px. That makes a difference of 2 px in overall position. ​#wpcontent screenshot before the patch and ​.wrap screenshot before the patch
  1. Also, before the patch, on Desktop view in Settings -> General section, we have #screen-meta and #screen-meta-links with right margin of 20px. ​#screen-meta before the patch and ​#screen-meta-links before the patch

Actual Patch Results

  1. After the patch, on Desktop view in Settings -> General section, we have #wpcontent{padding-left: 20px, padding-right: 20px} and .wrap with 0 margin and 0 padding. ✅ Above patch resolves the issue. ​#wpcontent screenshot after the patch and ​.wrap screenshot after the patch
  1. After the patch, on Desktop view in Settings -> General section, we have #screen-meta and #screen-meta-links with 0 margin and 0 padding. ✅ Above patch resolves the issue. ​#screen-meta after the patch and ​#screen-meta-links after the patch

Additional Notes

  • This same patch resolves bugs mentioned in #63305.

Supplemental Artifacts

  • I have submitted a separate test report in #63305 to avoid any confusion.

#5 follow-up: @SirLouen
16 months ago

@sandeepdahiya can you integrate this report editing the one you posted in #63305 to have full context there?

#6 in reply to: ↑ 5 @sandeepdahiya
16 months ago

Replying to SirLouen:

@sandeepdahiya can you integrate this report editing the one you posted in #63305 to have full context there?

I have already submitted the test report here as well. ​This image explains everything at one place and I have mentioned all the screenshots below to have a look at.

For Desktop view (Before Patch):
​#wpcontent
​.wrap
​#screen-meta
​#screen-meta-links

For Desktop view (After Patch):
​#wpcontent
​.wrap
​#screen-meta
​#screen-meta-links

For Mobile view (Before Patch):
​#wpcontent and .wrap
​#screen-meta and #screen-meta-links

For Mobile view (After Patch):
​#wpcontent and .wrap
​#screen-meta and #screen-meta-links

Also the ​Patch-8938.diff works fine for #63305 and #63306.

#7 @sabernhardt
16 months ago

  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.