Page MenuHomePhabricator

Make profile menu full-height
ClosedPublic

Authored by epriestley on Jan 14 2016, 1:56 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 24, 11:12 AM
Unknown Object (File)
Fri, Jan 24, 11:12 AM
Unknown Object (File)
Fri, Jan 24, 11:12 AM
Unknown Object (File)
Tue, Jan 21, 4:00 PM
Unknown Object (File)
Tue, Jan 21, 3:37 PM
Unknown Object (File)
Tue, Jan 21, 12:07 PM
Unknown Object (File)
Tue, Jan 21, 10:25 AM
Unknown Object (File)
Dec 24 2024, 8:27 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
Branch
pmenu3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 10103
Build 12245: Run Core Tests
Build 12244: arc lint + arc unit

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.