amis/packages/amis-ui/scss/components/_pagination.scss

201 lines
4.0 KiB
SCSS
Raw Normal View History

2019-04-30 11:11:25 +08:00
.#{$ns}Pagination {
2019-12-06 09:58:08 +08:00
display: inline-block;
2020-06-24 15:59:12 +08:00
padding: 0;
margin: 0 0 px2rem(-8px);
2019-12-06 09:58:08 +08:00
border-radius: px2rem(4px);
> li {
display: inline-flex;
cursor: pointer;
2019-12-06 09:58:08 +08:00
> a,
> span {
user-select: none;
2020-06-16 20:23:42 +08:00
cursor: pointer;
2019-12-06 09:58:08 +08:00
position: relative;
float: left;
text-decoration: none;
min-width: var(--Pagination-minWidth);
height: var(--Pagination-height);
2019-12-06 09:58:08 +08:00
border: 0;
line-height: var(--Pagination-height);
padding: var(--Pagination-padding);
2019-12-06 09:58:08 +08:00
text-align: center;
color: #666666;
border-radius: 0;
margin-left: 0;
font-size: var(--Pagination-fontSize);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> a:hover,
> span:hover,
> a:focus,
> span:focus {
background: transparent;
color: var(--primary);
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
.ellipsis {
cursor: unset;
> a {
cursor: unset;
position: relative;
top: px2rem(-4px);
}
}
2020-06-08 15:49:45 +08:00
> li.is-disabled {
2019-12-06 09:58:08 +08:00
> span,
> a {
cursor: not-allowed;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
> a,
> span,
> a:hover,
> span:hover,
> a:focus,
> span:focus {
color: #cccccc;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2020-06-08 15:49:45 +08:00
> li.is-active {
2019-12-06 09:58:08 +08:00
> a,
> span,
> a:hover,
> span:hover,
> a:focus,
> span:focus {
background: var(--Pagination-onActive-backgroundColor);
color: var(--Pagination-onActive-color);
border: var(--Pagination-onActive-border);
border-radius: var(--borderRadius);
2019-12-06 09:58:08 +08:00
}
}
&-simple {
>ul >li {
&:hover,
&:focus {
outline: none;
}
&.is-active > a {
border: none;
&:hover,
&:focus {
border: none;
}
}
}
}
2019-12-06 09:58:08 +08:00
&-prev {
> span {
cursor: pointer;
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
2019-12-06 09:58:08 +08:00
&-next {
> span {
cursor: pointer;
}
}
&-total {
display: inline-block;
color: var(--Pagination-light-color);
}
2019-12-06 09:58:08 +08:00
&-inputGroup {
display: inline-flex;
flex-wrap: nowrap;
align-items: center;
height: var(--Pagination-height);
2019-12-06 09:58:08 +08:00
&-left {
color: var(--Pagination-light-color);
}
input {
min-width: px2rem(50px);
width: px2rem(50px);
height: var(--Pagination-height);
line-height: var(--Pagination-height);
// height: var(--Pagination-height);
border: none;
border: var(--borderWidth) solid var(--borderColor);
border-radius: var(--borderRadius) 0 0 var(--borderRadius);
padding: var(--Pagination-padding);
margin-left: px2rem(8px);
text-align: center;
2019-12-06 09:58:08 +08:00
&:focus,
&:hover {
outline: none;
// border: var(--borderWidth) solid var(--primary);
border-color: var(--primary);
}
}
&-right {
display: inline-block;
width: px2rem(32px);
cursor: pointer;
text-align: center;
height: var(--Pagination-height);
line-height: var(--Pagination-height);
border: var(--borderWidth) solid var(--borderColor);
border-left: none;
border-radius: 0 var(--borderRadius) var(--borderRadius) 0;
font-size: var(--fontSizeSm);
&:hover {
color: var(--primary);
border-color: var(--primary);
border-left: var(--borderWidth) solid var(--primary);
margin-left: -1px;
}
}
}
}
.#{$ns}Pagination-wrap {
line-height: px2rem(30px);
.#{$ns}Pagination-item {
margin-left: px2rem(8px);
&:nth-child(1) {
margin-left: 0;
}
}
&.disabled {
background-color: #fff;
.#{$ns}Pagination {
> li {
> a,
> span {
color: var(--Pagination-onDisabled-color);
cursor: not-allowed;
}
&.is-active {
> a,
> span,
> a:hover,
> span:hover,
> a:focus,
> span:focus {
background-color: var(--Pagination-onDisabled-backgroundColor);
border-color: var(--Pagination-onDisabled-color);
}
}
2019-12-06 09:58:08 +08:00
}
2019-04-30 11:11:25 +08:00
}
2019-12-06 09:58:08 +08:00
}
}
.#{$ns}PaginationWrapper-pager {
&:first-child {
2020-12-21 10:16:25 +08:00
margin-bottom: var(--gap-sm);
}
text-align: right;
}