pagination.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /* mixins & extensions */
  2. @keyframes in {
  3. 0% {
  4. opacity: 0;
  5. }
  6. 100% {
  7. opacity: 1;
  8. }
  9. }
  10. @keyframes in-down {
  11. 0% {
  12. opacity: 0;
  13. transform: translate3D(0, -5px, 0);
  14. }
  15. 100% {
  16. opacity: 1;
  17. transform: translate3D(0, 0, 0);
  18. }
  19. }
  20. @keyframes in-up {
  21. 0% {
  22. opacity: 0;
  23. transform: translate3D(0, 5px, 0);
  24. }
  25. 100% {
  26. opacity: 1;
  27. transform: translate3D(0, 0, 0);
  28. }
  29. }
  30. @keyframes in-scale {
  31. 0% {
  32. opacity: 0;
  33. transform: scale3D(0.95, 0.95, 1);
  34. }
  35. 100% {
  36. opacity: 1;
  37. transform: scale3D(1, 1, 1);
  38. }
  39. }
  40. :root {
  41. --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
  42. --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
  43. --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
  44. --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
  45. --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
  46. }
  47. .calcite-animate {
  48. opacity: 0;
  49. animation-fill-mode: both;
  50. animation-duration: var(--calcite-animation-timing);
  51. }
  52. .calcite-animate__in {
  53. animation-name: in;
  54. }
  55. .calcite-animate__in-down {
  56. animation-name: in-down;
  57. }
  58. .calcite-animate__in-up {
  59. animation-name: in-up;
  60. }
  61. .calcite-animate__in-scale {
  62. animation-name: in-scale;
  63. }
  64. /**
  65. * Currently only used in Checkbox.
  66. */
  67. :root {
  68. --calcite-popper-transition: var(--calcite-animation-timing);
  69. }
  70. :host([hidden]) {
  71. display: none;
  72. }
  73. /**
  74. * CSS Custom Properties
  75. *
  76. * These properties can be overridden using the component's tag as selector.
  77. *
  78. * @prop --calcite-pagination-spacing: the amount of padding around each pagination item
  79. */
  80. :host([scale=s]) {
  81. --calcite-pagination-spacing: 0.25rem 0.5rem;
  82. }
  83. :host([scale=s]) .previous, :host([scale=s]) .next, :host([scale=s]) .page {
  84. height: 1.5rem;
  85. font-size: var(--calcite-font-size--2);
  86. line-height: 1rem;
  87. }
  88. :host([scale=s]) .previous, :host([scale=s]) .next {
  89. padding-left: 0.25rem;
  90. padding-right: 0.25rem;
  91. }
  92. :host([scale=m]) {
  93. --calcite-pagination-spacing: 0.5rem 0.75rem;
  94. }
  95. :host([scale=m]) .previous, :host([scale=m]) .next, :host([scale=m]) .page {
  96. height: 2rem;
  97. font-size: var(--calcite-font-size--1);
  98. line-height: 1rem;
  99. }
  100. :host([scale=m]) .previous, :host([scale=m]) .next {
  101. padding-left: 0.5rem;
  102. padding-right: 0.5rem;
  103. }
  104. :host([scale=l]) {
  105. --calcite-pagination-spacing: 0.75rem 1rem;
  106. }
  107. :host([scale=l]) .previous, :host([scale=l]) .next, :host([scale=l]) .page {
  108. height: 2.75rem;
  109. font-size: var(--calcite-font-size-0);
  110. line-height: 1.25rem;
  111. }
  112. :host([scale=l]) .previous, :host([scale=l]) .next {
  113. padding-left: 1rem;
  114. padding-right: 1rem;
  115. }
  116. :host {
  117. display: flex;
  118. writing-mode: horizontal-tb;
  119. }
  120. :host button {
  121. outline-offset: 0;
  122. outline-color: transparent;
  123. transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
  124. }
  125. :host button:focus {
  126. outline: 2px solid var(--calcite-ui-brand);
  127. outline-offset: -2px;
  128. }
  129. .previous, .next, .page {
  130. box-sizing: border-box;
  131. display: flex;
  132. cursor: pointer;
  133. align-items: center;
  134. border-style: none;
  135. --tw-border-opacity: 0;
  136. background-color: transparent;
  137. font-family: inherit;
  138. font-size: var(--calcite-font-size-0);
  139. line-height: 1.25rem;
  140. color: var(--calcite-ui-text-3);
  141. border-top: 2px solid transparent;
  142. border-bottom: 2px solid transparent;
  143. }
  144. .previous:hover, .next:hover, .page:hover {
  145. color: var(--calcite-ui-text-1);
  146. transition-property: all;
  147. transition-duration: var(--calcite-animation-timing);
  148. transition-timing-function: ease-in-out;
  149. transition-delay: 0s;
  150. }
  151. .page:hover {
  152. border-bottom-color: var(--calcite-ui-border-2);
  153. }
  154. .page.is-selected {
  155. font-weight: var(--calcite-font-weight-medium);
  156. color: var(--calcite-ui-text-1);
  157. border-bottom-color: var(--calcite-ui-brand);
  158. }
  159. .previous:hover, .next:hover {
  160. background-color: var(--calcite-ui-foreground-2);
  161. color: var(--calcite-ui-brand);
  162. }
  163. .previous:active, .next:active {
  164. background-color: var(--calcite-ui-foreground-3);
  165. }
  166. .previous.is-disabled, .next.is-disabled {
  167. pointer-events: none;
  168. background-color: transparent;
  169. }
  170. .previous.is-disabled > calcite-icon, .next.is-disabled > calcite-icon {
  171. opacity: var(--calcite-ui-opacity-disabled);
  172. }
  173. .next {
  174. margin-right: 0px;
  175. }
  176. .page,
  177. .ellipsis {
  178. padding: var(--calcite-pagination-spacing);
  179. }
  180. .ellipsis {
  181. display: flex;
  182. align-items: flex-end;
  183. color: var(--calcite-ui-text-3);
  184. }