lbry.tech/sass/partials/_navigation.scss

128 lines
2.4 KiB
SCSS
Raw Normal View History

2018-05-02 00:45:31 +02:00
.navigation {
top: 0; left: 0;
background-color: $white;
box-shadow: 0 1px 5px rgba($black, 0.1);
2018-05-11 16:07:16 +02:00
padding-right: env(safe-area-inset-right);
padding-left: env(safe-area-inset-left);
2018-05-02 00:45:31 +02:00
position: fixed;
width: 100%;
z-index: 10;
> div:first-of-type {
2018-05-10 21:13:25 +02:00
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;
2018-05-11 16:07:16 +02:00
width: 100%;
2018-05-10 21:13:25 +02:00
&::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;
}
}
2018-05-02 00:45:31 +02:00
}
}
.navigation__item {
overflow: hidden;
position: relative;
2018-05-10 21:13:25 +02:00
@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;
}
}
2018-05-02 00:45:31 +02:00
&:first-of-type {
@include hide-text;
width: 10rem; height: 3rem;
2018-07-23 23:46:58 +02:00
background-image: url("/assets/media/svg/logo.svg");
background-repeat: no-repeat;
background-size: contain;
2018-05-02 00:45:31 +02:00
flex: 1;
top: 0.5rem;
2018-05-02 00:45:31 +02:00
}
2018-07-19 01:46:58 +02:00
&:not(:first-of-type):not([href="https://lbry.io"]) {
2018-05-02 00:45:31 +02:00
&::after {
width: 100%; height: 3px;
2018-05-11 20:01:39 +02:00
background-color: $teal;
2018-05-02 00:45:31 +02:00
content: "";
left: 0;
position: absolute;
transition: bottom 0.2s;
}
&:not(:hover) {
&::after {
bottom: -3px;
}
}
&:hover,
2018-07-12 17:21:42 +02:00
&.active {
2018-05-02 00:45:31 +02:00
&::after {
bottom: 0;
}
}
}
2018-07-19 01:46:58 +02:00
&:not(:first-of-type) {
color: inherit;
font-size: 1rem;
line-height: 4rem;
}
&:not([href="https://lbry.io"]) {
padding-right: 0.5rem;
padding-left: 0.5rem;
}
&[href="https://lbry.io"] {
color: $white;
margin-right: 0.5rem;
padding-right: 1rem;
padding-left: 1rem;
&:not(:hover)::after {
background-color: $black;
}
&:hover::after {
background-color: $teal;
}
&::after {
width: 100%; height: 2rem;
top: 1rem; left: 0;
border-radius: 3px;
content: "";
position: absolute;
transition: background-color 0.2s;
z-index: -1;
}
}
2018-05-02 00:45:31 +02:00
}