-
Notifications
You must be signed in to change notification settings - Fork 171
/
_patterns_pagination.scss
80 lines (65 loc) · 1.61 KB
/
_patterns_pagination.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@import 'settings';
@mixin vf-p-pagination {
%pagination-link {
@extend %vf-button-base;
@include vf-button-pattern;
&.is-active,
&[aria-current='page'] {
background-color: $colors--theme--background-active;
color: $colors--theme--text-default;
text-decoration: none;
}
}
// .p-pagination on the <ol> element is deprecated. It should be used on the wrapping <nav> element instead, and .p-pagination__items on the <ol> or <ul> element.
// stylelint-disable selector-max-type
.p-pagination:not(nav),
.p-pagination__items {
display: flex;
flex-direction: row;
list-style: none;
margin-bottom: 0;
margin-left: 0;
padding-left: 0;
}
.p-pagination__item {
width: auto;
& + & {
&:not(:nth-child(2)):not(:nth-last-child(1)) {
margin-left: $sph--small;
}
&:nth-child(2),
&:nth-last-child(1) {
margin-left: $sph--large;
}
}
&--truncation {
padding: $input-vertical-padding 0;
}
}
.p-pagination__link {
@extend %pagination-link;
}
.p-pagination__link--previous,
.p-pagination__link--next {
@extend %pagination-link;
}
[class*='p-icon'] {
.p-pagination__link--next &,
.p-pagination__link--previous & {
margin-left: $sph--small;
margin-right: $sph--small;
&:first-child {
margin-left: -$sph--small;
}
&:last-child {
margin-right: -#{$sph--small};
}
}
.p-pagination__link--previous & {
transform: rotate(0.25turn);
}
.p-pagination__link--next & {
transform: rotate(-0.25turn);
}
}
}