blocks/header/header.css (260 lines of code) (raw):

/* header and nav layout */ header .nav-wrapper { color: var(--text-color); background-color: var(--background-color); margin: auto; max-width: var(--page-max-width); padding-left: 15px; padding-right: 15px; } header .header { border-bottom: 1px solid #ccc; } @media (width >= 768px) { header .nav-wrapper { padding-left: 20px; padding-right: 20px; } } @media (width >= 1200px) { header .nav-wrapper { padding-left: 55px; padding-right: 55px; } } header nav { align-items: center; box-sizing: border-box; display: flex; flex-direction: row-reverse; justify-content: space-between; height: var(--nav-height); width: 100%; } header nav[aria-expanded="true"] { overflow-y: auto; } @media (width >= 1200px) { header nav[aria-expanded="true"] { min-height: 0; overflow: visible; } } header nav a:any-link { color: currentcolor; } /* hamburger */ header nav .nav-hamburger { height: 22px; display: flex; align-items: center; } header nav .nav-hamburger button { height: 22px; margin: 0; border: 0; border-radius: 0; padding: 0; background-color: var(--background-color); color: inherit; overflow: initial; text-overflow: initial; white-space: initial; } header nav .nav-hamburger-icon, header nav .nav-hamburger-icon::before, header nav .nav-hamburger-icon::after { box-sizing: border-box; display: block; position: relative; width: 20px; } header nav .nav-hamburger-icon::before, header nav .nav-hamburger-icon::after { content: ''; position: absolute; background: currentcolor; } header nav[aria-expanded="false"] .nav-hamburger-icon, header nav[aria-expanded="false"] .nav-hamburger-icon::before, header nav[aria-expanded="false"] .nav-hamburger-icon::after { height: 2px; border-radius: 2px; background: currentcolor; } header nav[aria-expanded="false"] .nav-hamburger-icon::before { top: -6px; } header nav[aria-expanded="false"] .nav-hamburger-icon::after { top: 6px; } header nav[aria-expanded="true"] .nav-hamburger-icon { height: 22px; } header nav[aria-expanded="true"] .nav-hamburger-icon::before, header nav[aria-expanded="true"] .nav-hamburger-icon::after { top: 3px; left: 1px; transform: rotate(45deg); transform-origin: 2px 1px; width: 24px; height: 2px; border-radius: 2px; } header nav[aria-expanded="true"] .nav-hamburger-icon::after { top: unset; bottom: 3px; transform: rotate(-45deg); } @media (width >= 1200px) { header nav { flex-direction: row; } header nav .nav-hamburger { display: none; visibility: hidden; } } /* brand */ header .nav-brand { line-height: 1; } header nav .nav-brand img { height: auto; } /* sections */ header nav .nav-sections { flex: 1 1 auto; display: none; visibility: hidden; background-color: var(--background-color); height: 100%; } header nav[aria-expanded="true"] .nav-sections { display: block; visibility: visible; align-self: start; position: absolute; top: calc(var(--nav-height) + 1px); left: 0; width: 100%; z-index: 1; } header nav .nav-sections ul { list-style: none; padding-left: 0; font-size: var(--body-font-size-s); height: 100%; padding-top: 30px; } header nav .nav-sections ul > li { display: flex; font-weight: 600; align-items: center; padding: 15px; } header nav .nav-sections ul > li a:hover { text-decoration: none; } header nav .nav-sections ul > li:not(:has(.icon-search))::before { content: ""; display: none; position: absolute; bottom: 0; height: 5px; width: 100%; background: linear-gradient(to left, var(--link-color) 0, var(--link-color) 100%) left bottom no-repeat; } header nav .nav-sections ul > li .icon-user { width: 18px; margin-right: 10px; } header nav .nav-sections ul > li > ul { margin-top: 0; } header nav .nav-sections ul > li > ul > li { font-weight: 500; } header nav .nav-sections ul > li:hover { cursor: pointer; } header nav .nav-sections ul > li:has(.icon-search) { display: none; } @media (width >= 1200px) { header nav .nav-sections { display: block; visibility: visible; white-space: nowrap; } header nav[aria-expanded="true"] .nav-sections { align-self: unset; position: initial; } header nav .nav-sections .nav-drop { position: relative; padding-right: 16px; cursor: pointer; } header nav .nav-sections .nav-drop::after { content: ''; display: inline-block; position: absolute; top: .5em; right: 2px; transform: rotate(135deg); width: 6px; height: 6px; border: 2px solid currentcolor; border-radius: 0 1px 0 0; border-width: 2px 2px 0 0; } header nav .nav-sections .nav-drop[aria-expanded="true"]::after { top: unset; bottom: .5em; transform: rotate(315deg); } header nav .nav-sections ul { display: flex; gap: 30px; margin: 0; font-size: var(--body-font-size-xs); justify-content: flex-end; padding-top: 0; } header nav .nav-sections > ul > li { flex: 0 1 auto; position: relative; padding: 0; } header nav .nav-sections ul > li:hover::before { display: block; } header nav .nav-sections > ul > li > ul { display: none; position: relative; } header nav .nav-sections > ul > li[aria-expanded="true"] > ul { display: block; position: absolute; left: -1em; width: 200px; margin-top: 12px; padding: 1em; background-color: var(--highlight-background-color); white-space: initial; } header nav .nav-sections > ul > li > ul::before { content: ''; position: absolute; top: -8px; left: 8px; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 8px solid var(--highlight-background-color); } header nav .nav-sections > ul > li > ul > li { padding: 8px 0; } header nav .nav-sections > ul > li:has(.icon-search) { display: flex; } }