|
8 | 8 | $block: #{$fd-namespace}-pagination;
|
9 | 9 |
|
10 | 10 | .#{$block} {
|
11 |
| - |
12 |
| - $fd-pagination-link-padding-x: 0.25rem; |
13 |
| - $fd-pagination-padding-x: 0.5rem; |
14 |
| - |
15 | 11 | @include fd-reset();
|
| 12 | + @include fd-flex-between(); |
16 | 13 |
|
17 | 14 | font-size: var(--sapFontSize);
|
| 15 | + padding: 0 1rem; |
| 16 | + height: 2.75rem; |
| 17 | + width: 100%; |
18 | 18 |
|
19 |
| - &__total { |
| 19 | + .#{$block}__per-page { |
20 | 20 | @include fd-reset();
|
21 |
| - |
22 |
| - font-size: var(--sapFontSize); |
23 |
| - color: var(--sapContent_LabelColor); |
24 |
| - margin-right: $fd-pagination-padding-x; |
25 |
| - |
26 |
| - @include fd-rtl() { |
27 |
| - margin-right: 0; |
28 |
| - margin-left: $fd-pagination-padding-x; |
29 |
| - } |
| 21 | + @include fd-flex-center(); |
30 | 22 | }
|
31 | 23 |
|
32 |
| - &__nav { |
| 24 | + .#{$block}__nav { |
33 | 25 | @include fd-reset();
|
34 |
| - |
35 |
| - display: inline-block; |
36 |
| - padding-left: 0; |
37 |
| - margin-left: 0; |
38 |
| - list-style: none; |
39 |
| - margin-bottom: 0; |
| 26 | + @include fd-flex-center(); |
| 27 | + @include fd-set-margins-x('auto', 'auto'); |
40 | 28 | }
|
41 | 29 |
|
42 |
| - &__more { |
| 30 | + .#{$block}__more { |
43 | 31 | @include fd-reset();
|
44 | 32 |
|
45 | 33 | &::before {
|
46 | 34 | content: "...";
|
47 |
| - color: var(--sapLinkColor); |
48 |
| - font-weight: bold; |
| 35 | + display: block; |
| 36 | + width: 1.5rem; |
| 37 | + text-align: center; |
49 | 38 | }
|
50 | 39 | }
|
51 | 40 |
|
52 |
| - &__link { |
53 |
| - @include fd-reset(); |
54 |
| - @include fd-link(); |
55 |
| - |
56 |
| - font-size: var(--sapFontSize); |
57 |
| - background-color: transparent; |
58 |
| - padding-left: $fd-pagination-link-padding-x; |
59 |
| - padding-right: $fd-pagination-link-padding-x; |
60 |
| - position: relative; |
61 |
| - text-decoration: none; |
62 |
| - |
63 |
| - @include fd-selected() { |
64 |
| - color: var(--sapContent_LabelColor); |
65 |
| - text-decoration: none; |
66 |
| - cursor: default; |
67 |
| - font-weight: bold; |
68 |
| - } |
| 41 | + .#{$block}__input { |
| 42 | + min-width: 2.5rem; |
| 43 | + text-align: center; |
| 44 | + |
| 45 | + /** Hide arrows so the text will be centered in the input. */ |
69 | 46 |
|
70 |
| - &--previous, |
71 |
| - &--next { |
72 |
| - @include fd-reset(); |
73 |
| - @include fd-link(); |
| 47 | + /** Firefox */ |
| 48 | + -moz-appearance: textfield; |
74 | 49 |
|
75 |
| - font-size: var(--sapFontSize); |
76 |
| - padding-left: $fd-pagination-padding-x; |
77 |
| - padding-right: $fd-pagination-padding-x; |
| 50 | + /** WebKit/Blink */ |
| 51 | + &::-webkit-outer-spin-button, |
| 52 | + &::-webkit-inner-spin-button { |
| 53 | + -webkit-appearance: none; |
| 54 | + margin: 0; |
78 | 55 | }
|
79 | 56 |
|
80 |
| - &--previous { |
81 |
| - @include fd-icon("navigation-left-arrow"); |
| 57 | + &-label { |
| 58 | + display: none; |
| 59 | + } |
| 60 | + } |
82 | 61 |
|
83 |
| - font-size: var(--sapFontSmallSize); |
| 62 | + .#{$block}__input-label, |
| 63 | + .#{$block}__per-page-label { |
| 64 | + flex-shrink: 0; |
| 65 | + align-self: center; |
| 66 | + } |
84 | 67 |
|
85 |
| - @include fd-rtl() { |
86 |
| - @include fd-icon("navigation-right-arrow"); |
87 |
| - } |
88 |
| - } |
| 68 | + .#{$block}__button--mobile { |
| 69 | + display: none; |
| 70 | + } |
| 71 | +} |
89 | 72 |
|
90 |
| - &--next { |
91 |
| - @include fd-icon("navigation-right-arrow"); |
| 73 | +@media (max-width: 599px) { |
| 74 | + .#{$block} { |
| 75 | + .#{$block}__per-page + .#{$block}__nav { |
| 76 | + @include fd-set-margins-x('auto', 0); |
| 77 | + } |
92 | 78 |
|
93 |
| - font-size: var(--sapFontSmallSize); |
| 79 | + .#{$block}__total, |
| 80 | + .#{$block}__per-page-label, |
| 81 | + .#{$block}__link, |
| 82 | + .#{$block}__more { |
| 83 | + display: none; |
| 84 | + } |
94 | 85 |
|
95 |
| - @include fd-rtl() { |
96 |
| - @include fd-icon("navigation-left-arrow"); |
97 |
| - } |
| 86 | + .#{$block}__button--mobile, |
| 87 | + .#{$block}__input-label { |
| 88 | + display: flex; |
98 | 89 | }
|
99 | 90 | }
|
100 | 91 | }
|
0 commit comments