2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 16:17:45 +08:00
|
|
|
@import '../../style/mixins/index';
|
2020-05-30 18:28:25 +08:00
|
|
|
@import './size';
|
|
|
|
@import './rtl';
|
|
|
|
@import './position';
|
|
|
|
@import './dropdown';
|
|
|
|
@import './card';
|
2015-06-10 19:50:02 +08:00
|
|
|
|
2018-12-07 16:17:45 +08:00
|
|
|
@tab-prefix-cls: ~'@{ant-prefix}-tabs';
|
2018-01-13 01:27:18 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{tab-prefix-cls} {
|
2017-09-22 18:33:29 +08:00
|
|
|
.reset-component;
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
display: flex;
|
2015-12-02 18:06:16 +08:00
|
|
|
overflow: hidden;
|
2015-10-22 11:36:41 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
// ========================== Navigation ==========================
|
2020-06-02 11:31:03 +08:00
|
|
|
> .@{tab-prefix-cls}-nav,
|
|
|
|
> div > .@{tab-prefix-cls}-nav {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
2020-05-30 18:28:25 +08:00
|
|
|
display: flex;
|
|
|
|
flex: none;
|
|
|
|
align-items: center;
|
2015-06-09 15:34:46 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
.@{tab-prefix-cls}-nav-wrap {
|
|
|
|
position: relative;
|
|
|
|
display: inline-block;
|
|
|
|
display: flex;
|
|
|
|
flex: auto;
|
2020-05-31 21:34:55 +08:00
|
|
|
align-self: stretch;
|
2020-05-30 18:28:25 +08:00
|
|
|
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;
|
2015-06-09 15:34:46 +08:00
|
|
|
}
|
|
|
|
}
|
2015-08-06 16:47:01 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
.@{tab-prefix-cls}-nav-list {
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
transition: transform @animation-duration-slow;
|
2015-08-18 14:58:18 +08:00
|
|
|
}
|
2015-06-09 15:34:46 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
// >>>>>>>> Operations
|
|
|
|
.@{tab-prefix-cls}-nav-operations {
|
|
|
|
display: flex;
|
|
|
|
align-self: stretch;
|
2015-06-09 15:34:46 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&-hidden {
|
|
|
|
position: absolute;
|
|
|
|
visibility: hidden;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
2015-06-09 15:34:46 +08:00
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
.@{tab-prefix-cls}-nav-more {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
2020-05-30 18:28:25 +08:00
|
|
|
padding: @tabs-card-horizontal-padding;
|
|
|
|
background: transparent;
|
|
|
|
border: 0;
|
2015-06-09 15:34:46 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&::after {
|
2019-07-17 18:58:30 +08:00
|
|
|
position: absolute;
|
2020-05-30 18:28:25 +08:00
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
2019-07-17 18:58:30 +08:00
|
|
|
left: 0;
|
2020-05-30 18:28:25 +08:00
|
|
|
height: 5px;
|
|
|
|
transform: translateY(100%);
|
2019-07-17 18:58:30 +08:00
|
|
|
content: '';
|
|
|
|
}
|
2020-05-30 18:28:25 +08:00
|
|
|
}
|
2019-07-17 18:58:30 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
.@{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;
|
2017-07-13 12:14:57 +08:00
|
|
|
|
2016-09-18 10:12:21 +08:00
|
|
|
&:hover {
|
2018-11-05 19:04:28 +08:00
|
|
|
color: @tabs-hover-color;
|
2016-09-18 10:12:21 +08:00
|
|
|
}
|
2015-06-15 16:11:28 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&:active,
|
|
|
|
&:focus {
|
2018-11-05 19:04:28 +08:00
|
|
|
color: @tabs-active-color;
|
2016-09-18 10:12:21 +08:00
|
|
|
}
|
2015-06-09 15:34:46 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&-extra-content {
|
|
|
|
flex: none;
|
2015-06-09 15:34:46 +08:00
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
// ============================ InkBar ============================
|
|
|
|
&-ink-bar {
|
|
|
|
position: absolute;
|
|
|
|
background: @tabs-ink-bar-color;
|
|
|
|
pointer-events: none;
|
2019-08-06 13:29:33 +08:00
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
// ============================= 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;
|
2020-03-30 19:09:30 +08:00
|
|
|
outline: none;
|
2020-05-30 18:28:25 +08:00
|
|
|
cursor: pointer;
|
2019-07-07 12:04:40 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&:last-of-type {
|
|
|
|
margin-right: 0;
|
|
|
|
margin-left: 0;
|
2018-11-23 13:39:33 +08:00
|
|
|
}
|
2016-09-18 10:12:21 +08:00
|
|
|
|
2020-06-24 17:55:50 +08:00
|
|
|
&-btn,
|
|
|
|
&-remove {
|
|
|
|
&:focus,
|
|
|
|
&:active {
|
|
|
|
color: @tabs-active-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-btn {
|
|
|
|
outline: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-remove {
|
2020-05-30 18:28:25 +08:00
|
|
|
flex: none;
|
|
|
|
margin-right: -@margin-xss;
|
|
|
|
margin-left: @margin-xs;
|
|
|
|
color: @text-color-secondary;
|
|
|
|
font-size: @font-size-sm;
|
2020-06-24 17:55:50 +08:00
|
|
|
background: transparent;
|
|
|
|
border: none;
|
2020-05-30 18:28:25 +08:00
|
|
|
outline: none;
|
2020-06-24 17:55:50 +08:00
|
|
|
cursor: pointer;
|
2020-05-30 18:28:25 +08:00
|
|
|
transition: all @animation-duration-slow;
|
2015-10-22 11:36:41 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&:hover {
|
|
|
|
color: @heading-color;
|
|
|
|
}
|
2018-11-23 13:39:33 +08:00
|
|
|
}
|
2017-08-05 23:01:28 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&:hover {
|
|
|
|
color: @tabs-hover-color;
|
2018-11-23 13:39:33 +08:00
|
|
|
}
|
2017-04-19 11:42:32 +08:00
|
|
|
|
2020-06-24 17:55:50 +08:00
|
|
|
&&-active &-btn {
|
2020-05-30 18:28:25 +08:00
|
|
|
color: @tabs-highlight-color;
|
|
|
|
font-weight: 500;
|
2018-11-23 13:39:33 +08:00
|
|
|
}
|
2017-04-19 11:42:32 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&&-disabled {
|
|
|
|
color: @disabled-color;
|
|
|
|
cursor: not-allowed;
|
2017-04-19 11:42:32 +08:00
|
|
|
}
|
2017-11-29 21:00:16 +08:00
|
|
|
|
2020-06-24 17:55:50 +08:00
|
|
|
& &-remove .@{iconfont-css-prefix} {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
margin-right: @margin-sm;
|
2017-11-29 21:00:16 +08:00
|
|
|
}
|
2015-10-21 19:58:54 +08:00
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
// =========================== TabPanes ===========================
|
|
|
|
&-content {
|
|
|
|
&-holder {
|
|
|
|
flex: auto;
|
2020-06-18 17:35:12 +08:00
|
|
|
min-width: 0;
|
|
|
|
min-height: 0;
|
2015-10-21 19:58:54 +08:00
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
2017-05-10 21:29:52 +08:00
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&-animated {
|
|
|
|
transition: margin @animation-duration-slow;
|
|
|
|
}
|
2018-11-23 13:39:33 +08:00
|
|
|
}
|
|
|
|
|
2020-05-30 18:28:25 +08:00
|
|
|
&-tabpane {
|
|
|
|
flex: none;
|
|
|
|
width: 100%;
|
|
|
|
outline: none;
|
2016-09-18 10:12:21 +08:00
|
|
|
}
|
|
|
|
}
|