Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#41486 closed defect (bug) (wontfix)

Admin html element is not full-height

Reported by: cybr's profile Cybr Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-screenshots
Focuses: ui Cc:

Description

The <html> tag within /wp-admin/ has the following CSS property: height: 100%;.

This means that the current screen height is taken rather than actual page height.
When you scroll down you can see that the absolute bottom of the html and body objects are cut short:
http://i.imgur.com/bB5AXHc.png

The solution would be to remove the height: 100% CSS rule from html.
body { height: 100% } is fine.

Applications that want to make use of the page height can't calculate their position correctly through CSS and therefore they require JavaScript or other hacks (e.g. absolute positioning modals).

Change History (4)

#1 @SergeyBiryukov
7 years ago

  • Component changed from General to Administration

#2 @afercia
7 years ago

  • Focuses administration removed
  • Keywords has-screenshots reporter-feedback added
  • Version trunk deleted

html, body { height: 100%; } is a common CSS technique to make the body element always extend its height to the bottom of the screen when the page content height is less than the screen height. Without that, for example, the footer wouldn't stick to the bottom:

https://cldup.com/XT-8LBR3rC.jpg

body { height: 100% } is fine

That wouldn't work because a percentage height is calculated on the height of the parent element.

Applications that want to make use of the page height can't calculate their position correctly through CSS and therefore they require JavaScript or other hacks (e.g. absolute positioning modals)

I guess this depends on a case by case basis and on what you're actually trying to do. Centering a modal dialog is pretty simple, can you describe a scenario where calculating a modal position through CSS would be impossible?

#3 @Cybr
7 years ago

  • Keywords close added; reporter-feedback removed
  • Resolution set to wontfix
  • Status changed from new to closed

@afercia Aha! I now see its intentions. Thanks for alleviating that.

I was trying to add a no-scroll mask behind the modal, which required the complete stretch of the page.
Without diving into the details, what I tried to achieve has been resolved by restructuring the DOM layout and using fixed instead of absolute.

I also see there's no way around the current implementation without restructuring the admin dashboard. Hence, I'm marking this for closure.

#4 @SergeyBiryukov
7 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.