File: D:/HostingSpaces/stafa/werkenbijstafa.nl/resources/sass/site/6-Organisms/_organisms.tabslider.scss
// Component settings: Tabslider
// ------------------------------------------
$o-tabslider: (
'color': palette(text),
'bgcolor': palette(light),
'border-color': palette(border),
'active-color': palette(text-on-primary),
'active-bgcolor': palette(primary),
'active-border-color': palette(primary),
'tab-gap': space(1),
);
/*
* On small screens the content is stacked, without controls
* When the screen is wide enough we add the controls
* and show only the chosen 'slide content'
*/
.o-tabslider {
@include contain;
}
// Shared styling for tab- and step-buttons
.o-tabslider__button {
@include border-radius(m);
min-height: space(6);
color: map-get($o-tabslider, 'color');
background-color: map-get($o-tabslider, 'bgcolor');
border: 1px solid map-get($o-tabslider, 'border-color');
font-weight: 500;
cursor: pointer;
transition-property: color, border;
transition-duration: 250ms;
&:hover {
color: map-get($o-tabslider, 'active-bgcolor');
border-color: map-get($o-tabslider, 'active-bgcolor');
}
&.is-active {
color: map-get($o-tabslider, 'active-color');
background-color: map-get($o-tabslider, 'active-bgcolor');
border-color: map-get($o-tabslider, 'active-border-color');
}
&:focus {
outline: none;
border-color: palette(primary);
&:not(.is-active):not(:active) {
box-shadow: 0 0 0 1px map-get($o-tabslider, 'bgcolor'), 0 0 5px 3px rgba(map-get($o-tabslider, 'color'), 0.1);
}
}
}
.o-tabslider__controls {
@include mq($max: m) {
display: none;
}
@include mq(m) {
@include flex(center space-between);
}
@include mq(l) {
margin-left: column(1,12);
margin-right: column(1,12);
}
}
.o-tabslider__step {
width: space(6);
}
.o-tabslider__step--prev {
transform: rotate(0.5turn);
}
.o-tabslider__tabs {
@include mq(m){
@include flex();
}
@include mq($bp-max) {
margin: (map-get($o-tabslider, 'tab-gap') * -1) map-get($o-tabslider, 'tab-gap');
}
}
.o-tabslider__tab {
@include font-size(xs);
margin: map-get($o-tabslider, 'tab-gap');
padding: (space(1) - 1px) space(2);
text-transform: uppercase;
}
.o-tabslider__container {
@include mq(m) {
display: grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
margin-top: space(6);
}
}
.o-tabslider__content {
& + & {
@include vspacing-s(
'margin-top' 1
);
}
@include mq(m) {
grid-row: 1;
grid-column: 1;
opacity: 0;
z-index: 0;
transform: translateY(6px);
pointer-events: none;
transform-origin: top center;
transition-property: opacity, transform;
transition-duration: 200ms;
transition-timing-function: ease-in;
&.is-active {
opacity: 1;
z-index: 1;
transform: none;
pointer-events: all;
transition-duration: 500ms;
transition-delay: 200ms;
transition-timing-function: ease-out;
}
}
}
.o-tabslider__label {
@include font-size(xs);
display: block;
padding-bottom: space(1);
text-transform: uppercase;
color: palette(text);
@include mq(m) {
display: none;
}
}