hugo-theme-hello-friend/source/css/menu.css

117 lines
1.7 KiB
CSS
Raw Normal View History

2019-02-01 10:06:44 +01:00
@define-mixin menu {
position: absolute;
2018-07-20 19:14:22 +02:00
background: #fafafa;
2019-02-01 10:06:44 +01:00
box-shadow: var(--shadow);
margin: 0;
padding: 10px;
list-style: none;
border-radius: 5px;
z-index: 99;
2018-07-20 19:14:22 +02:00
.dark-theme & {
background: #252627;
}
2019-02-01 10:06:44 +01:00
}
.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;
2018-07-20 19:14:22 +02:00
@media (--phone) {
2019-02-01 10:06:44 +01:00
@mixin menu;
2018-07-20 19:14:22 +02:00
top: 50px;
right: 0;
2019-02-01 10:06:44 +01:00
}
a {
text-decoration: none;
2018-07-20 19:14:22 +02:00
}
&__inner {
display: flex;
align-items: center;
2019-01-29 19:24:36 +01:00
justify-content: flex-end;
flex-wrap: wrap;
2018-07-20 19:14:22 +02:00
list-style: none;
2019-02-01 10:06:44 +01:00
margin: 0;
padding: 0;
&--desktop {
@media (--phone) {
display: none;
}
}
&--mobile {
display: none;
@media (--phone) {
display: block;
}
}
2018-07-20 19:14:22 +02:00
li {
2019-02-01 10:06:44 +01:00
text-align: left;
flex: 0 0 auto;
&:not(:first-of-type) {
margin-left: 20px;
}
2018-07-20 19:14:22 +02:00
}
@media (--phone) {
flex-direction: column;
align-items: flex-start;
padding: 0;
li {
2019-02-01 10:06:44 +01:00
margin-left: 0 !important;
2018-07-20 19:14:22 +02:00
padding: 5px;
}
}
}
2019-02-01 10:06:44 +01:00
&__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;
}
}
}
}
2018-07-20 19:14:22 +02:00
&-trigger {
width: 24px;
height: 24px;
fill: currentColor;
margin-left: 10px;
cursor: pointer;
2018-07-20 19:14:22 +02:00
}
}