website/sass/css/header.scss
2023-07-31 11:01:50 +02:00

102 lines
1.5 KiB
SCSS

@import "defs";
header {
position: sticky;
z-index: 10;
top: 0;
display: flex;
justify-content: space-between;
max-width: 1100px;
height: 48px;
margin: 0 auto 16px auto;
padding: 0 4px;
font-size: 24px;
}
#header-logo {
height: 48px;
}
#header-logo:hover, #header-logo:focus {
filter: drop-shadow(1px 2px 1px $violet);
}
#header-menu > ul {
list-style-type: none;
margin: 9px 0 0 0;
}
#header-menu > ul li {
display: inline-block;
margin: 0 8px;
}
#header-menu a {
padding: 8px 8px;
color: black;
}
#header-menu a:hover, #header-menu a:focus {
text-shadow: 1px 2px 1px $violet;
text-decoration: none;
}
@media (prefers-color-scheme: light) {
header, .header-menu-phone {
background-color: white;
}
}
@media (prefers-color-scheme: dark) {
#header-menu a {
color: white;
}
header, .header-menu-phone {
background-color: black;
}
}
@media (min-width: 960px) {
.phone-only {
display: none;
}
}
@media (max-width: 959px) {
.phone-hidden {
display: none;
}
}
.header-menu-phone {
position: fixed;
z-index: 5;
top: 48px;
left: 0;
padding: 16px;
max-height: calc(100vh - 48px);
overflow-y: auto;
margin-top: 0;
box-sizing: border-box;
border-right: 2px solid $violet;
border-bottom: 2px solid $violet;
border-bottom-right-radius: 6px;
list-style: none;
}
.hamburger-menu {
font-size: 150%;
margin: 0.25em;
font-family: LunaSans;
}
.hamburger-menu:hover, .hamburger-menu:focus {
opacity: 100%;
}
.hamburger-menu > summary {
list-style: none;
cursor: pointer;
}