You are here

pager.css in Drupal 9

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. */ /* --space-m × 2 */ /* 2px */
  15. }
  16. .pager {
  17. margin-top: 1rem;
  18. margin-bottom: 1rem;
  19. }
  20. .pager__items {
  21. display: flex;
  22. flex-wrap: wrap;
  23. align-items: flex-end;
  24. justify-content: center;
  25. margin: 1rem 0; /* LTR */
  26. list-style: none;
  27. text-align: center;
  28. font-weight: bold;
  29. }
  30. [dir="rtl"] .pager__items {
  31. margin: 1rem 0;
  32. }
  33. .pager__item {
  34. display: inline-block;
  35. margin-right: 0.25rem;
  36. margin-left: 0.25rem;
  37. vertical-align: top;
  38. }
  39. .pager__link,
  40. .pager__item--current {
  41. display: flex;
  42. align-items: center;
  43. justify-content: center;
  44. box-sizing: border-box;
  45. min-width: 2rem;
  46. height: 2rem;
  47. padding-right: 0.5rem;
  48. padding-left: 0.5rem;
  49. text-decoration: none;
  50. color: #545560;
  51. border-radius: 1rem; /* Pager size ÷ 2 */
  52. background: #fff; /* Make sure that the text is visible on dark background. */
  53. line-height: 1;
  54. }
  55. .pager__link:hover,
  56. .pager__link:focus,
  57. .pager__link:active {
  58. text-decoration: none;
  59. }
  60. .pager__link:hover,
  61. .pager__link.is-active:hover {
  62. color: #545560;
  63. background: #e6ecf8;
  64. }
  65. .pager__link--action-link {
  66. border-radius: 0.125rem;
  67. }
  68. /* Active number link. */
  69. .pager__link.is-active,
  70. .pager__item--current {
  71. color: #fff;
  72. background: #003cc5;
  73. }
  74. .pager__item--first .pager__link::before {
  75. 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");
  76. }
  77. .pager__item--previous .pager__link::before {
  78. 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");
  79. }
  80. .pager__item--next .pager__link::after {
  81. 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");
  82. }
  83. .pager__item--last .pager__link::after {
  84. 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");
  85. }
  86. .pager__item--first .pager__link::before,
  87. .pager__item--previous .pager__link::before,
  88. .pager__item--next .pager__link::after,
  89. .pager__item--last .pager__link::after {
  90. position: relative;
  91. display: inline-block;
  92. width: 1rem;
  93. height: 1rem;
  94. content: "";
  95. background-repeat: no-repeat;
  96. background-position: center;
  97. }
  98. [dir="rtl"] .pager__item--first .pager__link::before,
  99. [dir="rtl"] .pager__item--previous .pager__link::before,
  100. [dir="rtl"] .pager__item--next .pager__link::after,
  101. [dir="rtl"] .pager__item--last .pager__link::after {
  102. transform: scaleX(-1);
  103. }
  104. .pager__item--mini {
  105. margin-right: 0.5rem;
  106. margin-left: 0.5rem;
  107. }
  108. .pager__link--mini {
  109. border-radius: 50%;
  110. }
  111. /**
  112. * On the mini pager, remove margins for the previous and next icons.
  113. * Margins are not needed here as there is no accompanying text.
  114. */
  115. .pager__link--mini::before {
  116. margin-right: 0;
  117. margin-left: 0;
  118. }
  119. .pager__item-title--backwards {
  120. margin-left: 0.5rem; /* LTR */
  121. }
  122. [dir="rtl"] .pager__item-title--backwards {
  123. margin-right: 0.5rem;
  124. margin-left: 0;
  125. }
  126. .pager__item-title--forward {
  127. margin-right: 0.5rem; /* LTR */
  128. }
  129. [dir="rtl"] .pager__item-title--forward {
  130. margin-right: 0;
  131. margin-left: 0.5rem;
  132. }
  133. @media (-ms-high-contrast: active) {
  134. .pager__item a:hover {
  135. text-decoration: underline;
  136. }
  137. .pager__link.is-active {
  138. border: 0.125rem solid #fff;
  139. }
  140. }