tweb-i2p/src/scss/partials/_slider.scss

226 lines
4.3 KiB
SCSS
Raw Normal View History

2020-08-27 21:25:47 +03:00
$slider-time: .25s;
.menu-horizontal-div {
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
position: relative;
z-index: 2;
flex-direction: row;
color: $color-gray;
border-bottom: 1px solid $lightgrey;
position: relative;
&-item {
display: inline-block;
padding: .75rem 1rem;
cursor: pointer;
text-align: center;
flex: 1 1 auto;
//flex: 0 0 auto;
//overflow: hidden;
user-select: none;
// font-size: 1rem;
font-size: 14px;
font-weight: 500;
position: relative;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
html.no-touch & {
background-color: transparent;
transition: background-color .15s ease-in-out;
&:hover {
background-color: var(--color-gray-hover);
}
}
> span {
position: relative;
display: inline-flex;
align-items: center;
}
&.active {
color: $color-blue;
i {
opacity: 1;
}
}
}
i {
position: absolute;
bottom: calc(-.625rem - 2px);
left: 0;
opacity: 0;
background-color: $color-blue;
height: .1875rem;
width: 100%;
border-radius: .1875rem .1875rem 0 0;
pointer-events: none;
padding-right: .5rem;
margin-left: -.25rem;
box-sizing: content-box;
transform-origin: left;
z-index: 1;
&.animate {
transition: transform $slider-time;
}
}
}
.menu-horizontal {
2020-05-09 15:02:07 +03:00
color: $color-gray;
border-bottom: 1px solid $lightgrey;
position: relative;
ul {
width: 100%;
height: 100%;
margin: 0;
display: flex;
justify-content: space-around;
align-items: center;
position: relative;
z-index: 2;
2020-06-19 14:49:55 +03:00
flex-direction: row;
}
li {
display: inline-block;
padding: .75rem 1rem;
cursor: pointer;
text-align: center;
flex: 1 1 auto;
//flex: 0 0 auto;
//overflow: hidden;
user-select: none;
// font-size: 1rem;
font-size: 14px;
font-weight: 500;
2020-06-19 14:49:55 +03:00
position: relative;
2020-06-21 15:25:17 +03:00
border-top-left-radius: 6px;
2020-08-27 21:25:47 +03:00
border-top-right-radius: 6px;
html.no-touch & {
background-color: transparent;
transition: background-color .15s ease-in-out;
&:hover {
background-color: var(--color-gray-hover);
}
}
2020-08-27 21:25:47 +03:00
> span {
position: relative;
display: inline-flex;
align-items: center;
}
&.active {
2020-05-09 15:02:07 +03:00
color: $color-blue;
2020-08-27 21:25:47 +03:00
i {
opacity: 1;
}
}
}
2020-08-27 21:25:47 +03:00
/* &__stripe {
position: absolute;
2020-05-09 15:02:07 +03:00
background: $color-blue;
2020-06-21 15:25:17 +03:00
left: 0;
//left: -2px;
transition: .3s transform, .3s width;
//transition: .3s transform;
bottom: -1px;
height: 4px;
width: 1px; // need if using transform
transform: scaleX(1) translateX(0px);
border-top-left-radius: 2px;
border-top-right-radius: 2px;
z-index: 1;
2020-06-21 15:25:17 +03:00
@include respond-to(handhelds) {
display: none;
}
2020-08-27 21:25:47 +03:00
} */
i {
position: absolute;
bottom: calc(-.625rem - 2px);
left: 0;
opacity: 0;
background-color: $color-blue;
height: .1875rem;
width: 100%;
border-radius: .1875rem .1875rem 0 0;
pointer-events: none;
padding-right: .5rem;
margin-left: -.25rem;
box-sizing: content-box;
transform-origin: left;
z-index: 1;
2020-08-27 21:25:47 +03:00
&.animate {
transition: transform $slider-time;
}
}
}
.tabs-container {
min-width: 100%;
width: 100%;
display: grid;
//grid-template-columns: 1fr;
grid-template-columns: 100%;
/* @include respond-to(not-handhelds) {
overflow-x: hidden;
} */
// &.animated {
// transition: .3s transform;
// }
> div {
2020-10-29 18:26:08 +02:00
height: 100%;
max-height: 100%;
width: 100%;
max-width: 100%;
//transition: transform .42s, filter .42s;
2020-08-27 21:25:47 +03:00
transition: transform $slider-time, filter $slider-time;
display: none;
flex-direction: column;
position: relative;
grid-row-start: 1;
grid-column-start: 1;
background-color: #fff;
//z-index: 1;
//@include respond-to(not-handhelds) {
overflow: hidden;
//}
&.active {
display: flex;
}
> div:not(.scroll-padding) {
width: 100%;
max-width: 100%;
/* overflow: hidden; */
position: relative;
}
}
2020-08-27 21:25:47 +03:00
&[data-slider="tabs"] {
transition: transform $slider-time;
}
}