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.

364 lines
7.0 KiB

@import "../../style/themes/default";
@import "../../style/mixins/index";
@tab-prefix-cls: ~"@{ant-prefix}-tabs";
@import "./card-style";
10 years ago
.@{tab-prefix-cls} {
10 years ago
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-origin: 0 0;
}
9 years ago
&-bar {
border-bottom: @border-width-base @border-style-base @border-color-base;
margin-bottom: 16px;
8 years ago
outline: none;
}
10 years ago
&-nav-container {
9 years ago
overflow: hidden;
font-size: @font-size-lg;
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
8 years ago
&-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: 2px;
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: @text-color-secondary;
transition: color 0.3s ease;
&:hover {
8 years ago
color: @text-color;
}
10 years ago
&-icon {
font-style: normal;
10 years ago
font-weight: bold;
10 years ago
font-variant: normal;
line-height: inherit;
vertical-align: baseline;
position: absolute;
top: 50%;
margin-top: -50%;
10 years ago
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: @disabled-color;
}
}
10 years ago
&-tab-next {
right: 2px;
&-icon:before {
content: "\e61f";
10 years ago
}
}
&-tab-prev {
left: 0;
&-icon:before {
content: "\e620";
10 years ago
}
:root & {
filter: none;
}
10 years ago
}
&-nav-wrap {
overflow: hidden;
margin-bottom: -1px;
10 years ago
}
&-nav-scroll {
10 years ago
overflow: hidden;
white-space: nowrap;
10 years ago
}
&-nav {
box-sizing: border-box;
padding-left: 0;
transition: transform 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;
color: @disabled-color;
10 years ago
}
.@{tab-prefix-cls}-tab {
display: inline-block;
10 years ago
height: 100%;
margin-right: 24px;
10 years ago
box-sizing: border-box;
position: relative;
padding: 8px 20px;
transition: color 0.3s @ease-in-out;
cursor: pointer;
text-decoration: none;
&:hover {
color: @primary-5;
}
&:active {
color: @primary-7;
}
.@{iconfont-css-prefix} {
width: 14px;
height: 14px;
margin-right: 8px;
10 years ago
}
}
10 years ago
.@{tab-prefix-cls}-tab-active {
color: @primary-color;
10 years ago
}
}
&-mini &-nav-container {
font-size: @font-size-base;
}
&-mini &-tab {
margin-right: 0;
padding: 8px 16px;
10 years ago
}
&:not(&-vertical) {
> .@{tab-prefix-cls}-content {
width: 100%;
> .@{tab-prefix-cls}-tabpane {
flex-shrink: 0;
width: 100%;
transition: opacity .45s;
opacity: 1;
}
> .@{tab-prefix-cls}-tabpane-inactive {
opacity: 0;
height: 0;
padding: 0!important;
pointer-events: none;
}
}
> .@{tab-prefix-cls}-content-animated {
display: flex;
flex-direction: row;
will-change: margin-left;
transition: margin-left 0.3s @ease-in-out;
}
10 years ago
}
&-vertical {
> .@{tab-prefix-cls}-bar {
border-bottom: 0;
height: 100%;
.@{tab-prefix-cls}-tab {
float: none;
margin-right: 0;
margin-bottom: 16px;
display: block;
padding: 8px 24px;
&:last-child {
margin-bottom: 0;
}
}
.@{tab-prefix-cls}-nav-scroll {
width: auto;
}
.@{tab-prefix-cls}-nav-container,
.@{tab-prefix-cls}-nav-wrap {
height: 100%;
}
.@{tab-prefix-cls}-nav-container {
margin-bottom: 0;
&.@{tab-prefix-cls}-nav-container-scrolling {
padding: 32px 0;
}
}
.@{tab-prefix-cls}-nav-wrap {
margin-bottom: 0;
}
.@{tab-prefix-cls}-ink-bar {
width: 2px;
left: auto;
height: auto;
top: 0;
}
}
> .@{tab-prefix-cls}-content {
overflow: hidden;
width: auto;
margin-top: 0!important;
}
> .@{tab-prefix-cls}-bar {
.@{tab-prefix-cls}-tab-next {
width: 100%;
bottom: 0;
height: 32px;
&-icon:before {
content: "\e61d";
}
}
.@{tab-prefix-cls}-tab-prev {
top: 0;
width: 100%;
height: 32px;
&-icon:before {
content: "\e61e";
}
}
}
}
&-vertical&-left {
> .@{tab-prefix-cls}-bar {
float: left;
border-right: @border-width-base @border-style-base @border-color-split;
margin-right: -1px;
margin-bottom: 0;
.@{tab-prefix-cls}-tab {
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: @border-width-base @border-style-base @border-color-split;
}
}
&-vertical&-right {
> .@{tab-prefix-cls}-bar {
float: right;
border-left: @border-width-base @border-style-base @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: @border-width-base @border-style-base @border-color-split;
}
}
&-bottom > &-bar {
margin-bottom: 0;
margin-top: 16px;
}
}
.@{tab-prefix-cls}-top .@{tab-prefix-cls}-ink-bar-animated,
.@{tab-prefix-cls}-bottom .@{tab-prefix-cls}-ink-bar-animated {
transition: transform .3s @ease-in-out, width .3s @ease-in-out;
}
.@{tab-prefix-cls}-left .@{tab-prefix-cls}-ink-bar-animated,
.@{tab-prefix-cls}-right .@{tab-prefix-cls}-ink-bar-animated {
transition: transform .3s @ease-in-out, height .3s @ease-in-out;
}
.no-flex,
.@{tab-prefix-cls}-no-animation,
.@{tab-prefix-cls}-vertical {
> .@{tab-prefix-cls}-content {
&-animated {
transform: none !important;
margin-left: 0 !important;
}
> .@{tab-prefix-cls}-tabpane-inactive {
display: none;
}
}
}