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

137 lines
2.2 KiB
CSS
Raw Normal View History

2019-02-01 10:06:44 +01:00
@define-mixin menu {
position: absolute;
2020-06-20 00:07:59 +02:00
background: var(--header);
2019-02-01 10:06:44 +01:00
box-shadow: var(--shadow);
margin: 0;
2019-02-01 15:35:13 +01:00
padding: 5px;
2019-02-01 10:06:44 +01:00
list-style: none;
border-radius: 5px;
z-index: 99;
}
.menu {
2020-06-20 00:07:59 +02:00
--color: rgba(0, 0, 0, .12);
--shadow: 0 8px 20px var(--color);
2019-02-01 10:06:44 +01:00
border-right: 1px solid;
margin-right: 18px;
padding-right: 24px;
font-weight: 500;
2018-07-20 19:14:22 +02:00
@media (--phone) {
2019-02-01 10:06:44 +01:00
@mixin menu;
2019-02-01 15:35:13 +01:00
border: none;
2018-07-20 19:14:22 +02:00
top: 50px;
2019-02-01 15:35:13 +01:00
right: 10px;
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;
2019-02-01 15:35:13 +01:00
padding: 10px;
2018-07-20 19:14:22 +02:00
}
}
}
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 {
2019-02-06 12:52:43 +01:00
display: inline-flex;
align-items: center;
2019-02-01 10:06:44 +01:00
user-select: none;
cursor: pointer;
2019-02-01 15:35:13 +01:00
&-icon {
2019-02-06 12:52:43 +01:00
display: inline-flex;
align-items: center;
margin-left: 3px;
2019-02-01 15:35:13 +01:00
transform: rotate(90deg);
line-height: 1;
2019-02-06 12:52:43 +01:00
@mixin greater-icon 5px;
2019-02-01 15:35:13 +01:00
}
2019-02-01 10:06:44 +01:00
}
li {
.menu__inner & {
margin-left: 0;
white-space: nowrap;
2019-02-01 15:35:13 +01:00
&:hover {
background: rgba(0, 0, 0, 0.05);
border-radius: 3px;
cursor: pointer;
}
2019-02-01 10:06:44 +01:00
}
}
2020-05-17 02:41:26 +02:00
li a {
width: 100%;
display: inline-block;
2020-05-17 02:41:26 +02:00
padding: 10px;
}
2019-02-01 10:06:44 +01:00
}
}
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
}
}