summaryrefslogtreecommitdiffstats
path: root/apps/web-shared/src/styles/components/pagination.scss
blob: 0a09210497a301036af2c7e233b55e6492b683db (plain) (blame)
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
@use '../base' as *;

/* --------------------------------

File#: _1_pagination
Title: Pagination
Descr: Component used to navigate through pages of related content
Usage: codyhouse.co/license

-------------------------------- */

.pagination {}

.pagination__list > li {
  display: inline-block; // flex fallback
}

// --split - push first + last item to sides
.pagination--split {
  .pagination__list {
    width: 100%;

    > *:first-child {
      margin-right: auto;
    }

    > *:last-child {
      margin-left: auto;
    }
  }
}

.pagination__item {
  display: inline-block; // flex fallback
  display: inline-flex;
  height: 100%;
  align-items: center;
  padding: var(--space-xs) calc(1.355 * var(--space-xs));

  white-space: nowrap;
  line-height: 1;
  border-radius: var(--radius-md);

  text-decoration: none;
  color: var(--color-contrast-high);
  @include fontSmooth;

  will-change: transform;

  &:hover:not(.pagination__item--selected):not(.pagination__item--ellipsis) {
    background-color: alpha(var(--color-contrast-higher), 0.1);
  }
}

.pagination__item--selected {
  background-color: var(--color-contrast-higher);
  color: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.pagination__item--disabled {
  opacity: 0.5;
  pointer-events: none;
}

// --jumper
.pagination__jumper {
  .form-control {
    width: 3em;
    margin-right: var(--space-xs);
  }

  em {
    flex-shrink: 0;
    white-space: nowrap;
  }
}