You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

442 lines
8.5 KiB

@tab-prefix-cls: ant-tabs;
10 years ago
@effect-duration: .3s;
10 years ago
.@{tab-prefix-cls} {
10 years ago
outline: none;
box-sizing: border-box;
position: relative;
overflow: hidden;
.clearfix;
color: @text-color;
10 years ago
&-ink-bar {
z-index: 1;
position: absolute;
left: 0;
bottom: 1px;
10 years ago
box-sizing: border-box;
10 years ago
height: 2px;
10 years ago
background-color: @primary-color;
10 years ago
transform: scaleX(1);
transform-origin: 0 0;
10 years ago
&-transition-forward {
transition: right 0.3s @ease-in-out,
left 0.3s @ease-in-out 0.3s * 0.3;
10 years ago
}
10 years ago
&-transition-backward {
transition: right 0.3s @ease-in-out 0.3s * 0.3,
left 0.3s @ease-in-out;
10 years ago
}
}
&-tabs-bar {
border-bottom: 1px solid @border-color-base;
margin-bottom: 16px;
}
10 years ago
&-nav-container {
9 years ago
overflow: hidden;
10 years ago
font-size: 14px;
line-height: @line-height-base;
10 years ago
box-sizing: border-box;
position: relative;
white-space: nowrap;
margin-bottom: -1px;
10 years ago
.clearfix;
10 years ago
}
&-nav-container-scrolling {
padding-left: 32px;
padding-right: 32px;
}
&-tab-prev,
&-tab-next {
10 years ago
user-select: none;
10 years ago
z-index: 2;
10 years ago
margin-right: -2px;
margin-top: 3px;
10 years ago
width: 32px;
height: 100%;
10 years ago
line-height: 32px;
10 years ago
cursor: pointer;
border: 0;
10 years ago
background-color: transparent;
position: absolute;
10 years ago
text-align: center;
10 years ago
&-icon {
position: relative;
display: inline-block;
font-style: normal;
10 years ago
font-weight: bold;
10 years ago
font-variant: normal;
line-height: inherit;
vertical-align: baseline;
text-align: center;
text-transform: none;
font-family: sans-serif;
.iconfont-size-under-12px(10px);
10 years ago
&:before {
display: block;
10 years ago
font-family: "anticon" !important;
10 years ago
}
}
}
&-tab-btn-disabled {
cursor: default;
color: #ccc;
pointer-events: none;
}
10 years ago
&-tab-next {
right: 2px;
&-icon:before {
9 years ago
content: "\e600";
10 years ago
}
}
&-tab-prev {
left: 0;
9 years ago
&-icon {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
}
10 years ago
&-icon:before {
content: "\e601";
10 years ago
}
:root & {
filter: none;
}
10 years ago
}
&-nav-wrap {
overflow: hidden;
margin-bottom: -1px;
10 years ago
}
&-nav-scroll {
10 years ago
width: 99999px;
overflow: hidden;
10 years ago
}
&-nav {
box-sizing: border-box;
padding-left: 0;
transition: left 0.5s @ease-in-out;
10 years ago
position: relative;
margin: 0;
list-style: none;
10 years ago
float: left;
10 years ago
&:before,
&:after {
10 years ago
display: table;
content: " ";
}
&:after {
clear: both;
}
.@{tab-prefix-cls}-tab-disabled {
10 years ago
pointer-events: none;
cursor: default;
10 years ago
9 years ago
.@{tab-prefix-cls}-tab-inner {
10 years ago
color: #ccc;
}
10 years ago
}
.@{tab-prefix-cls}-tab {
10 years ago
float: left;
height: 100%;
10 years ago
margin-right: 28px;
10 years ago
box-sizing: border-box;
position: relative;
&-inner {
10 years ago
padding: 8px 20px;
transition: color 0.3s @ease-in-out;
10 years ago
display: block;
cursor: pointer;
text-decoration: none;
&:hover {
color: tint(@primary-color, 20%);
}
&:active {
color: shade(@primary-color, 5%);
}
.anticon {
width: 14px;
height: 14px;
10 years ago
margin-right: 8px;
}
10 years ago
}
}
10 years ago
.@{tab-prefix-cls}-tab-active .@{tab-prefix-cls}-tab-inner {
color: @primary-color;
10 years ago
}
}
&-mini &-nav-container {
font-size: 12px;
}
&-mini &-tab {
margin-right: 24px;
.@{tab-prefix-cls}-tab-inner {
padding: 8px 16px;
}
}
10 years ago
&-tabpane-hidden {
display: none;
}
&-content {
position: relative;
width: 100%;
}
10 years ago
&-slide-horizontal-backward-enter {
.motion-common();
animation-play-state: paused;
animation-timing-function: @ease-in-out-quint;
opacity: 0;
10 years ago
}
10 years ago
&-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active {
animation-name: antMoveLeftIn;
animation-play-state: running;
10 years ago
}
10 years ago
&-slide-horizontal-backward-leave {
10 years ago
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
.motion-common();
animation-play-state: paused;
animation-timing-function: @ease-in-out-quint;
10 years ago
}
10 years ago
&-slide-horizontal-backward-leave&-slide-horizontal-backward-leave-active {
animation-name: antMoveRightOut;
animation-play-state: running;
10 years ago
}
10 years ago
&-slide-horizontal-forward-enter {
.motion-common();
animation-play-state: paused;
animation-timing-function: @ease-in-out-quint;
opacity: 0;
10 years ago
}
10 years ago
&-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active {
animation-name: antMoveRightIn;
animation-play-state: running;
10 years ago
}
10 years ago
&-slide-horizontal-forward-leave {
10 years ago
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
.motion-common();
animation-play-state: paused;
animation-timing-function: @ease-in-out-quint;
10 years ago
}
10 years ago
&-slide-horizontal-forward-leave&-slide-horizontal-forward-leave-active {
animation-name: antMoveLeftOut;
animation-play-state: running;
10 years ago
}
&-vertical {
.@{tab-prefix-cls}-tab {
float: none;
margin-right: 0;
margin-bottom: 16px;
&:last-child {
margin-bottom: 0;
}
.@{tab-prefix-cls}-tab-inner {
padding: 8px 24px;
}
}
.@{tab-prefix-cls}-nav-scroll {
width: auto;
}
.@{tab-prefix-cls}-tabs-bar {
border-bottom: 0;
}
.@{tab-prefix-cls}-nav-container {
margin-bottom: 0;
}
.@{tab-prefix-cls}-nav-wrap {
margin-bottom: 0;
}
.@{tab-prefix-cls}-ink-bar {
width: 2px;
left: auto;
height: auto;
&-transition-forward {
transition: bottom 0.3s @ease-in-out,
top 0.3s @ease-in-out 0.3s * 0.3;
}
&-transition-backward {
transition: bottom 0.3s @ease-in-out 0.3s * 0.3,
top 0.3s @ease-in-out;
}
}
.@{tab-prefix-cls}-container {
margin-bottom: 0;
}
.@{tab-prefix-cls}-content {
overflow: hidden;
width: auto;
}
}
&-vertical&-left {
.@{tab-prefix-cls}-tabs-bar {
float: left;
border-right: 1px solid @border-color-split;
margin-right: -1px;
margin-bottom: 0;
}
.@{tab-prefix-cls}-tab {
.@{tab-prefix-cls}-tab-inner {
text-align: right;
}
}
.@{tab-prefix-cls}-nav-container {
margin-right: -1px;
}
.@{tab-prefix-cls}-nav-wrap {
margin-right: -1px;
}
.@{tab-prefix-cls}-ink-bar {
right: 1px;
}
.@{tab-prefix-cls}-content {
padding-left: 24px;
border-left: 1px solid @border-color-split;
}
}
&-vertical&-right {
.@{tab-prefix-cls}-tabs-bar {
float: right;
border-left: 1px solid @border-color-split;
margin-left: -1px;
margin-bottom: 0;
}
.@{tab-prefix-cls}-nav-container {
margin-left: -1px;
}
.@{tab-prefix-cls}-nav-wrap {
margin-left: -1px;
}
.@{tab-prefix-cls}-ink-bar {
left: 1px;
}
.@{tab-prefix-cls}-content {
padding-right: 24px;
border-right: 1px solid @border-color-split;
}
}
&-bottom &-tabs-bar {
margin-bottom: 0;
margin-top: 16px;
}
// card style
&&-card &-ink-bar {
visibility: hidden;
}
&&-card &-tab {
margin: 0;
border: 1px solid transparent;
border-bottom: 0;
border-radius: 6px 6px 0 0;
transition: all 0.3s @ease-in-out;
background: #f9f9f9;
margin-right: 2px;
}
&&-card &-tab-inner {
padding: 7px 16px 6px;
}
&&-card &-tab-active {
background: #fff;
border-color: @border-color-base;
color: @primary-color;
}
&&-card &-tab-active &-tab-inner {
padding-bottom: 7px;
}
&&-card &-nav-wrap {
margin-bottom: 0;
}
&&-card &-tab-inner .anticon-cross {
margin-right: 0;
color: #999;
transition: all 0.3s @ease-in-out;
.iconfont-size-under-12px(9px);
width: 0;
text-align: right;
vertical-align: middle;
overflow: hidden;
&:hover {
color: #404040;
font-weight: bold;
}
}
&&-card &-tab-active .anticon-cross,
&&-card &-tab:hover .anticon-cross {
width: 16px;
}
&-extra-content {
float: right;
line-height: 32px;
.@{tab-prefix-cls}-new-tab {
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
cursor: pointer;
border-radius: 3px;
border: 1px solid @border-color-base;
font-size: 12px;
.iconfont-size-under-12px(10px);
color: #999;
transition: color 0.3s ease;
&:hover {
color: #404040;
}
}
}
}