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

391 lines
7.0 KiB
Plaintext

@import "../../style/themes/default";
@import "../../style/mixins/index";
@pagination-prefix-cls: ~"@{ant-prefix}-pagination";
.@{pagination-prefix-cls} {
font-size: @font-size-base;
&:after {
content: " ";
display: block;
height: 0;
clear: both;
overflow: hidden;
visibility: hidden;
}
&-total-text {
display: inline-block;
vertical-align: middle;
height: 28px;
line-height: 28px;
margin-right: 8px;
}
&-item {
cursor: pointer;
border-radius: @border-radius-base;
user-select: none;
min-width: 28px;
height: 28px;
line-height: 28px;
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 {
background-color: @primary-color;
border-color: @primary-color;
&:focus,
&:hover {
background-color: @primary-5;
border-color: @primary-5;
}
a,
&:focus a,
&:hover a {
color: #fff;
}
}
}
&-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;
min-width: 28px;
height: 28px;
line-height: 28px;
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 {
color: @primary-color;
}
.@{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 {
.iconfont-size-under-12px(8px);
display: block;
height: 26px;
line-height: 26px;
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;
&-size-changer {
display: inline-block;
margin-right: 8px;
}
&-quick-jumper {
display: inline-block;
input {
margin: 0 8px;
width: 50px;
}
}
}
&-simple &-prev,
&-simple &-next {
height: 24px;
line-height: 24px;
vertical-align: top;
.@{pagination-prefix-cls}-item-link {
border: 0;
height: 24px;
&:after {
line-height: 24px;
}
}
}
&-simple &-simple-pager {
display: inline-block;
margin-right: 8px;
height: 24px;
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;
}
}
}
}
.@{pagination-prefix-cls} {
&.mini &-total-text,
&.mini &-simple-pager {
height: 20px;
line-height: 20px;
}
&.mini &-item {
border: 0;
margin: 0;
min-width: 20px;
height: 20px;
line-height: 20px;
}
&.mini &-prev,
&.mini &-next {
margin: 0;
min-width: 20px;
height: 20px;
line-height: 20px;
}
&.mini &-prev &-item-link,
&.mini &-next &-item-link {
border: 0;
&:after {
height: 20px;
line-height: 20px;
}
}
&.mini &-jump-prev,
&.mini &-jump-next {
height: 20px;
line-height: 20px;
}
&.mini &-options {
margin-left: 8px;
&-quick-jumper {
height: 20px;
line-height: 20px;
input {
width: 44px;
}
}
}
}
@media only screen and (max-width: 1024px) {
.@{pagination-prefix-cls}-item {
&-after-jump-prev,
&-before-jump-next {
display: none;
}
}
}
.@{pagination-prefix-cls} {
&-options {
margin-left: 15px;
&-size-changer {
float: left;
width: 80px;
}
&-quick-jumper {
float: left;
margin-left: 16px;
height: 28px;
line-height: 28px;
input {
margin: 0 8px;
box-sizing: border-box;
background-color: #fff;
border-radius: 6px;
border: 1px solid #d9d9d9;
outline: none;
padding: 3px 12px;
width: 50px;
height: 28px;
&:hover {
border-color: #2db7f5;
}
}
button {
display: inline-block;
margin: 0 8px;
font-weight: 500;
text-align: center;
touch-action: manipulation;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 0 15px;
font-size: 12px;
border-radius: 6px;
height: 28px;
user-select: none;
transition: all .3s cubic-bezier(.645,.045,.355,1);
position: relative;
color: rgba(0,0,0,.65);
background-color: #fff;
border-color: #d9d9d9;
&:hover, &:active, &:focus {
color: #2db7f5;
background-color: #fff;
border-color: #2db7f5;
}
}
}
}
}