naive-ui/styles/Pagination.scss

129 lines
3.7 KiB
SCSS

@import './mixins/mixins.scss';
@include themes-mixin {
@include b(pagination) {
@include once {
display: flex;
vertical-align: middle;
@include b(select) {
width: unset;
}
@include m(transition-disabled) {
@include b(pagination-item) {
transition: none;
}
}
}
@include b(pagination-quick-jumper) {
@include once {
white-space: nowrap;
display: flex;
width: 110px;
line-height: 28px;
transition: color .3s $--n-ease-in-out-cubic-bezier;
@include b(input) {
margin: 0 8px;
input {
padding-left: 6px;
padding-right: 10px;
}
}
}
color: map-get($--pagination-item-text-color, "default");
}
@include b(pagination-item) {
@include once {
position: relative;
cursor: pointer;
user-select: none;
min-width:28px;
height:28px;
padding-left: 4px;
padding-right: 4px;
box-sizing: border-box;
opacity: 1;
transition:
color .3s $--n-ease-in-out-cubic-bezier,
box-shadow .3s $--n-ease-in-out-cubic-bezier,
background-color .3s $--n-ease-in-out-cubic-bezier,
opacity .3s $--n-ease-in-out-cubic-bezier,
fill .3s $--n-ease-in-out-cubic-bezier;
display: flex;
align-items: center;
justify-content: center;
border-radius:6px;
line-height: 28px;
&:not(:last-child) {
margin-right: 8px;
}
@include e(more-icon, arrow-icon) {
position: relative;
z-index: auto;
width: 16px;
height: 16px;
@include b(base-icon) {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
}
@include m(fast-backward, fast-forward) {
@include e(more-icon) {
display: block;
}
@include e(arrow-icon) {
display: none;
}
}
}
color: map-get($--pagination-item-text-color, 'default');
fill: map-get($--pagination-item-text-color, 'default');
@include m(active) {
background: map-get($--pagination-item-background-color, 'active');
color: map-get($--pagination-item-text-color, 'active');
box-shadow: inset 0 0 0 1px map-get($--pagination-item-border-color, 'active');
}
@include m(backward, forward) {
background-color: map-get($--pagination-item-background-color, 'default');
box-shadow: inset 0 0 0 1px map-get($--pagination-item-border-color, 'default');
}
@include not-m(disabled) {
&:hover {
color: map-get($--pagination-item-text-color, 'hover');
@include once {
@include m(fast-backward, fast-forward) {
@include e(more-icon) {
display: none;
}
@include e(arrow-icon) {
display: block;
}
}
}
}
}
@include m(disabled) {
fill: map-get($--pagination-item-text-color, 'disabled');
color: map-get($--pagination-item-text-color, 'disabled');
@include m(active, backward, forward) {
background-color: map-get($--pagination-item-background-color, 'disabled');
box-shadow: inset 0 0 0 1px map-get($--pagination-item-border-color, 'disabled');
}
@include once {
cursor: not-allowed;
}
}
}
@include m(disabled) {
@include once {
cursor: not-allowed;
}
@include b(pagination-quick-jumper) {
color: map-get($--pagination-text-color, "disabled");
}
}
}
}