Page MenuHomePhabricator

Make profile menu full-height
ClosedPublic

Authored by epriestley on Jan 14 2016, 1:56 AM.
Tags
None
Referenced Files
F14352285: D15017.id.diff
Thu, Dec 19, 1:28 PM
F14352284: D15017.diff
Thu, Dec 19, 1:28 PM
Unknown Object (File)
Mon, Dec 16, 6:46 PM
Unknown Object (File)
Sun, Dec 15, 8:44 AM
Unknown Object (File)
Wed, Dec 11, 7:07 AM
Unknown Object (File)
Mon, Dec 9, 10:57 AM
Unknown Object (File)
Fri, Dec 6, 8:55 PM
Unknown Object (File)
Thu, Dec 5, 5:06 AM
Subscribers
None

Details

Summary

Ref T10054. This makes the profile menu full-height. It uses two pieces of dark magic:

  • calc(), which allows you to do math in CSS.
  • The vh unit, which is CSS for "viewport height".

Apparently this kind of stuff just works now? CSS got good at some point?

Test Plan
  • Page looks correct in Safari, Chrome, Firefox.
  • Checked caniuse.com for vh and calc(), saw they're supported?

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make profile menu full-height.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

Most of this is just shuffling the footer around so we can put it after the content (instead of after the whole menu) when rendering a profile menu.

Then the rest is magic.

webroot/rsrc/css/phui/phui-profile-menu.css
7

This is the magic.

Also:

  • this rule only activates on desktop; and
  • if it doesn't work for some reason, everything still looks mostly OK, the menu just won't be as tall as the window on pages with a small amount of content.

im flagging this for later when someone says it doesn't work on Android on a 2G connection in the outback.

chad edited edge metadata.
This revision is now accepted and ready to land.Jan 14 2016, 9:07 PM
This revision was automatically updated to reflect the committed changes.