You are here

pager.css in Drupal 10

Styles for Claro's Pagination.

File

core/themes/claro/css/components/pager.css
View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Styles for Claro's Pagination.
  10. */
  11. :root {
  12. /**
  13. * Pager.
  14. */
  15. --pager-size: 2rem; /* --space-m × 2 */
  16. --pager-border-width: 0.125rem; /* 2px */
  17. --pager-fg-color: var(--color-gray-800);
  18. --pager-bg-color: var(--color-white);
  19. --pager--hover-bg-color: var(--color-bgblue-active);
  20. --pager--focus-bg-color: var(--color-focus);
  21. --pager--active-fg-color: var(--color-white);
  22. --pager--active-bg-color: var(--color-absolutezero);
  23. --pager-border-radius--action: var(--pager-border-width);
  24. }
  25. .pager {
  26. margin-top: var(--space-m);
  27. margin-bottom: var(--space-m);
  28. }
  29. .pager__items {
  30. display: flex;
  31. flex-wrap: wrap;
  32. align-items: flex-end;
  33. justify-content: center;
  34. margin: var(--space-m) 0; /* LTR */
  35. list-style: none;
  36. text-align: center;
  37. font-weight: bold;
  38. }
  39. [dir="rtl"] .pager__items {
  40. margin: var(--space-m) 0;
  41. }
  42. .pager__item {
  43. display: inline-block;
  44. margin-right: calc(var(--space-xs) / 2);
  45. margin-left: calc(var(--space-xs) / 2);
  46. vertical-align: top;
  47. }
  48. .pager__link,
  49. .pager__item--current {
  50. display: flex;
  51. align-items: center;
  52. justify-content: center;
  53. box-sizing: border-box;
  54. min-width: var(--pager-size);
  55. height: var(--pager-size);
  56. padding-right: var(--space-xs);
  57. padding-left: var(--space-xs);
  58. text-decoration: none;
  59. color: var(--pager-fg-color);
  60. border-radius: var(--space-m); /* Pager size ÷ 2 */
  61. background: var(--pager-bg-color); /* Make sure that the text is visible on dark background. */
  62. line-height: 1;
  63. }
  64. .pager__link:hover,
  65. .pager__link:focus,
  66. .pager__link:active {
  67. text-decoration: none;
  68. }
  69. .pager__link:hover,
  70. .pager__link.is-active:hover {
  71. color: var(--pager-fg-color);
  72. background: var(--pager--hover-bg-color);
  73. }
  74. .pager__link--action-link {
  75. border-radius: var(--pager-border-radius--action);
  76. }
  77. /* Active number link. */
  78. .pager__link.is-active,
  79. .pager__item--current {
  80. color: var(--pager--active-fg-color);
  81. border: var(--pager-border-width) solid transparent;
  82. background: var(--pager--active-bg-color);
  83. }
  84. .pager__item--first .pager__link::before {
  85. background-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 2v12M14 2L8 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  86. }
  87. .pager__item--previous .pager__link::before {
  88. background-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11 2L5 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  89. }
  90. .pager__item--next .pager__link::after {
  91. background-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  92. }
  93. .pager__item--last .pager__link::after {
  94. background-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14 14V2M2 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  95. }
  96. .pager__item--first .pager__link::before,
  97. .pager__item--previous .pager__link::before,
  98. .pager__item--next .pager__link::after,
  99. .pager__item--last .pager__link::after {
  100. position: relative;
  101. display: inline-block;
  102. width: 1rem;
  103. height: 1rem;
  104. content: "";
  105. background-repeat: no-repeat;
  106. background-position: center;
  107. }
  108. @media (forced-colors: active) {
  109. .pager__item--first .pager__link::before {
  110. -webkit-mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 2v12M14 2L8 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  111. mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2 2v12M14 2L8 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  112. }
  113. .pager__item--previous .pager__link::before {
  114. -webkit-mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11 2L5 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  115. mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M11 2L5 8l6 6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  116. }
  117. .pager__item--next .pager__link::after {
  118. -webkit-mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  119. mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  120. }
  121. .pager__item--last .pager__link::after {
  122. -webkit-mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14 14V2M2 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  123. mask-image: url("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M14 14V2M2 14l6-6-6-6' stroke='%23545560' stroke-width='2'/%3e%3c/svg%3e");
  124. }
  125. .pager__item--first .pager__link::before,
  126. .pager__item--previous .pager__link::before,
  127. .pager__item--next .pager__link::after,
  128. .pager__item--last .pager__link::after {
  129. background-color: linktext;
  130. background-image: none;
  131. -webkit-mask-repeat: no-repeat;
  132. mask-repeat: no-repeat;
  133. -webkit-mask-position: center;
  134. mask-position: center;
  135. }
  136. }
  137. [dir="rtl"] .pager__item--first .pager__link::before,
  138. [dir="rtl"] .pager__item--previous .pager__link::before,
  139. [dir="rtl"] .pager__item--next .pager__link::after,
  140. [dir="rtl"] .pager__item--last .pager__link::after {
  141. transform: scaleX(-1);
  142. }
  143. .pager__item--mini {
  144. margin-right: calc(var(--space-m) / 2);
  145. margin-left: calc(var(--space-m) / 2);
  146. }
  147. .pager__link--mini {
  148. border-radius: 50%;
  149. }
  150. /**
  151. * On the mini pager, remove margins for the previous and next icons.
  152. * Margins are not needed here as there is no accompanying text.
  153. */
  154. .pager__link--mini::before {
  155. margin-right: 0;
  156. margin-left: 0;
  157. }
  158. .pager__item-title--backwards {
  159. margin-left: 0.5rem; /* LTR */
  160. }
  161. [dir="rtl"] .pager__item-title--backwards {
  162. margin-right: 0.5rem;
  163. margin-left: 0;
  164. }
  165. .pager__item-title--forward {
  166. margin-right: 0.5rem; /* LTR */
  167. }
  168. [dir="rtl"] .pager__item-title--forward {
  169. margin-right: 0;
  170. margin-left: 0.5rem;
  171. }
  172. @media (-ms-high-contrast: active), (forced-colors: active) {
  173. .pager__item a:hover {
  174. text-decoration: underline;
  175. }
  176. }