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.
 
 

197 lines
3.9 KiB

@import '../../style/themes/index';
@import '../../style/mixins/index';
@import './size';
@import './rtl';
@import './position';
@import './dropdown';
@import './card';
@tab-prefix-cls: ~'@{ant-prefix}-tabs';
.@{tab-prefix-cls} {
.reset-component;
display: flex;
overflow: hidden;
// ========================== Navigation ==========================
> .@{tab-prefix-cls}-nav,
> div > .@{tab-prefix-cls}-nav {
position: relative;
display: flex;
flex: none;
align-items: center;
.@{tab-prefix-cls}-nav-wrap {
position: relative;
display: inline-block;
display: flex;
flex: auto;
align-self: stretch;
overflow: hidden;
white-space: nowrap;
transform: translate(0); // Fix chrome render bug
// >>>>> Ping shadow
&::before,
&::after {
position: absolute;
z-index: 1;
opacity: 0;
transition: opacity @animation-duration-slow;
content: '';
pointer-events: none;
}
}
.@{tab-prefix-cls}-nav-list {
position: relative;
display: flex;
transition: transform @animation-duration-slow;
}
// >>>>>>>> Operations
.@{tab-prefix-cls}-nav-operations {
display: flex;
align-self: stretch;
&-hidden {
position: absolute;
visibility: hidden;
pointer-events: none;
}
}
.@{tab-prefix-cls}-nav-more {
position: relative;
padding: @tabs-card-horizontal-padding;
background: transparent;
border: 0;
&::after {
position: absolute;
right: 0;
bottom: 0;
left: 0;
height: 5px;
transform: translateY(100%);
content: '';
}
}
.@{tab-prefix-cls}-nav-add {
padding: 0 @padding-xs;
background: @tabs-card-head-background;
border: @border-width-base @border-style-base @border-color-split;
border-radius: @border-radius-base @border-radius-base 0 0;
outline: none;
cursor: pointer;
transition: all @animation-duration-slow @ease-in-out;
&:hover {
color: @tabs-hover-color;
}
&:active,
&:focus {
color: @tabs-active-color;
}
}
}
&-extra-content {
flex: none;
}
// ============================ InkBar ============================
&-ink-bar {
position: absolute;
background: @tabs-ink-bar-color;
pointer-events: none;
}
// ============================= Tabs =============================
&-tab {
position: relative;
display: inline-flex;
align-items: center;
margin: @tabs-horizontal-margin;
padding: @tabs-horizontal-padding;
font-size: @tabs-title-font-size;
background: transparent;
border: 0;
outline: none;
cursor: pointer;
&:last-of-type {
margin-right: 0;
margin-left: 0;
}
& &-remove {
flex: none;
margin-right: -@margin-xss;
margin-left: @margin-xs;
color: @text-color-secondary;
font-size: @font-size-sm;
outline: none;
transition: all @animation-duration-slow;
.@{iconfont-css-prefix} {
margin: 0;
}
&:hover {
color: @heading-color;
}
&:focus,
&:active {
color: @tabs-active-color;
}
}
&:focus,
&:active {
color: @tabs-active-color;
}
&:hover {
color: @tabs-hover-color;
}
&&-active {
color: @tabs-highlight-color;
font-weight: 500;
}
&&-disabled {
color: @disabled-color;
cursor: not-allowed;
}
.@{iconfont-css-prefix} {
margin-right: @margin-sm;
}
}
// =========================== TabPanes ===========================
&-content {
&-holder {
flex: auto;
}
display: flex;
width: 100%;
&-animated {
transition: margin @animation-duration-slow;
}
}
&-tabpane {
flex: none;
width: 100%;
outline: none;
}
}