ant-design/style/components/tabs.less

229 lines
4.4 KiB
Plaintext
Raw Normal View History

2015-06-15 20:04:32 +08:00
@prefixClass: ant-tabs;
2015-06-10 19:50:02 +08:00
2015-06-09 15:34:46 +08:00
@easing-in-out: cubic-bezier(0.35, 0, 0.25, 1);
2015-06-10 19:50:02 +08:00
@effect-duration: .3s;
2015-06-09 15:34:46 +08:00
.@{prefixClass} {
outline: none;
box-sizing: border-box;
position: relative;
&-ink-bar {
z-index: 1;
position: absolute;
left: 0;
2015-06-10 19:50:02 +08:00
bottom: 0;
2015-06-09 15:34:46 +08:00
box-sizing: border-box;
2015-06-14 14:17:10 +08:00
height: 2px;
2015-06-09 15:34:46 +08:00
background-color: #3fc7fa;
transform: scaleX(1);
transform-origin: 0 0;
2015-06-10 19:50:02 +08:00
&-transition-forward {
2015-06-09 15:34:46 +08:00
transition: right 0.3s @easing-in-out,
left 0.3s @easing-in-out 0.3s * 0.3;
}
2015-06-10 19:50:02 +08:00
&-transition-backward {
2015-06-09 15:34:46 +08:00
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;
2015-06-14 14:17:10 +08:00
border-bottom: 1px solid #f3f3f3;
margin-bottom: 15px;
.clearfix;
2015-06-09 15:34:46 +08:00
}
&-tab-prev, &-tab-next {
user-select: none;
-webkit-user-select: none;
z-index: 1;
margin-right: -2px;
width: 32px;
height: 100%;
2015-06-14 14:17:10 +08:00
line-height: 32px;
2015-06-09 15:34:46 +08:00
cursor: pointer;
border: none;
background-color: transparent;
position: absolute;
2015-06-14 14:17:10 +08:00
text-align: center;
2015-06-09 15:34:46 +08:00
&-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;
2015-06-14 14:17:10 +08:00
font-family: "anticon" !important;
2015-06-09 15:34:46 +08:00
}
}
}
&-tab-next {
right: 2px;
&-icon:before {
2015-06-14 14:17:10 +08:00
content: "\e611";
2015-06-09 15:34:46 +08:00
}
}
&-tab-prev {
left: 0;
transform: rotate(180deg);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
&-icon:before {
2015-06-14 14:17:10 +08:00
content: "\e611";
2015-06-09 15:34:46 +08:00
}
}
&-nav-wrap {
width: 100%;
overflow: hidden;
2015-06-14 16:49:27 +08:00
margin-bottom: -1px;
2015-06-09 15:34:46 +08:00
}
&-nav-scroll {
2015-06-14 14:17:10 +08:00
width: 99999px;
overflow: hidden;
2015-06-09 15:34:46 +08:00
}
&-nav {
box-sizing: border-box;
padding-left: 0;
transition: left 0.5s @easing-in-out;
position: relative;
margin: 0;
list-style: none;
2015-06-14 14:17:10 +08:00
float: left;
2015-06-09 15:34:46 +08:00
&:before, &:after {
display: table;
content: " ";
}
&:after {
clear: both;
}
div.@{prefixClass}-tab-active {
> a, > a:hover, > a:focus {
2015-06-15 20:34:54 +08:00
color: fadeout(#2db7f5, 20%);
2015-06-14 17:37:17 +08:00
cursor: pointer;
2015-06-09 15:34:46 +08:00
text-decoration: none;
}
}
div.@{prefixClass}-tab-disabled {
pointer-events: none;
cursor: default;
2015-06-12 20:21:13 +08:00
a {
color: #ccc;
}
2015-06-09 15:34:46 +08:00
}
.@{prefixClass}-tab {
float: left;
height: 100%;
2015-06-19 15:45:40 +08:00
margin-right: 28px;
2015-06-09 15:34:46 +08:00
box-sizing: border-box;
position: relative;
> a {
2015-06-19 15:45:40 +08:00
padding: 8px 20px;
2015-06-09 15:34:46 +08:00
transition: color 0.3s @easing-in-out;
2015-06-14 14:17:10 +08:00
display: block;
2015-06-12 20:21:13 +08:00
color: #666;
2015-06-15 16:11:28 +08:00
.anticon {
width: 14px;
height: 14px;
2015-06-19 15:45:40 +08:00
margin-right: 8px;
2015-06-15 16:11:28 +08:00
top: -1px;
}
2015-06-09 15:34:46 +08:00
}
> a:hover {
2015-06-15 20:34:54 +08:00
color: fadeout(#2db7f5, 30%);
2015-06-09 15:34:46 +08:00
cursor: pointer;
}
> a:hover, > a:focus {
text-decoration: none;
}
}
}
&-tabpane-hidden {
display: none;
}
&-content {
position: relative;
width: 100%;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-enter {
2015-06-09 15:34:46 +08:00
transform: translateX(-100%);
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-enter&-slide-horizontal-backward-enter-active {
2015-06-09 15:34:46 +08:00
transform: translateX(0);
transition: transform @effect-duration @easing-in-out;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-leave {
2015-06-09 15:34:46 +08:00
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
transform: translateX(0);
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-backward-leave&-slide-horizontal-backward-leave-active {
2015-06-09 15:34:46 +08:00
transform: translateX(100%);
transition: transform @effect-duration @easing-in-out;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-enter {
2015-06-09 15:34:46 +08:00
transform: translateX(100%);
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-enter&-slide-horizontal-forward-enter-active {
2015-06-09 15:34:46 +08:00
transform: translateX(0);
transition: transform @effect-duration @easing-in-out;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-leave {
2015-06-09 15:34:46 +08:00
position: absolute;
transform: translateX(0);
top: 0;
right: 0;
left: 0;
bottom: 0;
}
2015-06-10 19:50:02 +08:00
&-slide-horizontal-forward-leave&-slide-horizontal-forward-leave-active {
2015-06-09 15:34:46 +08:00
transform: translateX(-100%);
transition: transform @effect-duration @easing-in-out;
}
2015-06-12 15:39:01 +08:00
}