/** Menu */ #menu { margin-left: -20vw; /* "#menu" width */ width: 20vw; position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000; /* so the menu or its navicon stays above all content */ background: #f0f0f0; overflow-y: auto; } /* All anchors inside the menu should be styled like this. */ #menu a { color: #606060; border: none; padding: 0.6em 0 0.6em 0.6em; font-size: 1.4em; } /* Remove all background/borders, since we are applying them to #menu. */ #menu .pure-menu, #menu .pure-menu ul { border: none; background: transparent; } /* Add that light border to separate items into groups. */ #menu .pure-menu ul, #menu .pure-menu .menu-item-divided { border-top: 1px solid #808080; } #menu .pure-menu i { margin-right: 1ch; } #menu .pure-menu-item i { font-size: 0.6em; } /* Change color of the anchor links on hover/focus. */ #menu .pure-menu li a:hover, #menu .pure-menu li a:focus { background: #ccc; } /* This styles the selected menu item `
  • `. */ #menu .pure-menu-selected { background: #ddd; } #menu .pure-menu-selected i { color: dodgerblue; } /* This styles a link within a selected menu item `
  • `. */ #menu .pure-menu-selected a { color: dodgerblue; font-weight: 500; } /* This styles the menu heading. */ #menu .pure-menu-heading { color: #202020; margin: 0; margin: 10% 5% 10% 5%; position: relative; font-weight: 700; } #menu .pure-menu-heading .avatar { width: 30%; border-radius: 0.5em; } #menu .pure-menu-heading h1 { font-size: 1.4em; text-transform: none; } #menu .pure-menu-heading p { color: #404040; font-size: 1.1em; font-weight: 300; text-transform: none; white-space: normal; } #menu .pure-menu-bottom { bottom: 0; display: none; left: 0; position: absolute; text-align: center; width: 100%; } @media (min-width: 640px) { #menu .pure-menu-bottom { display: block; } } #menu .pure-menu-bottom a { font-size: 1.5em; color: #606060; display: inline-block; text-align: center; border: 0; text-decoration: none; text-align: center; white-space: normal; } #menu .pure-menu-bottom a:hover { color: #404040; } #menu .pure-menu-bottom ul { list-style: none; cursor: default; margin-block-start: 0; padding-inline-start: 0; } #menu .pure-menu-bottom ul li { display: inline-block; text-align: center; } /* -- Dynamic Button For Responsive Menu -------------------------------------*/ /* The button to open/close the Menu is custom-made and not part of Pure. Here's how it works: */ /* `.menu-link` represents the responsive menu toggle that shows/hides on small screens. */ .menu-link { position: fixed; display: block; /* show this only on small screens */ top: 0; left: 0; /* "#menu width" */ background: #eee; background: rgba(0, 0, 0, 0.7); font-size: 10px; /* change this value to increase/decrease button size */ z-index: 10; width: 2em; height: auto; padding: 2.1em 1.6em; } .menu-link:hover, .menu-link:focus { background: #202020; } .menu-link span { position: relative; display: block; } .menu-link span, .menu-link span:before, .menu-link span:after { background-color: #fff; pointer-events: none; width: 100%; height: 0.2em; } .menu-link span:before, .menu-link span:after { position: absolute; margin-top: -0.6em; content: " "; } .menu-link span:after { margin-top: 0.6em; } /* -- Responsive Styles (Media Queries) ------------------------------------- */ #layout, #menu, .menu-link { -webkit-transition: all 0.2s ease-out; -moz-transition: all 0.2s ease-out; -ms-transition: all 0.2s ease-out; -o-transition: all 0.2s ease-out; transition: all 0.2s ease-out; } #layout { position: relative; left: 0; padding-left: 0; } #layout.active #menu { left: 20vw; width: 240px; } #layout.active .menu-link { left: 240px; } /* Hides the menu at `640px`, but modify this based on your app's needs. */ @media (min-width: 640px) { .header { padding-left: 2em; padding-right: 2em; } #layout { padding-left: 20vw; /* left col width "#menu" */ left: 0; } #menu { left: 20vw; } .menu-link { position: fixed; left: 20vw; display: none; } #layout.active .menu-link { left: 20vw; } } @media (max-width: 640px) { /* Only apply this when the window is small. Otherwise, the following case results in extra padding on the left: * Make the window small. * Tap the menu to trigger the active state. * Make the window large again. */ #main.active { position: relative; left: 20vw; } }