core.scss 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. $themeColor: #007aff !default;
  2. :root {
  3. --swiper-theme-color: #{$themeColor};
  4. }
  5. .swiper {
  6. margin-left: auto;
  7. margin-right: auto;
  8. position: relative;
  9. overflow: hidden;
  10. list-style: none;
  11. padding: 0;
  12. /* Fix of Webkit flickering */
  13. z-index: 1;
  14. }
  15. .swiper-vertical > .swiper-wrapper {
  16. flex-direction: column;
  17. }
  18. .swiper-wrapper {
  19. position: relative;
  20. width: 100%;
  21. height: 100%;
  22. z-index: 1;
  23. display: flex;
  24. transition-property: transform;
  25. box-sizing: content-box;
  26. }
  27. .swiper-android .swiper-slide,
  28. .swiper-wrapper {
  29. transform: translate3d(0px, 0, 0);
  30. }
  31. .swiper-pointer-events {
  32. touch-action: pan-y;
  33. &.swiper-vertical {
  34. touch-action: pan-x;
  35. }
  36. }
  37. .swiper-slide {
  38. flex-shrink: 0;
  39. width: 100%;
  40. height: 100%;
  41. position: relative;
  42. transition-property: transform;
  43. }
  44. .swiper-slide-invisible-blank {
  45. visibility: hidden;
  46. }
  47. /* Auto Height */
  48. .swiper-autoheight {
  49. &,
  50. .swiper-slide {
  51. height: auto;
  52. }
  53. .swiper-wrapper {
  54. align-items: flex-start;
  55. transition-property: transform, height;
  56. }
  57. }
  58. .swiper-slide-3d{
  59. transform-style: preserve-3d;
  60. }
  61. /* 3D Effects */
  62. .swiper-3d {
  63. &,
  64. &.swiper-css-mode .swiper-wrapper {
  65. perspective: 1200px;
  66. }
  67. .swiper-wrapper,
  68. .swiper-slide,
  69. .swiper-slide-shadow,
  70. .swiper-slide-shadow-left,
  71. .swiper-slide-shadow-right,
  72. .swiper-slide-shadow-top,
  73. .swiper-slide-shadow-bottom,
  74. .swiper-cube-shadow {
  75. transform-style: preserve-3d;
  76. }
  77. .swiper-slide-shadow,
  78. .swiper-slide-shadow-left,
  79. .swiper-slide-shadow-right,
  80. .swiper-slide-shadow-top,
  81. .swiper-slide-shadow-bottom {
  82. position: absolute;
  83. left: 0;
  84. top: 0;
  85. width: 100%;
  86. height: 100%;
  87. pointer-events: none;
  88. z-index: 10;
  89. }
  90. .swiper-slide-shadow {
  91. background: rgba(0, 0, 0, 0.15);
  92. }
  93. .swiper-slide-shadow-left {
  94. background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  95. }
  96. .swiper-slide-shadow-right {
  97. background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  98. }
  99. .swiper-slide-shadow-top {
  100. background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  101. }
  102. .swiper-slide-shadow-bottom {
  103. background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
  104. }
  105. }
  106. /* CSS Mode */
  107. .swiper-css-mode {
  108. > .swiper-wrapper {
  109. overflow: auto;
  110. scrollbar-width: none; /* For Firefox */
  111. -ms-overflow-style: none; /* For Internet Explorer and Edge */
  112. &::-webkit-scrollbar {
  113. display: none;
  114. }
  115. }
  116. > .swiper-wrapper > .swiper-slide {
  117. scroll-snap-align: start start;
  118. }
  119. }
  120. .swiper-horizontal.swiper-css-mode {
  121. > .swiper-wrapper {
  122. scroll-snap-type: x mandatory;
  123. }
  124. }
  125. .swiper-vertical.swiper-css-mode {
  126. > .swiper-wrapper {
  127. scroll-snap-type: y mandatory;
  128. }
  129. }
  130. .swiper-centered {
  131. > .swiper-wrapper::before {
  132. content: '';
  133. flex-shrink: 0;
  134. order: 9999;
  135. }
  136. &.swiper-horizontal {
  137. > .swiper-wrapper > .swiper-slide:first-child {
  138. margin-inline-start: var(--swiper-centered-offset-before);
  139. }
  140. > .swiper-wrapper::before {
  141. height: 100%;
  142. width: var(--swiper-centered-offset-after);
  143. }
  144. }
  145. &.swiper-vertical {
  146. > .swiper-wrapper > .swiper-slide:first-child {
  147. margin-block-start: var(--swiper-centered-offset-before);
  148. }
  149. > .swiper-wrapper::before {
  150. width: 100%;
  151. height: var(--swiper-centered-offset-after);
  152. }
  153. }
  154. > .swiper-wrapper > .swiper-slide {
  155. scroll-snap-align: center center;
  156. }
  157. }
  158. @import "../modules/effect-fade/effect-fade.scss";
  159. @import "../modules/effect-cube/effect-cube.scss";
  160. @import "../modules/effect-coverflow/effect-coverflow.scss";
  161. @import "../modules/effect-flip/effect-flip.scss";
  162. @import "../modules/effect-cards/effect-cards.scss";
  163. @import "../modules/effect-creative/effect-creative.scss";
  164. @import "../modules/effect-panorama/effect-panorama.scss";
  165. @import "../modules/effect-carousel/effect-carousel.scss";
  166. @import "../modules/navigation/navigation.scss";
  167. @import "../modules/pagination/pagination.scss";
  168. @import "../modules/thumbs/thumbs.scss";
  169. @import "../modules/scrollbar/scrollbar.scss";