lbry.tech/content/.vuepress/scss/partials/_navigation.scss
2018-05-30 12:20:33 +03:00

96 lines
1.8 KiB
SCSS

.navigation {
top: 0; left: 0;
background-color: $white;
box-shadow: 0 1px 5px rgba($black, 0.1);
padding-right: env(safe-area-inset-right);
padding-left: env(safe-area-inset-left);
position: fixed;
width: 100%;
z-index: 10;
> div:first-of-type {
position: relative;
@media (min-width: 701px) {
align-items: stretch;
display: flex;
flex-flow: row wrap;
}
@media (max-width: 700px) {
overflow: auto;
overflow-scrolling: touch;
white-space: nowrap;
width: 100%;
&::before {
width: 2rem; height: 4rem;
top: 0; right: 0;
background-image: linear-gradient(90deg, rgba($white, 0), $white 50%, $white); // iOS Safari cannot handle `transparent`
content: "";
position: fixed;
z-index: 2;
}
}
}
}
.navigation__item {
overflow: hidden;
padding-right: 0.5rem;
padding-left: 0.5rem;
position: relative;
@media (max-width: 700px) {
display: inline-block;
transform: translate3d(0, 0, 0);
transition: opacity 0.2s 0.2s ease, transform 0.4s 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
vertical-align: top;
&:last-of-type {
margin-right: 3rem;
}
}
&:first-of-type {
@include hide-text;
width: 10rem; height: 3rem;
background-image: url("../media/svg/logo.svg");
background-repeat: no-repeat;
background-size: contain;
flex: 1;
top: 0.5rem;
}
&:not(:first-of-type) {
color: inherit;
font-size: 1rem;
line-height: 4rem;
&::after {
width: 100%; height: 3px;
background-color: $teal;
content: "";
left: 0;
position: absolute;
transition: bottom 0.2s;
}
&:not(:hover) {
&::after {
bottom: -3px;
}
}
&:hover,
&.router-link-active {
&::after {
bottom: 0;
}
}
}
}