mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-03 20:48:49 +08:00
147 lines
4.0 KiB
SCSS
147 lines
4.0 KiB
SCSS
.#{$ns}Tabs {
|
|
&-links {
|
|
border-bottom: $Tabs-borderWidth solid $Tabs-borderColor;
|
|
|
|
> .#{$ns}Tabs-link {
|
|
margin-bottom: -$Tabs-borderWidth;
|
|
display: inline-block;
|
|
|
|
> a {
|
|
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 {
|
|
border-color: $Tabs-onHover-borderColor;
|
|
text-decoration: none;
|
|
}
|
|
|
|
&.disabled > a,
|
|
&.is-disabled > a {
|
|
color: $Tabs-onDisabled-color;
|
|
background-color: transparent;
|
|
border-color: transparent;
|
|
pointer-events: none;
|
|
}
|
|
|
|
&.active > a,
|
|
&.is-active > a {
|
|
color: $Tabs-onActive-color;
|
|
background-color: $Tabs-onActive-bg;
|
|
border-color: $Tabs-onActive-borderColor;
|
|
border-bottom-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-content {
|
|
background-color: $Tabs-content-bg;
|
|
padding: $gap-base;
|
|
border-style: solid;
|
|
border-width: 0 $Tabs-borderWidth $Tabs-borderWidth;
|
|
border-color: $Tabs-borderColor;
|
|
}
|
|
|
|
&--line {
|
|
> .#{$ns}Tabs-links {
|
|
border-bottom-color: #e2e5ec;
|
|
|
|
> li {
|
|
&.active {
|
|
> a,
|
|
> a:hover,
|
|
> a:focus {
|
|
border-bottom: px2rem(2px) solid $primary;
|
|
color: $primary;
|
|
background-color: transparent;
|
|
border-color: transparent transparent $primary
|
|
transparent;
|
|
}
|
|
}
|
|
|
|
> a,
|
|
> a:hover,
|
|
> a:focus {
|
|
color: #666;
|
|
background-color: transparent;
|
|
border-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&--card {
|
|
> .#{$ns}Tabs-links {
|
|
background-color: #eceff8;
|
|
border-top: px2rem(1px) solid #e2e5ec;
|
|
|
|
> li {
|
|
&.active {
|
|
> a,
|
|
> a:hover,
|
|
> a:focus {
|
|
color: $primary;
|
|
background-color: #fff;
|
|
margin-left: px2rem(1px);
|
|
}
|
|
}
|
|
|
|
> a,
|
|
> a:hover,
|
|
> a:focus {
|
|
color: #666;
|
|
background-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&--radio {
|
|
> .#{$ns}Tabs-links {
|
|
border: 0;
|
|
margin-bottom: px2rem(10px);
|
|
|
|
> li {
|
|
> a {
|
|
font-size: $fontSizeSm;
|
|
text-align: center;
|
|
margin-right: 0;
|
|
padding: 0 px2rem(20px);
|
|
height: px2rem(30px);
|
|
line-height: px2rem(30px);
|
|
}
|
|
|
|
&.active {
|
|
> a,
|
|
> a:hover,
|
|
> a:focus {
|
|
color: #fff;
|
|
background-color: $primary;
|
|
margin-left: px2rem(1px);
|
|
}
|
|
}
|
|
|
|
> a,
|
|
> a:hover,
|
|
> a:focus {
|
|
color: $primary;
|
|
background-color: #eaf6fe;
|
|
}
|
|
}
|
|
}
|
|
|
|
.tab-content {
|
|
border-top: $Tabs-borderWidth solid $Tabs-borderColor;
|
|
}
|
|
}
|
|
}
|