.menu-button { display: inline-block; width: 2.5em; height: 2.5em; line-height: 2.5em; text-align: center; font-size: 1rem; position: relative; } div.menu-button > span { color:white; } .menu { max-height: 100vh; //transition: max-height 0.2s; overflow: hidden; box-shadow: 0 0 20px rgba(0,0,0,.3); position: fixed; top: 3.4rem; right:0.5rem; left:0.5rem; background-color: #fff; border-radius: 0.25rem; padding: 0.5rem; z-index: 3; } :host-context(.fullscreen) .menu { top:4em; } .card { padding:0.5rem; min-width: 10rem; } .username { white-space: nowrap; font-weight: 500; font-size: 1.2rem; line-height: 1.2rem; } .card-body { text-align: left; } .hidden { max-height: 0; } .menu.hidden { padding: 0; } .menu-button.hidden { overflow: hidden; } @media screen and (min-width: 44rem) { .menu { position: absolute; top: 3rem; right:0; left: unset; max-width: 30em; } :host-context(.fullscreen) .menu { top: 3rem; } }