packages/frontend/app/styles/mixins/header-menu.scss
@use "../ilios-common/mixins" as cm;
@use "../ilios-common/colors" as c;
@use "sass:color";
$header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%);
@mixin header-menu() {
margin: 0 0 0 0.5rem;
position: relative;
text-align: right;
button {
background-color: transparent;
border: 1px solid $header-menu-background-color;
border-radius: 0.2rem;
color: c.$raisinBlack;
font-weight: normal;
padding: 0.25rem;
}
.menu {
background-color: $header-menu-background-color;
box-shadow: 0 2px 2px color.adjust(c.$black, $alpha: -0.8);
display: flex;
flex-direction: column;
list-style-type: none;
margin: 0;
padding: 0;
position: absolute;
top: 1.6rem;
right: 0;
z-index: 100;
}
.toggle {
background-color: $header-menu-background-color;
span {
display: none;
@include cm.for-laptop-and-up {
display: inline;
margin-left: 0.5rem;
}
}
&:hover,
&[aria-expanded="true"] {
background-color: c.$white;
}
&[aria-expanded="true"] {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
}
}
@mixin header-menu-item() {
border: 0;
background-color: $header-menu-background-color;
color: c.$black;
display: block;
outline: none;
padding: 0.5rem 1rem;
text-align: right;
text-decoration: none;
white-space: nowrap;
&[aria-checked="true"],
&.active {
background-color: color.adjust(c.$fernGreen, $lightness: 25%);
}
&:hover,
&:focus {
background-color: c.$white;
&[aria-checked="true"],
&.active {
background-color: color.adjust(c.$fernGreen, $lightness: 15%);
}
}
}