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.

453 lines
8.8 KiB

@import "../../style/themes/default";
@import "../../style/mixins/index";
@tab-prefix-cls: ant-tabs;
10 years ago
.@{tab-prefix-cls} {
10 years ago
box-sizing: border-box;
position: relative;
overflow: hidden;
.clearfix;
color: @text-color;
10 years ago
9 years ago
&-bar {
outline: none;
}
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;
transition: transform 0.3s @ease-in-out;
10 years ago
transform-origin: 0 0;
}
9 years ago
&-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;
color: #999;
transition: color 0.3s ease;
&:hover {
color: #666;
}
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: not-allowed;
&,
&:hover {
color: #ccc;
}
}
10 years ago
&-tab-next {
right: 2px;
&-icon:before {
9 years ago
content: "\e600";
10 years ago
}
}
&-tab-prev {
left: 0;
&-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%;
margin-right: 24px;
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%);
transform: translateZ(0);
}
.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;
transform: translateZ(0);
10 years ago
}
}
&-mini &-nav-container {
font-size: 12px;
}
&-mini &-tab {
margin-right: 0;
.@{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;
animation-duration: 0.4s;
10 years ago
}
10 years ago
&-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active {
animation-name: antMoveLeftIn;
transform: translateZ(0);
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;
animation-duration: 0.4s;
10 years ago
}
10 years ago
&-slide-horizontal-backward-leave&-slide-horizontal-backward-leave-active {
animation-name: antMoveRightOut;
transform: translateZ(0);
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;
animation-duration: 0.4s;
10 years ago
}
10 years ago
&-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active {
animation-name: antMoveRightIn;
animation-play-state: running;
transform: translateZ(0);
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-duration: 0.4s;
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 {
transform: translateZ(0);
animation-name: antMoveLeftOut;
animation-play-state: running;
10 years ago
}
&-vertical {
> .@{tab-prefix-cls}-bar {
border-bottom: 0;
.@{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}-nav-container {
margin-bottom: 0;
}
.@{tab-prefix-cls}-nav-wrap {
margin-bottom: 0;
}
.@{tab-prefix-cls}-ink-bar {
width: 2px;
left: auto;
height: auto;
}
}
> .@{tab-prefix-cls}-content {
overflow: hidden;
width: auto;
}
}
&-vertical&-left {
> .@{tab-prefix-cls}-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}-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 > &-bar {
margin-bottom: 0;
margin-top: 16px;
}
// card style
&&-card &-nav-container {
height: 36px;
}
&&-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;
transition: all 0.3s @ease-in-out;
}
&&-card &-tab-active {
background: #fff;
transform: translateZ(0);
border-color: @border-color-base;
color: @primary-color;
}
&&-card &-tab-active &-tab-inner {
padding-bottom: 7px;
transform: translateZ(0);
}
&&-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);
transform-origin: 100% 50%;
width: 0;
text-align: right;
vertical-align: middle;
overflow: hidden;
&:hover {
color: #404040;
font-weight: bold;
}
}
&&-editable-card &-tab:not(&-tab-active):hover &-tab-inner {
padding-left: 8px;
padding-right: 8px;
}
&&-card &-tab-active .anticon-cross,
&&-card &-tab:hover .anticon-cross {
width: 16px;
transform: translateZ(0);
}
&-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;
}
}
}
}