Sith/core/static/core/navbar.scss

158 lines
2.8 KiB
SCSS

@import "colors";
$desktop-size: 500px;
nav.navbar {
background-color: $primary-dark-color;
margin: 1em;
color: white;
border-radius: 0.6em;
min-height: 40px;
@media (max-width: $desktop-size) {
position: relative;
flex-direction: column;
align-items: flex-start;
gap: 0;
margin: .2em;
>.content[mobile-display="hidden"] {
display: none;
}
>.content[mobile-display="revealed"] {
display: block;
}
}
>.expand-button {
background-color: transparent;
display: none;
position: relative;
padding: 10px;
cursor: pointer;
width: 40px;
height: 40px;
justify-content: center;
align-items: center;
margin: 0;
>i {
font-size: 1.5em;
color: white;
}
@media (max-width: $desktop-size) {
display: flex;
}
}
>.content {
@media (min-width: $desktop-size) {
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
display: flex;
}
>.menu,
>.link {
box-sizing: border-box;
width: 130px;
height: 52px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
@media (max-width: $desktop-size) {
width: 100%;
height: auto;
justify-content: flex-start;
&:last-child {
border-radius: 0 0 .6em .6em;
>.content {
box-shadow: 3px 3px 3px 0 #dfdfdf;
}
}
}
}
>.menu>.head,
>.link {
color: white;
}
>.menu>summary,
>.link {
@media (max-width: $desktop-size) {
padding: 10px;
}
}
>.link {
padding: 10px 20px;
box-sizing: border-box;
}
.link:hover,
.menu:hover {
background-color: rgba(0, 0, 0, .2);
}
details.menu {
cursor: pointer;
user-select: none;
z-index: 10;
align-items: center;
display: inline-block;
summary {
list-style: none;
display: flex;
align-items: center;
height: 100%;
padding-left: 20px;
padding-right: 20px;
@media (min-width: $desktop-size) {
justify-content: center;
}
}
summary::-webkit-details-marker {
display: none;
}
ul.content {
list-style-type: none;
background: white;
margin: 0;
@media (min-width: $desktop-size) {
box-shadow: 3px 3px 3px 0 #dfdfdf;
}
>li>a {
display: flex;
padding: 15px 20px;
@media (max-width: $desktop-size) {
padding: 10px;
}
&:hover {
color: hsl(203, 75%, 40%);
background-color: rgba(0, 0, 0, .05);
}
}
}
}
}
}