amis/scss/components/_tabs.scss

147 lines
4.0 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Tabs {
&-links {
border-bottom: $Tabs-borderWidth solid $Tabs-borderColor;
> .#{$ns}Tabs-link {
2019-04-30 11:11:25 +08:00
margin-bottom: -$Tabs-borderWidth;
display: inline-block;
> a {
2019-04-30 11:11:25 +08:00
font-size: $Tabs-linkFontSize;
outline: none;
border: $Tabs-borderWidth solid transparent;
border-top-left-radius: $Tabs-borderRadius;
border-top-right-radius: $Tabs-borderRadius;
color: $Tabs-color;
margin-right: px2rem(2px);
padding: $gap-sm $gap-base;
text-decoration: none;
cursor: pointer;
}
&:hover > a,
> a:focus {
2019-04-30 11:11:25 +08:00
border-color: $Tabs-onHover-borderColor;
text-decoration: none;
}
&.disabled > a,
&.is-disabled > a {
2019-04-30 11:11:25 +08:00
color: $Tabs-onDisabled-color;
background-color: transparent;
border-color: transparent;
pointer-events: none;
}
&.active > a,
&.is-active > a {
2019-04-30 11:11:25 +08:00
color: $Tabs-onActive-color;
background-color: $Tabs-onActive-bg;
border-color: $Tabs-onActive-borderColor;
border-bottom-color: transparent;
}
}
}
2019-04-30 11:11:25 +08:00
&-content {
background-color: $Tabs-content-bg;
padding: $gap-base;
border-style: solid;
border-width: 0 $Tabs-borderWidth $Tabs-borderWidth;
border-color: $Tabs-borderColor;
}
2019-04-30 11:11:25 +08:00
&--line {
> .#{$ns}Tabs-links {
2019-04-30 11:11:25 +08:00
border-bottom-color: #e2e5ec;
> li {
2019-04-30 11:11:25 +08:00
&.active {
> a,
> a:hover,
> a:focus {
2019-04-30 11:11:25 +08:00
border-bottom: px2rem(2px) solid $primary;
color: $primary;
background-color: transparent;
border-color: transparent transparent $primary
transparent;
2019-04-30 11:11:25 +08:00
}
}
> a,
> a:hover,
> a:focus {
2019-04-30 11:11:25 +08:00
color: #666;
background-color: transparent;
border-color: transparent;
}
}
}
}
2019-04-30 11:11:25 +08:00
&--card {
> .#{$ns}Tabs-links {
2019-04-30 11:11:25 +08:00
background-color: #eceff8;
border-top: px2rem(1px) solid #e2e5ec;
> li {
2019-04-30 11:11:25 +08:00
&.active {
> a,
> a:hover,
> a:focus {
2019-04-30 11:11:25 +08:00
color: $primary;
background-color: #fff;
margin-left: px2rem(1px);
}
}
> a,
> a:hover,
> a:focus {
2019-04-30 11:11:25 +08:00
color: #666;
background-color: transparent;
}
}
}
}
2019-04-30 11:11:25 +08:00
&--radio {
> .#{$ns}Tabs-links {
2019-04-30 11:11:25 +08:00
border: 0;
margin-bottom: px2rem(10px);
> li {
> a {
2019-04-30 11:11:25 +08:00
font-size: $fontSizeSm;
text-align: center;
margin-right: 0;
padding: 0 px2rem(20px);
height: px2rem(30px);
line-height: px2rem(30px);
}
2019-04-30 11:11:25 +08:00
&.active {
> a,
> a:hover,
> a:focus {
2019-04-30 11:11:25 +08:00
color: #fff;
background-color: $primary;
margin-left: px2rem(1px);
}
}
> a,
> a:hover,
> a:focus {
2019-04-30 11:11:25 +08:00
color: $primary;
background-color: #eaf6fe;
}
}
}
2019-04-30 11:11:25 +08:00
.tab-content {
border-top: $Tabs-borderWidth solid $Tabs-borderColor;
}
}
}