ant-design/components/pagination/style/index.less

354 lines
6.7 KiB
Plaintext
Raw Normal View History

@import "../../style/themes/default";
@import "../../style/mixins/index";
@import "../../input/style/mixin";
@pagination-prefix-cls: ~"@{ant-prefix}-pagination";
2015-07-13 01:04:05 +08:00
2015-08-20 16:55:42 +08:00
.@{pagination-prefix-cls} {
.reset-component;
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
}
2015-07-13 01:04:05 +08:00
&:after {
content: " ";
display: block;
height: 0;
clear: both;
overflow: hidden;
visibility: hidden;
}
2016-02-25 10:36:58 +08:00
&-total-text {
display: inline-block;
vertical-align: middle;
height: @pagination-item-size;
line-height: @pagination-item-size;
margin-right: 8px;
2016-02-25 10:36:58 +08:00
}
2015-07-14 12:09:29 +08:00
&-item {
2015-07-13 01:04:05 +08:00
cursor: pointer;
2015-07-16 12:18:20 +08:00
border-radius: @border-radius-base;
user-select: none;
min-width: @pagination-item-size;
height: @pagination-item-size;
line-height: @pagination-item-size;
2015-07-13 01:04:05 +08:00
text-align: center;
list-style: none;
display: inline-block;
vertical-align: middle;
border: @border-width-base @border-style-base @border-color-base;
background-color: @component-background;
2015-07-13 01:04:05 +08:00
margin-right: 8px;
2015-07-16 12:21:16 +08:00
font-family: Arial;
outline: 0;
2015-07-13 01:04:05 +08:00
a {
text-decoration: none;
2016-11-08 20:50:59 +08:00
color: @text-color;
2015-07-16 12:18:20 +08:00
transition: none;
margin: 0 6px;
2015-07-13 01:04:05 +08:00
}
&:focus,
2015-07-13 01:04:05 +08:00
&:hover {
transition: all .3s;
2015-07-14 16:50:08 +08:00
border-color: @primary-color;
2015-07-13 01:04:05 +08:00
a {
2015-07-14 16:50:08 +08:00
color: @primary-color;
2015-07-13 01:04:05 +08:00
}
}
2015-07-14 12:09:29 +08:00
&-active {
2015-07-14 16:50:08 +08:00
border-color: @primary-color;
2017-12-15 10:30:01 +08:00
font-weight: 500;
a {
color: @primary-color;
}
2015-07-13 01:04:05 +08:00
&:focus,
&:hover {
border-color: @primary-5;
}
&:focus a,
2015-07-14 16:50:08 +08:00
&:hover a {
2017-12-15 10:30:01 +08:00
color: @primary-5;
2015-07-13 01:04:05 +08:00
}
}
}
2015-11-26 19:32:55 +08:00
&-jump-prev,
&-jump-next {
outline: 0;
2015-07-13 01:04:05 +08:00
&:after {
content: "•••";
display: block;
letter-spacing: 2px;
color: @disabled-color;
text-align: center;
2015-07-13 01:04:05 +08:00
}
&:focus,
2015-07-13 01:04:05 +08:00
&:hover {
&:after {
2015-07-14 16:50:08 +08:00
color: @primary-color;
2015-07-20 15:16:05 +08:00
.iconfont-size-under-12px(8px);
2015-07-20 15:01:00 +08:00
letter-spacing: -1px;
font-family: "anticon";
2015-07-13 01:04:05 +08:00
}
}
}
2015-07-14 12:09:29 +08:00
&-jump-prev {
&:focus,
2015-07-13 01:04:05 +08:00
&:hover {
&:after {
content: "\e620\e620";
2015-07-13 01:04:05 +08:00
}
}
}
2015-07-14 12:09:29 +08:00
&-jump-next {
&:focus,
2015-07-13 01:04:05 +08:00
&:hover {
&:after {
content: "\e61f\e61f";
2015-07-13 01:04:05 +08:00
}
}
}
2015-11-26 19:32:55 +08:00
&-prev,
&-jump-prev,
&-jump-next {
2015-07-13 01:04:05 +08:00
margin-right: 8px;
}
2015-11-26 19:32:55 +08:00
&-prev,
&-next,
&-jump-prev,
&-jump-next {
2015-07-16 12:21:16 +08:00
font-family: Arial;
2015-07-13 01:04:05 +08:00
cursor: pointer;
2016-11-08 20:50:59 +08:00
color: @text-color;
2015-11-05 21:25:43 +08:00
border-radius: @border-radius-base;
2015-07-13 01:04:05 +08:00
list-style: none;
min-width: @pagination-item-size;
height: @pagination-item-size;
line-height: @pagination-item-size;
2015-07-13 01:04:05 +08:00
text-align: center;
transition: all .3s;
2015-07-20 15:58:42 +08:00
display: inline-block;
vertical-align: middle;
2015-07-13 01:04:05 +08:00
}
2015-11-26 19:32:55 +08:00
&-prev,
&-next {
outline: 0;
2015-07-13 01:04:05 +08:00
a {
2016-11-08 20:50:59 +08:00
color: @text-color;
2017-08-30 14:02:49 +08:00
user-select: none;
}
&:hover a {
2017-12-15 10:30:01 +08:00
border-color: @primary-5;
2017-08-30 14:02:49 +08:00
}
.@{pagination-prefix-cls}-item-link {
border: @border-width-base @border-style-base @border-color-base;
background-color: @component-background;
border-radius: @border-radius-base;
outline: none;
2017-08-30 14:02:49 +08:00
display: block;
transition: all .3s;
2015-07-20 15:58:42 +08:00
2015-07-17 19:58:10 +08:00
&:after {
font-size: 12px;
2015-07-17 19:58:10 +08:00
display: block;
height: @pagination-item-size - 2px;
2015-07-17 16:24:09 +08:00
font-family: "anticon";
text-align: center;
2017-08-30 14:02:49 +08:00
font-weight: 500;
2015-07-17 19:58:10 +08:00
}
2015-07-13 01:04:05 +08:00
}
2017-08-30 14:02:49 +08:00
&:focus .@{pagination-prefix-cls}-item-link,
&:hover .@{pagination-prefix-cls}-item-link {
2015-07-14 16:50:08 +08:00
border-color: @primary-color;
2017-08-30 14:02:49 +08:00
color: @primary-color;
2015-07-13 14:58:26 +08:00
}
2015-07-14 12:09:29 +08:00
}
2015-07-17 16:24:09 +08:00
&-prev {
2017-08-30 14:02:49 +08:00
.@{pagination-prefix-cls}-item-link:after {
content: "\e620";
display: block;
2015-07-17 16:24:09 +08:00
}
}
&-next {
2017-08-30 14:02:49 +08:00
.@{pagination-prefix-cls}-item-link:after {
content: "\e61f";
display: block;
2015-07-17 16:24:09 +08:00
}
}
2015-07-14 12:09:29 +08:00
&-disabled {
2017-08-30 14:02:49 +08:00
&,
&:hover,
&:focus {
2017-08-30 14:02:49 +08:00
cursor: not-allowed;
a,
.@{pagination-prefix-cls}-item-link {
border-color: @border-color-base;
color: @disabled-color;
2015-07-14 12:09:29 +08:00
cursor: not-allowed;
2015-07-13 01:04:05 +08:00
}
}
}
2015-07-15 15:31:55 +08:00
&-slash {
margin: 0 10px 0 5px;
}
2015-07-14 12:09:29 +08:00
&-options {
display: inline-block;
vertical-align: middle;
margin-left: 16px;
2017-12-17 16:47:11 +08:00
&-size-changer.@{ant-prefix}-select {
display: inline-block;
margin-right: 8px;
2015-07-13 01:04:05 +08:00
}
2015-07-14 12:09:29 +08:00
&-quick-jumper {
display: inline-block;
2017-12-17 16:38:58 +08:00
vertical-align: top;
height: @input-height-base;
line-height: @input-height-base;
2015-07-13 01:04:05 +08:00
input {
2015-07-14 12:09:29 +08:00
.input;
2015-07-13 01:04:05 +08:00
margin: 0 8px;
width: 50px;
}
}
}
2015-07-13 14:58:26 +08:00
2015-11-26 19:32:55 +08:00
&-simple &-prev,
&-simple &-next {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
vertical-align: top;
.@{pagination-prefix-cls}-item-link {
border: 0;
height: @pagination-item-size-sm;
&:after {
2017-12-17 16:38:58 +08:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
}
}
2015-07-13 16:04:07 +08:00
}
2015-07-14 12:09:29 +08:00
&-simple &-simple-pager {
display: inline-block;
2015-07-13 16:04:07 +08:00
margin-right: 8px;
height: @pagination-item-size-sm;
2015-07-13 16:04:07 +08:00
input {
margin-right: 8px;
2015-07-13 16:04:07 +08:00
box-sizing: border-box;
background-color: @component-background;
2015-11-05 21:25:43 +08:00
border-radius: @border-radius-base;
border: @border-width-base @border-style-base @border-color-base;
2015-07-13 16:04:07 +08:00
outline: none;
padding: 0 6px;
height: 100%;
2015-07-14 12:09:29 +08:00
text-align: center;
transition: border-color .3s;
2015-07-13 16:04:07 +08:00
&:hover {
2015-07-14 16:50:08 +08:00
border-color: @primary-color;
2015-07-13 16:04:07 +08:00
}
}
}
&.mini &-total-text,
&.mini &-simple-pager {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2016-02-25 10:36:58 +08:00
}
2015-07-14 12:09:29 +08:00
&.mini &-item {
margin: 0;
min-width: @pagination-item-size-sm;
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2015-07-14 12:09:29 +08:00
}
2017-12-10 16:42:40 +08:00
&.mini &-item:not(&-item-active) {
background: transparent;
2017-12-15 10:30:01 +08:00
border-color: transparent;
2017-12-10 16:42:40 +08:00
}
2015-07-14 12:09:29 +08:00
&.mini &-prev,
&.mini &-next {
margin: 0;
min-width: @pagination-item-size-sm;
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-08-30 14:02:49 +08:00
}
&.mini &-prev &-item-link,
&.mini &-next &-item-link {
2017-12-15 10:30:01 +08:00
border-color: transparent;
2017-12-10 16:42:40 +08:00
background: transparent;
2017-08-30 14:02:49 +08:00
&:after {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2015-07-17 16:24:09 +08:00
}
2015-07-14 12:09:29 +08:00
}
2015-11-26 19:32:55 +08:00
&.mini &-jump-prev,
&.mini &-jump-next {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-10-24 20:39:38 +08:00
margin-right: 0;
2015-07-14 12:09:29 +08:00
}
&.mini &-options {
margin-left: 2px;
2015-07-14 12:09:29 +08:00
&-quick-jumper {
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2015-07-14 12:09:29 +08:00
input {
.input-sm;
2015-12-05 13:39:24 +08:00
width: 44px;
2015-07-14 12:09:29 +08:00
}
}
}
}
@media only screen and (max-width: @screen-lg) {
.@{pagination-prefix-cls}-item {
&-after-jump-prev,
&-before-jump-next {
display: none;
}
}
}
@media only screen and (max-width: @screen-sm) {
.@{pagination-prefix-cls}-options {
display: none;
}
}