navigation.less 1.9 KB

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