ant-design/style/components/tabs.less
2015-06-15 20:04:14 +08:00

229 lines
4.3 KiB
Plaintext

@prefixClass: ant-tab;
@easing-in-out: cubic-bezier(0.35, 0, 0.25, 1);
@effect-duration: .3s;
.@{prefixClass} {
outline: none;
box-sizing: border-box;
position: relative;
&-ink-bar {
z-index: 1;
position: absolute;
left: 0;
bottom: 0;
box-sizing: border-box;
height: 2px;
background-color: #3fc7fa;
transform: scaleX(1);
transform-origin: 0 0;
&-transition-forward {
transition: right 0.3s @easing-in-out,
left 0.3s @easing-in-out 0.3s * 0.3;
}
&-transition-backward {
transition: right 0.3s @easing-in-out 0.3s * 0.3,
left 0.3s @easing-in-out;
}
}
&-nav-container {
font-size: 14px;
line-height: 1.5;
box-sizing: border-box;
width: 100%;
position: relative;
white-space: nowrap;
padding-right: 32px;
border-bottom: 1px solid #f3f3f3;
margin-bottom: 15px;
.clearfix;
}
&-tab-prev, &-tab-next {
user-select: none;
-webkit-user-select: none;
z-index: 1;
margin-right: -2px;
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: normal;
font-variant: normal;
line-height: inherit;
vertical-align: baseline;
text-align: center;
text-transform: none;
font-family: sans-serif;
&:before {
display: block;
font-family: "anticon" !important;
}
}
}
&-tab-next {
right: 2px;
&-icon:before {
content: "\e611";
}
}
&-tab-prev {
left: 0;
transform: rotate(180deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
&-icon:before {
content: "\e611";
}
}
&-nav-wrap {
width: 100%;
overflow: hidden;
margin-bottom: -1px;
}
&-nav-scroll {
width: 99999px;
overflow: hidden;
}
&-nav {
box-sizing: border-box;
padding-left: 0;
transition: left 0.5s @easing-in-out;
position: relative;
margin: 0;
list-style: none;
float: left;
&:before, &:after {
display: table;
content: " ";
}
&:after {
clear: both;
}
div.@{prefixClass}-tab-active {
> a, > a:hover, > a:focus {
font-weight: bold;
cursor: pointer;
text-decoration: none;
}
}
div.@{prefixClass}-tab-disabled {
pointer-events: none;
cursor: default;
a {
color: #ccc;
}
}
.@{prefixClass}-tab {
float: left;
height: 100%;
margin-right: 30px;
box-sizing: border-box;
position: relative;
> a {
padding: 8px 25px;
transition: color 0.3s @easing-in-out;
display: block;
color: #666;
.anticon {
width: 14px;
height: 14px;
margin-right: 12px;
top: -1px;
}
}
> a:hover {
color: #23c0fa;
cursor: pointer;
}
> a:hover, > a:focus {
text-decoration: none;
}
}
}
&-tabpane-hidden {
display: none;
}
&-content {
position: relative;
width: 100%;
}
&-slide-horizontal-backward-enter {
transform: translateX(-100%);
}
&-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active {
transform: translateX(0);
transition: transform @effect-duration @easing-in-out;
}
&-slide-horizontal-backward-leave {
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 @easing-in-out;
}
&-slide-horizontal-forward-enter {
transform: translateX(100%);
}
&-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active {
transform: translateX(0);
transition: transform @effect-duration @easing-in-out;
}
&-slide-horizontal-forward-leave {
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 @easing-in-out;
}
}