1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00
phorge-phorge/webroot/rsrc/css/phui/phui-profile-menu.css
epriestley c019f76283 Make profile menu full-height
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?

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10054

Differential Revision: https://secure.phabricator.com/D15017
2016-01-15 09:12:34 -08:00

86 lines
2 KiB
CSS

/**
* @provides phui-profile-menu-css
*/
.device-desktop .phui-navigation-shell.phui-profile-menu {
display: table;
height: calc(100vh - {$menu.main.height});
}
.device-desktop .phui-profile-menu .phabricator-nav {
display: table-row;
}
.device-desktop .phui-profile-menu .phabricator-nav-local {
display: table-cell;
position: relative;
vertical-align: top;
width: 240px;
margin-top: 0;
}
.device-desktop .phui-profile-menu .phabricator-nav-content {
display: table-cell;
margin-left: 0;
}
.phui-profile-menu .phabricator-side-menu {
background: {$menu.profile.background};
box-shadow: inset -2px 0 2px rgba(0, 0, 0, 0.150);
width: 240px;
}
.phui-profile-menu .phabricator-side-menu .phui-list-item-view {
position: relative;
}
.phui-profile-menu .phabricator-side-menu .phui-list-item-href {
display: block;
text-decoration: none;
padding: 12px 8px 12px 48px;
font-size: 15px;
-webkit-font-smoothing: antialiased;
color: {$menu.profile.text};
line-height: 22px;
overflow: hidden;
text-overflow: ellipsis;
}
.phui-profile-menu .phabricator-side-menu .phui-list-item-icon,
.phui-profile-menu .phabricator-side-menu .phui-icon-view {
position: absolute;
left: 13px;
top: 12px;
font-size: 20px;
width: 22px;
height: 22px;
line-height: 22px;
text-align: center;
color: {$menu.profile.icon};
background-size: 100%;
}
.phui-profile-menu .phabricator-side-menu
.phui-list-item-disabled
.phui-list-item-icon {
color: {$menu.profile.icon.disabled};
}
.phui-profile-menu .phabricator-side-menu .phui-icon-view {
border-radius: 3px;
}
.device-desktop .phui-profile-menu .phabricator-side-menu
.phui-list-item-href:hover {
background-color: rgba(0, 0, 0, 0.075);
color: {$menu.profile.text.selected};
}
.phui-profile-menu .phabricator-side-menu .phui-list-item-selected
.phui-list-item-href,
.device-desktop .phui-profile-menu .phabricator-side-menu
.phui-list-item-selected
.phui-list-item-href:hover {
background-color: rgba(0, 0, 0, 0.150);
color: {$menu.profile.text.selected};
}