mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-05 05:28:20 +08:00
368 lines
7.1 KiB
Plaintext
368 lines
7.1 KiB
Plaintext
@tab-prefix-cls: ant-tabs;
|
|
|
|
@effect-duration: .3s;
|
|
|
|
.@{tab-prefix-cls} {
|
|
outline: none;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
.clearfix;
|
|
|
|
&-ink-bar {
|
|
z-index: 1;
|
|
position: absolute;
|
|
left: 0;
|
|
bottom: 1px;
|
|
box-sizing: border-box;
|
|
height: 2px;
|
|
background-color: @primary-color;
|
|
transform: scaleX(1);
|
|
transform-origin: 0 0;
|
|
&-transition-forward {
|
|
transition: right 0.3s @ease-in-out,
|
|
left 0.3s @ease-in-out 0.3s * 0.3;
|
|
}
|
|
&-transition-backward {
|
|
transition: right 0.3s @ease-in-out 0.3s * 0.3,
|
|
left 0.3s @ease-in-out;
|
|
}
|
|
}
|
|
|
|
&-tabs-bar {
|
|
border-bottom: 1px solid #e9e9e9;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
&-nav-container {
|
|
overflow: hidden;
|
|
font-size: 14px;
|
|
line-height: @line-height-base;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
white-space: nowrap;
|
|
margin-bottom: -1px;
|
|
.clearfix;
|
|
}
|
|
|
|
&-nav-container-scrolling {
|
|
padding-left: 32px;
|
|
padding-right: 32px;
|
|
}
|
|
|
|
&-tab-prev, &-tab-next {
|
|
user-select: none;
|
|
z-index: 2;
|
|
margin-right: -2px;
|
|
margin-top: 3px;
|
|
width: 32px;
|
|
height: 100%;
|
|
line-height: 32px;
|
|
cursor: pointer;
|
|
border: none;
|
|
background-color: transparent;
|
|
position: absolute;
|
|
text-align: center;
|
|
|
|
&-icon {
|
|
position: relative;
|
|
display: inline-block;
|
|
font-style: normal;
|
|
font-weight: bold;
|
|
font-variant: normal;
|
|
line-height: inherit;
|
|
vertical-align: baseline;
|
|
text-align: center;
|
|
text-transform: none;
|
|
font-family: sans-serif;
|
|
font-size: 12px;
|
|
|
|
&:before {
|
|
display: block;
|
|
font-family: "anticon" !important;
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
color: tint(@primary-color, 20%);
|
|
}
|
|
}
|
|
|
|
&-tab-btn-disabled {
|
|
cursor: default;
|
|
color: #ccc;
|
|
pointer-events: none;
|
|
}
|
|
|
|
&-tab-next {
|
|
right: 2px;
|
|
|
|
&-icon:before {
|
|
content: "\e600";
|
|
}
|
|
}
|
|
|
|
&-tab-prev {
|
|
left: 0;
|
|
&-icon {
|
|
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
|
|
}
|
|
&-icon:before {
|
|
content: "\e601";
|
|
}
|
|
|
|
:root & {
|
|
filter: none;
|
|
}
|
|
}
|
|
|
|
&-nav-wrap {
|
|
overflow: hidden;
|
|
margin-bottom: -1px;
|
|
}
|
|
|
|
&-nav-scroll {
|
|
width: 99999px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
&-nav {
|
|
box-sizing: border-box;
|
|
padding-left: 0;
|
|
transition: left 0.5s @ease-in-out;
|
|
position: relative;
|
|
margin: 0;
|
|
list-style: none;
|
|
float: left;
|
|
|
|
&:before, &:after {
|
|
display: table;
|
|
content: " ";
|
|
}
|
|
|
|
&:after {
|
|
clear: both;
|
|
}
|
|
|
|
div.@{tab-prefix-cls}-tab-active {
|
|
> .@{tab-prefix-cls}-tab-inner, > .@{tab-prefix-cls}-tab-inner:hover {
|
|
color: tint(@primary-color, 20%);
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
|
|
div.@{tab-prefix-cls}-tab-disabled {
|
|
pointer-events: none;
|
|
cursor: default;
|
|
|
|
.@{tab-prefix-cls}-tab-inner {
|
|
color: #ccc;
|
|
}
|
|
}
|
|
|
|
.@{tab-prefix-cls}-tab {
|
|
float: left;
|
|
height: 100%;
|
|
margin-right: 28px;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
|
|
> .@{tab-prefix-cls}-tab-inner {
|
|
padding: 8px 20px;
|
|
transition: color 0.3s @ease-in-out;
|
|
display: block;
|
|
color: #666;
|
|
|
|
.anticon {
|
|
width: 14px;
|
|
height: 14px;
|
|
margin-right: 8px;
|
|
top: 1px;
|
|
}
|
|
|
|
}
|
|
|
|
> .@{tab-prefix-cls}-tab-inner:hover {
|
|
color: tint(@primary-color, 30%);
|
|
cursor: pointer;
|
|
}
|
|
|
|
> .@{tab-prefix-cls}-tab-inner:hover {
|
|
text-decoration: none;
|
|
}
|
|
}
|
|
}
|
|
|
|
&-mini &-nav-container {
|
|
font-size: 12px;
|
|
}
|
|
|
|
&-mini &-tab {
|
|
margin-right: 24px;
|
|
> .@{tab-prefix-cls}-tab-inner {
|
|
padding: 8px 16px;
|
|
}
|
|
}
|
|
|
|
&-tabpane-hidden {
|
|
display: none;
|
|
}
|
|
|
|
&-content {
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
&-slide-horizontal-backward-enter {
|
|
display: block !important;
|
|
transform: translateX(-100%);
|
|
}
|
|
|
|
&-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active {
|
|
transform: translateX(0);
|
|
transition: transform @effect-duration @ease-in-out;
|
|
}
|
|
|
|
&-slide-horizontal-backward-leave {
|
|
display: block !important;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
transform: translateX(0);
|
|
}
|
|
|
|
&-slide-horizontal-backward-leave&-slide-horizontal-backward-leave-active {
|
|
transform: translateX(100%);
|
|
transition: transform @effect-duration @ease-in-out;
|
|
}
|
|
|
|
&-slide-horizontal-forward-enter {
|
|
display: block !important;
|
|
transform: translateX(100%);
|
|
}
|
|
|
|
&-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active {
|
|
transform: translateX(0);
|
|
transition: transform @effect-duration @ease-in-out;
|
|
}
|
|
|
|
&-slide-horizontal-forward-leave {
|
|
display: block !important;
|
|
position: absolute;
|
|
transform: translateX(0);
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
bottom: 0;
|
|
}
|
|
|
|
&-slide-horizontal-forward-leave&-slide-horizontal-forward-leave-active {
|
|
transform: translateX(-100%);
|
|
transition: transform @effect-duration @ease-in-out;
|
|
}
|
|
|
|
&-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;
|
|
}
|
|
}
|
|
}
|