/** * This file handles styling for the menu bar at the top containing the logo, navigation and version selector. * It also handles the mobile version of the menu. */ html.is-clipped--navbar { overflow-y: hidden; } body { padding-top: var(--navbar-height); } .navbar { background: var(--navbar-background); color: var(--navbar-font-color); font-size: calc(16 / var(--rem-base) * 1rem); height: var(--navbar-height); position: fixed; top: 0; width: 100%; z-index: var(--z-index-navbar); display: flex; justify-content: space-between; padding: 0 1rem; box-shadow: 0 8px 10px 0 rgba(0, 0, 0, 0.1); } .navbar a { text-decoration: none; } .navbar-brand { display: flex; } .navbar-brand .navbar-item:first-child { padding: 0; } .navbar-brand .navbar-item:first-child a { color: inherit; word-wrap: normal; } .navbar-brand .navbar-item:first-child img { height: 22px; display: inline-block; margin-top: -4px; padding-right: 20px; } .navbar-brand .navbar-item.documentation-link { position: relative; font-size: 18px; letter-spacing: 1px; } .navbar-brand .navbar-item.documentation-link::before { content: ''; position: absolute; display: inline-block; left: 0; top: 25px; width: 1px; height: 23px; background-color: var(--color-brand-secondary); } .navbar-item, .navbar-link { color: var(--navbar-menu-font-color); line-height: var(--doc-line-height); padding: 0.5rem 1rem; display: flex; position: relative; flex: none; } .navbar-link:hover { color: var(--navbar-menu-font-color-hover); } .navbar-item.has-dropdown { padding: 0; } .navbar-link { padding-right: 2.5em; } .navbar-dropdown .navbar-item { padding: 0.5rem 3rem 0.5rem 1rem; color: var(--doc-font-color); white-space: nowrap; } .navbar-divider { background-color: var(--navbar-menu-border-color); border: none; height: 1px; margin: 0.25rem 0; } .navbar .button { margin: 20px 0; border-radius: calc(1.75rem / 2); color: var(--navbar-button-font-color); background: var(--navbar-button-background); } .navbar-menu { display: flex; } .navbar-end { display: flex; justify-content: right; } .navbar-item:not(.has-dropdown), .navbar-link { align-items: center; } /** center the menu by having the left and right elements of the same size */ #topbar-left, #topbar-right { width: 190px; } .version-button .navbar-link::after { border-width: 0 0 1px 1px; border-style: solid; content: ""; display: block; height: 0.5em; pointer-events: none; position: absolute; transform: rotate(-45deg); width: 0.5em; margin-top: -0.375em; right: 1.125em; top: 50%; } .navbar-dropdown { background: var(--navbar-menu-background); border: 1px solid var(--navbar-menu-border-color); box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1); border-top: none; border-radius: 0 0 0.25rem 0.25rem; display: none; top: 100%; left: 0; min-width: 100%; position: absolute; } .navbar-item.is-hoverable:hover .navbar-dropdown { display: block; } .navbar-dropdown .navbar-item:last-child { border-radius: inherit; } .navbar-dropdown.is-right { left: auto; right: 0; } .navbar-dropdown a.navbar-item:hover { background: var(--navbar-menu_hover-background); color: var(--navbar-menu-font-color-hover); } #search-button { cursor: pointer; padding-right: 2rem; } /** * Mobile popup & burger */ .navbar-burger { background: none; border: none; outline: none; line-height: 1; position: relative; padding: 0; padding-right: 1.5rem; display: none; /** flex */ flex-direction: column; align-items: center; justify-content: center; min-width: 0; } .navbar-burger span { background-color: var(--navbar-font-color); height: 1.5px; width: 1rem; } .navbar-burger:not(.is-active) span { transition: transform ease-out 0.25s, opacity 0s 0.25s, margin-top ease-out 0.25s 0.25s; } .navbar-burger span + span { margin-top: 0.25rem; } .navbar-burger.is-active span + span { margin-top: -1.5px; } .navbar-burger.is-active span:nth-child(1) { transform: rotate(45deg); } .navbar-burger.is-active span:nth-child(2) { opacity: 0; } .navbar-burger.is-active span:nth-child(3) { transform: rotate(-45deg); } .mobile-popup-menu { position: fixed; display: none; z-index: 5; top: var(--navbar-height); width: 100%; background: var(--navbar-menu-background); box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1); max-height: var(--body-min-height); overflow-y: auto; overscroll-behavior: none; padding: 0.5rem 0; } .mobile-popup-menu a { text-decoration: none; } /** disable the caret */ .mobile-popup-menu .navbar-link::after { display: none; } .mobile-popup-menu .navbar-item.has-dropdown { flex-direction: column; min-width: none; } .mobile-popup-menu .navbar-dropdown { display: inline; position: relative; min-width: none; } /** indent sub items a little bit to distinguish them visually */ .mobile-popup-menu .navbar-dropdown .navbar-item, .mobile-popup-menu .navbar-divider { padding-left: 2rem; } .mobile-popup-menu .navbar-item, .mobile-popup-menu .navbar-link { color: var(--navbar-menu-font-color); } .mobile-popup-menu a.navbar-item:hover, .mobile-popup-menu .navbar-link:hover { background: var(--navbar-menu_hover-background); color: var(--navbar-menu-font-color-hover); } .mobile-popup-menu:not(.is-active) { display: none; } /** At this breakpoint, disable the menu and replace it with the burger and pop up menu */ @media screen and (max-width: 1200px) { .navbar-menu { display: none; } .navbar-burger { display: flex; } .mobile-popup-menu { display: block; } .navbar-brand .navbar-item.documentation-link { font-size: unset; } #version-dropdown.is-active { display: block; } } @media screen and (max-width: 768px) { .navbar-burger, #search-button { padding: 0 1rem 0 0; } } @media screen and (max-width: 450px) { .navbar-brand .navbar-item.documentation-link, .navbar-brand .navbar-item.documentation-link::before { display: none; } }