navigation.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. @use '../swiper-vars.scss' as vars;
  2. @at-root {
  3. :root {
  4. --swiper-navigation-size: 44px;
  5. /*
  6. --swiper-navigation-top-offset: 50%;
  7. --swiper-navigation-sides-offset: 10px;
  8. --swiper-navigation-color: var(--swiper-theme-color);
  9. */
  10. }
  11. }
  12. .swiper-button-prev,
  13. .swiper-button-next {
  14. position: absolute;
  15. top: var(--swiper-navigation-top-offset, 50%);
  16. width: calc(var(--swiper-navigation-size) / 44 * 27);
  17. height: var(--swiper-navigation-size);
  18. margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
  19. z-index: 10;
  20. cursor: pointer;
  21. display: flex;
  22. align-items: center;
  23. justify-content: center;
  24. color: var(--swiper-navigation-color, var(--swiper-theme-color));
  25. &.swiper-button-disabled {
  26. opacity: 0.35;
  27. cursor: auto;
  28. pointer-events: none;
  29. }
  30. &.swiper-button-hidden {
  31. opacity: 0;
  32. cursor: auto;
  33. pointer-events: none;
  34. }
  35. .swiper-navigation-disabled & {
  36. display: none !important;
  37. }
  38. svg {
  39. width: 100%;
  40. height: 100%;
  41. object-fit: contain;
  42. transform-origin: center;
  43. }
  44. .swiper-rtl & svg {
  45. transform: rotate(180deg);
  46. }
  47. }
  48. .swiper-button-prev,
  49. .swiper-rtl .swiper-button-next {
  50. left: var(--swiper-navigation-sides-offset, 10px);
  51. right: auto;
  52. }
  53. .swiper-button-next,
  54. .swiper-rtl .swiper-button-prev {
  55. right: var(--swiper-navigation-sides-offset, 10px);
  56. left: auto;
  57. }
  58. .swiper-button-lock {
  59. display: none;
  60. }
  61. /* Navigation font start */
  62. .swiper-button-prev,
  63. .swiper-button-next {
  64. &:after {
  65. font-family: swiper-icons;
  66. font-size: var(--swiper-navigation-size);
  67. text-transform: none !important;
  68. letter-spacing: 0;
  69. font-variant: initial;
  70. line-height: 1;
  71. }
  72. }
  73. .swiper-button-prev,
  74. .swiper-rtl .swiper-button-next {
  75. &:after {
  76. content: 'prev';
  77. }
  78. }
  79. .swiper-button-next,
  80. .swiper-rtl .swiper-button-prev {
  81. right: var(--swiper-navigation-sides-offset, 10px);
  82. left: auto;
  83. &:after {
  84. content: 'next';
  85. }
  86. }
  87. /* Navigation font end */