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

354 lines
6.7 KiB
Plaintext
Raw Normal View History

2017-11-03 03:08:46 +00:00
@import "../../style/themes/default";
@import "../../style/mixins/index";
2018-01-16 03:13:22 +00:00
@import "../../input/style/mixin";
2017-11-03 03:08:46 +00:00
@pagination-prefix-cls: ~"@{ant-prefix}-pagination";
.@{pagination-prefix-cls} {
2018-01-16 03:13:22 +00:00
.reset-component;
ul,
ol {
margin: 0;
padding: 0;
list-style: none;
}
2017-11-03 03:08:46 +00:00
&:after {
content: " ";
display: block;
height: 0;
clear: both;
overflow: hidden;
visibility: hidden;
}
&-total-text {
display: inline-block;
vertical-align: middle;
2018-01-16 03:13:22 +00:00
height: @pagination-item-size;
line-height: @pagination-item-size - 2px;
2017-11-03 03:08:46 +00:00
margin-right: 8px;
}
&-item {
cursor: pointer;
border-radius: @border-radius-base;
user-select: none;
2018-01-16 03:13:22 +00:00
min-width: @pagination-item-size;
height: @pagination-item-size;
line-height: @pagination-item-size - 2px;
2017-11-03 03:08:46 +00: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;
margin-right: 8px;
font-family: Arial;
outline: 0;
a {
text-decoration: none;
color: @text-color;
transition: none;
margin: 0 6px;
}
&:focus,
&:hover {
transition: all .3s;
border-color: @primary-color;
a {
color: @primary-color;
}
}
&-active {
border-color: @primary-color;
2018-01-16 03:13:22 +00:00
font-weight: 500;
a {
color: @primary-color;
}
2017-11-03 03:08:46 +00:00
&:focus,
&:hover {
border-color: @primary-5;
}
&:focus a,
&:hover a {
2018-01-16 03:13:22 +00:00
color: @primary-5;
2017-11-03 03:08:46 +00:00
}
}
}
&-jump-prev,
&-jump-next {
outline: 0;
&:after {
content: "•••";
display: block;
letter-spacing: 2px;
color: @disabled-color;
text-align: center;
}
&:focus,
&:hover {
&:after {
color: @primary-color;
.iconfont-size-under-12px(8px);
letter-spacing: -1px;
font-family: "anticon";
}
}
}
&-jump-prev {
&:focus,
&:hover {
&:after {
content: "\e620\e620";
}
}
}
&-jump-next {
&:focus,
&:hover {
&:after {
content: "\e61f\e61f";
}
}
}
&-prev,
&-jump-prev,
&-jump-next {
margin-right: 8px;
}
&-prev,
&-next,
&-jump-prev,
&-jump-next {
font-family: Arial;
cursor: pointer;
color: @text-color;
border-radius: @border-radius-base;
list-style: none;
2018-01-16 03:13:22 +00:00
min-width: @pagination-item-size;
height: @pagination-item-size;
line-height: @pagination-item-size;
2017-11-03 03:08:46 +00:00
text-align: center;
transition: all .3s;
display: inline-block;
vertical-align: middle;
}
&-prev,
&-next {
outline: 0;
a {
color: @text-color;
user-select: none;
}
&:hover a {
2018-01-16 03:13:22 +00:00
border-color: @primary-5;
2017-11-03 03:08:46 +00: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;
display: block;
transition: all .3s;
&:after {
2018-01-16 03:13:22 +00:00
font-size: 12px;
2017-11-03 03:08:46 +00:00
display: block;
2018-01-16 03:13:22 +00:00
height: @pagination-item-size - 2px;
2017-11-03 03:08:46 +00:00
font-family: "anticon";
text-align: center;
font-weight: 500;
}
}
&:focus .@{pagination-prefix-cls}-item-link,
&:hover .@{pagination-prefix-cls}-item-link {
border-color: @primary-color;
color: @primary-color;
}
}
&-prev {
.@{pagination-prefix-cls}-item-link:after {
content: "\e620";
display: block;
}
}
&-next {
.@{pagination-prefix-cls}-item-link:after {
content: "\e61f";
display: block;
}
}
&-disabled {
&,
&:hover,
&:focus {
cursor: not-allowed;
a,
.@{pagination-prefix-cls}-item-link {
border-color: @border-color-base;
color: @disabled-color;
cursor: not-allowed;
}
}
}
&-slash {
margin: 0 10px 0 5px;
}
&-options {
display: inline-block;
vertical-align: middle;
margin-left: 16px;
2018-01-16 03:13:22 +00:00
&-size-changer.@{ant-prefix}-select {
2017-11-03 03:08:46 +00:00
display: inline-block;
margin-right: 8px;
}
&-quick-jumper {
display: inline-block;
2018-01-16 03:13:22 +00:00
vertical-align: top;
height: @input-height-base;
line-height: @input-height-base;
2017-11-03 03:08:46 +00:00
input {
2018-01-16 03:13:22 +00:00
.input;
2017-11-03 03:08:46 +00:00
margin: 0 8px;
width: 50px;
}
}
}
&-simple &-prev,
&-simple &-next {
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
vertical-align: top;
.@{pagination-prefix-cls}-item-link {
border: 0;
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
&:after {
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
}
}
}
&-simple &-simple-pager {
display: inline-block;
margin-right: 8px;
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
input {
margin-right: 8px;
box-sizing: border-box;
background-color: @component-background;
border-radius: @border-radius-base;
border: @border-width-base @border-style-base @border-color-base;
outline: none;
padding: 0 6px;
height: 100%;
text-align: center;
transition: border-color .3s;
&:hover {
border-color: @primary-color;
}
}
}
&.mini &-total-text,
&.mini &-simple-pager {
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
}
&.mini &-item {
margin: 0;
2018-01-16 03:13:22 +00:00
min-width: @pagination-item-size-sm;
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm - 2px;
}
&.mini &-item:not(&-item-active) {
background: transparent;
border-color: transparent;
2017-11-03 03:08:46 +00:00
}
&.mini &-prev,
&.mini &-next {
margin: 0;
2018-01-16 03:13:22 +00:00
min-width: @pagination-item-size-sm;
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
}
&.mini &-prev &-item-link,
&.mini &-next &-item-link {
2018-01-16 03:13:22 +00:00
border-color: transparent;
background: transparent;
2017-11-03 03:08:46 +00:00
&:after {
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
}
}
&.mini &-jump-prev,
&.mini &-jump-next {
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
margin-right: 0;
2017-11-03 03:08:46 +00:00
}
&.mini &-options {
2018-01-16 03:13:22 +00:00
margin-left: 2px;
2017-11-03 03:08:46 +00:00
&-quick-jumper {
2018-01-16 03:13:22 +00:00
height: @pagination-item-size-sm;
line-height: @pagination-item-size-sm;
2017-11-03 03:08:46 +00:00
input {
2018-01-16 03:13:22 +00:00
.input-sm;
2017-11-03 03:08:46 +00:00
width: 44px;
}
}
}
}
2018-01-16 03:13:22 +00:00
@media only screen and (max-width: @screen-lg) {
2017-11-03 03:08:46 +00:00
.@{pagination-prefix-cls}-item {
&-after-jump-prev,
&-before-jump-next {
display: none;
}
}
}
2017-12-20 02:56:21 +00:00
2018-01-16 03:13:22 +00:00
@media only screen and (max-width: @screen-sm) {
.@{pagination-prefix-cls}-options {
display: none;
2017-12-20 02:56:21 +00:00
}
}