Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#28675 closed defect (bug) (fixed)

#wpcontent and #wpfooter admin padding and margins

Reported by: tjnowell's profile TJNowell Owned by: helen's profile helen
Milestone: 4.0 Priority: normal
Severity: normal Version: 4.0
Component: Administration Keywords: has-patch commit
Focuses: ui, administration Cc:

Description

The main content and footer wrapper elements in the admin panel have a margin on the left to prevent overlapping with the menu of 180px

This margin includes the padding on the left of the content however. This padding should be added as padding.

Adding this css in the web inspector should demonstrate the issue:

#wpcontent, #wpfooter {
    background: hotpink;
}

To fix this, this css:

#wpcontent, #wpfooter {
    margin-left: 180px;
}

needs to become:

#wpcontent, #wpfooter {
    margin-left: 160px;
    padding-left: 20px;
}

Attachments (5)

Screen Shot 2014-06-29 at 11.25.48.png (130.9 KB) - added by TJNowell 10 years ago.
Screenshot of issue with hotpink on the wpcontent background
28675.diff (426 bytes) - added by TJNowell 10 years ago.
Patches margin and padding issue
28675.2.diff (1016 bytes) - added by jesin 10 years ago.
Change margin to padding in default & RTL stylesheets
28675.3.diff (1.2 KB) - added by jesin 10 years ago.
Fix margin when the side menu is collapsed. Includes 28675.2.diff
28675.4.diff (981 bytes) - added by sumobi 10 years ago.

Download all attachments as: .zip

Change History (18)

@TJNowell
10 years ago

Screenshot of issue with hotpink on the wpcontent background

@TJNowell
10 years ago

Patches margin and padding issue

#1 @TJNowell
10 years ago

  • Keywords has-patch added

I've attached a patch for develop that fixes the issue, and I've added changes to account for the folded menu

#2 @SergeyBiryukov
10 years ago

  • Focuses ui added
  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.0

#3 @helen
10 years ago

  • Keywords needs-patch added; has-patch commit removed

Footer is not quite right with the patch - padding is reset later for #wpfooter, and also has a margin on the right. Also needs to be checked in RTL, since it's left/right dependent (it's probably fine, but should be checked). Want to re-patch, TJNowell?

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.


10 years ago

@jesin
10 years ago

Change margin to padding in default & RTL stylesheets

#5 @jesin
10 years ago

The 28675.2.diff patch sets #wpfooter's padding in its later occurrence. The RTL stylesheet also has this bug and has been fixed in this patch. #wpfooter's right margin also has to be converted to padding else on dashboards with less number of widgets the default background is visible.

https://i.imgur.com/oBNoDn0.png

@jesin
10 years ago

Fix margin when the side menu is collapsed. Includes 28675.2.diff

#6 @sathishn
10 years ago

  • Keywords has-patch added; needs-patch removed

#7 @sathishn
10 years ago

patch submitted by jesin 28675.3.diff​ seems to work.

@sumobi
10 years ago

#8 follow-up: @sumobi
10 years ago

28675.4.diff:

Refreshed 28675.3.diff patch on src folder, reapplied CSS changes and tested with small tweak to padding and margin on footer.

The same changes should be applied to common-rtl.css and admin-menu-rtl.css but they don't seem to be in the src/wp-admin/css folder. Any ideas on why they are not there?

Last edited 10 years ago by sumobi (previous) (diff)

#9 in reply to: ↑ 8 ; follow-up: @SergeyBiryukov
10 years ago

Replying to sumobi:

The same changes should be applied to common-rtl.css and admin-menu-rtl.css but they don't seem to be in the src/wp-admin/css folder. Any ideas on why they are not there?

They are auto-generated on commit, see #24977. No need to patch them.

#10 in reply to: ↑ 9 @sumobi
10 years ago

Replying to SergeyBiryukov:

Replying to sumobi:

The same changes should be applied to common-rtl.css and admin-menu-rtl.css but they don't seem to be in the src/wp-admin/css folder. Any ideas on why they are not there?

They are auto-generated on commit, see #24977. No need to patch them.

Ahh, good to know, thanks

#11 @DrewAPicture
10 years ago

  • Keywords commit added

Tested 28675.4.diff. Looks good and works for me.

Last edited 10 years ago by DrewAPicture (previous) (diff)

This ticket was mentioned in IRC in #wordpress-dev by ocean90. View the logs.


10 years ago

#13 @helen
10 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 29502:

Use consistent margin and padding on #wpcontent and #wpfooter. props jesin, TJNowell, sumobi. fixes #28675.

Note: See TracTickets for help on using tickets.