new styles for tabs

This commit is contained in:
Raphael Goetter 2017-08-08 15:33:53 +02:00
parent abe0ab4e83
commit 07a574134e
3 changed files with 52 additions and 62 deletions

View file

@ -2288,42 +2288,35 @@ button:focus {
/* see example on https://knacss.com/styleguide.html#tabs */
/* NOTE : tabs need JavaScript to be activated */
.tabs-menu {
list-style: none;
padding-left: 0;
border-bottom: 2px solid #727e96;
}
.tabs-menu-item {
margin-bottom: -2px;
}
@media (min-width: 480px) {
.tabs-menu-item {
display: inline-block;
}
border-bottom: 2px solid #ddd;
}
.tabs-menu-link {
display: block;
margin-bottom: -2px;
padding: 0.5rem 3rem;
border-bottom: 4px solid transparent;
text-decoration: none;
-webkit-transition: .25s background-color;
transition: .25s background-color;
}
@media (min-width: 480px) {
.tabs-menu-link {
display: inline-block;
}
}
.tabs-menu-link:hover, .tabs-menu-link:focus {
color: #727e96;
-webkit-transition: .25s;
transition: .25s;
-webkit-transition-property: color, border, background-color;
transition-property: color, border, background-color;
}
.tabs-menu-link.is-active {
color: #fff;
background-color: #727e96;
border-bottom-color: #ddd;
outline: 0;
}
.tabs-menu-link:focus {
border-bottom-color: #727e96;
color: #727e96;
}
@media (min-width: 576px) {
.tabs-menu-link {
display: inline-block;
}
}
.tabs-content-item {

File diff suppressed because one or more lines are too long

View file

@ -5,46 +5,43 @@
/* NOTE : tabs need JavaScript to be activated */
.tabs-menu {
list-style: none;
padding-left: 0;
border-bottom: 2px solid $color-forms;
&-item {
@media (min-width: $tiny) {
display: inline-block;
}
margin-bottom: -2px;
border-bottom: 2px solid #ddd;
}
&-link {
.tabs-menu-link {
display: block;
@media (min-width: $tiny) {
display: inline-block;
}
margin-bottom: -2px;
padding: $tiny-value $medium-plus-value;
border-bottom: 4px solid transparent;
text-decoration: none;
transition: .25s background-color;
transition: .25s;
transition-property: color, border, background-color;
}
&:hover, &:focus {
.tabs-menu-link.is-active {
border-bottom-color: #ddd;;
outline: 0;
}
.tabs-menu-link:focus {
border-bottom-color: $color-forms;
color: $color-forms;
}
&.is-active {
color: #fff;
background-color: $color-forms;
}
@media (min-width: $small) {
.tabs-menu-link {
display: inline-block;
}
}
.tabs-content-item {
padding-top: 10px;
}
&[aria-hidden="true"] {
.tabs-content-item[aria-hidden="true"] {
visibility: hidden;
@extend .visually-hidden;
}
&[aria-hidden="false"] {
.tabs-content-item[aria-hidden="false"] {
visibility: visible;
}
}