ant-design/style/components/tabs.less

245 lines
4.6 KiB
Plaintext
Raw Normal View History

2015-07-14 20:26:31 +08:00
@tabPrefixClass: ant-tabs;
2015-06-10 19:50:02 +08:00
@effect-duration: .3s;
2015-06-09 15:34:46 +08:00
2015-07-14 20:26:31 +08:00
.@{tabPrefixClass} {
2015-06-09 15:34:46 +08:00
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-07-08 15:18:28 +08:00
background-color: @primary-color;
2015-06-09 15:34:46 +08:00
transform: scaleX(1);
transform-origin: 0 0;
2015-06-10 19:50:02 +08:00
&-transition-forward {
2015-07-23 15:04:12 +08:00
transition: right 0.3s @ease-in-out,
left 0.3s @ease-in-out 0.3s * 0.3;
2015-06-09 15:34:46 +08:00
}
2015-06-10 19:50:02 +08:00
&-transition-backward {
2015-07-23 15:04:12 +08:00
transition: right 0.3s @ease-in-out 0.3s * 0.3,
left 0.3s @ease-in-out;
2015-06-09 15:34:46 +08:00
}
}
&-nav-container {
font-size: 14px;
2015-06-19 17:26:24 +08:00
line-height: @line-height-base;
2015-06-09 15:34:46 +08:00
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;
2015-06-19 16:21:59 +08:00
z-index: 2;
2015-06-09 15:34:46 +08:00
margin-right: -2px;
2015-06-19 16:21:59 +08:00
margin-top: 1px;
2015-06-09 15:34:46 +08:00
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;
2015-06-19 16:21:59 +08:00
font-weight: bold;
2015-06-09 15:34:46 +08:00
font-variant: normal;
line-height: inherit;
vertical-align: baseline;
text-align: center;
text-transform: none;
font-family: sans-serif;
2015-07-09 18:17:15 +08:00
font-size: 12px;
2015-06-09 15:34:46 +08:00
&:before {
display: block;
2015-06-14 14:17:10 +08:00
font-family: "anticon" !important;
2015-06-09 15:34:46 +08:00
}
}
2015-06-19 16:21:59 +08:00
&:hover {
2015-07-06 16:21:27 +08:00
color: tint(@primary-color, 20%);
2015-06-19 16:21:59 +08:00
}
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;
2015-06-19 16:21:59 +08:00
background: #fff;
2015-06-09 15:34:46 +08:00
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;
2015-07-23 15:04:12 +08:00
transition: left 0.5s @ease-in-out;
2015-06-09 15:34:46 +08:00
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;
}
2015-07-14 20:26:31 +08:00
div.@{tabPrefixClass}-tab-active {
2015-06-09 15:34:46 +08:00
> a, > a:hover, > a:focus {
2015-07-06 16:21:27 +08:00
color: tint(@primary-color, 20%);
2015-06-14 17:37:17 +08:00
cursor: pointer;
2015-06-09 15:34:46 +08:00
text-decoration: none;
}
}
2015-07-14 20:26:31 +08:00
div.@{tabPrefixClass}-tab-disabled {
2015-06-09 15:34:46 +08:00
pointer-events: none;
cursor: default;
2015-06-12 20:21:13 +08:00
a {
color: #ccc;
}
2015-06-09 15:34:46 +08:00
}
2015-07-14 20:26:31 +08:00
.@{tabPrefixClass}-tab {
2015-06-09 15:34:46 +08:00
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-07-23 15:04:12 +08:00
transition: color 0.3s @ease-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-07-06 16:21:27 +08:00
color: tint(@primary-color, 30%);
2015-06-09 15:34:46 +08:00
cursor: pointer;
}
> a:hover, > a:focus {
text-decoration: none;
}
}
}
2015-06-19 17:26:24 +08:00
&-mini &-nav-container {
font-size: 12px;
}
&-mini &-tab {
2015-06-19 17:31:37 +08:00
margin-right: 24px;
> a {
padding: 8px 16px;
}
2015-06-19 17:26:24 +08:00
}
2015-06-09 15:34:46 +08:00
&-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);
2015-07-23 15:04:12 +08:00
transition: transform @effect-duration @ease-in-out;
2015-06-09 15:34:46 +08:00
}
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%);
2015-07-23 15:04:12 +08:00
transition: transform @effect-duration @ease-in-out;
2015-06-09 15:34:46 +08:00
}
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);
2015-07-23 15:04:12 +08:00
transition: transform @effect-duration @ease-in-out;
2015-06-09 15:34:46 +08:00
}
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%);
2015-07-23 15:04:12 +08:00
transition: transform @effect-duration @ease-in-out;
2015-06-09 15:34:46 +08:00
}
2015-06-12 15:39:01 +08:00
}