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.

378 lines
7.2 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;
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 #e9e9e9;
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;
10 years ago
font-size: 12px;
10 years ago
&:before {
display: block;
10 years ago
font-family: "anticon" !important;
10 years ago
}
}
10 years ago
&:hover {
10 years ago
color: tint(@primary-color, 20%);
10 years ago
}
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;
}
div.@{tab-prefix-cls}-tab-active {
> .@{tab-prefix-cls}-tab-inner,
> .@{tab-prefix-cls}-tab-inner:hover {
10 years ago
color: tint(@primary-color, 20%);
cursor: pointer;
10 years ago
text-decoration: none;
}
}
div.@{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;
9 years ago
> .@{tab-prefix-cls}-tab-inner {
10 years ago
padding: 8px 20px;
transition: color 0.3s @ease-in-out;
10 years ago
display: block;
10 years ago
color: #666;
.anticon {
width: 14px;
height: 14px;
10 years ago
margin-right: 8px;
line-height: 1.5;
}
10 years ago
}
9 years ago
> .@{tab-prefix-cls}-tab-inner:hover {
10 years ago
color: tint(@primary-color, 30%);
10 years ago
cursor: pointer;
}
9 years ago
> .@{tab-prefix-cls}-tab-inner:hover {
10 years ago
text-decoration: none;
}
}
}
&-mini &-nav-container {
font-size: 12px;
}
&-mini &-tab {
margin-right: 24px;
9 years ago
> .@{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;
}
.@{tab-prefix-cls}-tab {
> .@{tab-prefix-cls}-tab-inner {
text-align: right;
}
}
.@{tab-prefix-cls}-tabs-bar {
border-right: 1px solid #e9e9e9;
margin-right: -1px;
}
.@{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 #e9e9e9;
}
}
&-vertical&-right {
.@{tab-prefix-cls}-tabs-bar {
float: right;
border-left: 1px solid #e9e9e9;
margin-left: -1px;
}
.@{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 #e9e9e9;
}
}
}