KNACSS/sass/components/_tabs.scss

61 lines
1.5 KiB
SCSS
Raw Normal View History

2017-08-01 21:13:27 +02:00
/* ----------------------------- */
/* ==Tabs */
/* ----------------------------- */
/* see example on https://knacss.com/styleguide.html#tabs */
/* NOTE : tabs need JavaScript to be activated */
$tabs-border : $gray-200 !default;
$tabs-active-border : $gray-800 !default;
$tabs-color : $color-base !default;
$tabs-active-color : $gray-800 !default;
$tabs-background : transparent !default;
$tabs-active-background : transparent !default;
$tabs-border-radius : 0 !default;
2017-08-01 21:13:27 +02:00
.tabs-menu {
2017-09-26 11:42:46 +02:00
border-bottom: 2px solid $tabs-border;
2017-08-01 21:13:27 +02:00
2017-09-07 15:54:20 +02:00
&-link {
display: block;
margin-bottom: -2px;
padding: $spacer-tiny $spacer-medium-plus;
2017-09-07 15:54:20 +02:00
border-bottom: 4px solid transparent;
2017-09-26 11:42:46 +02:00
color: $tabs-color;
background: $tabs-background;
2017-09-07 15:54:20 +02:00
text-decoration: none;
2017-09-26 11:42:46 +02:00
border-radius: $tabs-border-radius $tabs-border-radius 0 0;
2017-09-07 15:54:20 +02:00
transition: .25s;
transition-property: color, border, background-color;
2017-08-01 21:13:27 +02:00
2017-09-07 15:54:20 +02:00
&.is-active {
2017-09-26 11:42:46 +02:00
border-bottom-color: $tabs-active-border;
color: $tabs-active-color;
background: $tabs-active-background;
2017-09-07 15:54:20 +02:00
outline: 0;
}
2017-08-01 21:13:27 +02:00
2017-09-07 15:54:20 +02:00
&:focus {
2017-09-26 11:42:46 +02:00
border-bottom-color: $tabs-active-border;
color: $tabs-active-color;
2017-09-07 15:54:20 +02:00
outline: 0;
}
@media (min-width: $small) {
display: inline-block;
}
2017-08-01 21:13:27 +02:00
}
}
.tabs-content-item {
padding-top: $spacer-small;
2017-08-01 21:13:27 +02:00
2017-09-07 15:54:20 +02:00
&[aria-hidden="true"] {
visibility: hidden;
@extend .visually-hidden;
}
2017-08-01 21:13:27 +02:00
2017-09-07 15:54:20 +02:00
&[aria-hidden="false"] {
visibility: visible;
}
2017-08-01 21:13:27 +02:00
}