hugo-theme-hello-friend/source/css/menu.css
2019-02-01 10:06:44 +01:00

116 lines
1.7 KiB
CSS

@define-mixin menu {
position: absolute;
background: #fafafa;
box-shadow: var(--shadow);
margin: 0;
padding: 10px;
list-style: none;
border-radius: 5px;
z-index: 99;
.dark-theme & {
background: #252627;
}
}
.menu {
--shadow-color: rgba(0, 0, 0, .2);
--shadow: 0 8px 20px var(--shadow-color);
border-right: 1px solid;
margin-right: 18px;
padding-right: 24px;
@media (--phone) {
@mixin menu;
top: 50px;
right: 0;
}
a {
text-decoration: none;
}
&__inner {
display: flex;
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
list-style: none;
margin: 0;
padding: 0;
&--desktop {
@media (--phone) {
display: none;
}
}
&--mobile {
display: none;
@media (--phone) {
display: block;
}
}
li {
text-align: left;
flex: 0 0 auto;
&:not(:first-of-type) {
margin-left: 20px;
}
}
@media (--phone) {
flex-direction: column;
align-items: flex-start;
padding: 0;
li {
margin-left: 0 !important;
padding: 5px;
}
}
}
&__sub-inner {
position: relative;
list-style: none;
padding: 0;
margin: 0;
&:not(:only-child) {
margin-left: 20px;
}
&-more {
@mixin menu;
top: 35px;
left: 0;
&-trigger {
color: var(--accent);
user-select: none;
cursor: pointer;
}
li {
.menu__inner & {
margin-left: 0;
padding: 5px;
white-space: nowrap;
}
}
}
}
&-trigger {
width: 24px;
height: 24px;
fill: currentColor;
margin-left: 10px;
cursor: pointer;
}
}