carousel.css 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. :root {
  2. --vc-clr-primary: #000;
  3. --vc-clr-secondary: #090f207f;
  4. --vc-clr-white: #ffffff;
  5. }
  6. :root {
  7. --vc-trk-height: auto;
  8. }
  9. .carousel {
  10. position: relative;
  11. text-align: center;
  12. box-sizing: border-box;
  13. touch-action: pan-y;
  14. overscroll-behavior: none;
  15. }
  16. .carousel.is-dragging {
  17. touch-action: none;
  18. }
  19. .carousel * {
  20. box-sizing: border-box;
  21. }
  22. .carousel__track {
  23. display: flex;
  24. padding: 0 !important;
  25. margin: 0 !important;
  26. position: relative;
  27. height: var(--vc-trk-height);
  28. }
  29. .carousel__viewport {
  30. overflow: hidden;
  31. }
  32. .carousel__sr-only {
  33. position: absolute;
  34. width: 1px;
  35. height: 1px;
  36. padding: 0;
  37. margin: -1px;
  38. overflow: hidden;
  39. clip: rect(0, 0, 0, 0);
  40. border: 0;
  41. }
  42. .carousel.is-ttb {
  43. .carousel__track {
  44. flex-direction: column;
  45. }
  46. }
  47. .carousel.is-btt {
  48. .carousel__track {
  49. flex-direction: column-reverse;
  50. }
  51. }
  52. :root {
  53. --vc-icn-width: 1.2em;
  54. }
  55. .carousel__icon {
  56. width: var(--vc-icn-width);
  57. height: var(--vc-icn-width);
  58. fill: currentColor;
  59. }
  60. :root {
  61. --vc-nav-width: 30px;
  62. --vc-nav-height: 30px;
  63. --vc-nav-border-radius: 0;
  64. --vc-nav-color: var(--vc-clr-primary);
  65. --vc-nav-color-hover: var(--vc-clr-secondary);
  66. --vc-nav-background: transparent;
  67. }
  68. .carousel__prev,
  69. .carousel__next {
  70. box-sizing: content-box;
  71. background: var(--vc-nav-background);
  72. border-radius: var(--vc-nav-border-radius);
  73. width: var(--vc-nav-width);
  74. height: var(--vc-nav-height);
  75. text-align: center;
  76. font-size: var(--vc-nav-height);
  77. padding: 0;
  78. color: var(--vc-nav-color);
  79. display: flex;
  80. justify-content: center;
  81. align-items: center;
  82. position: absolute;
  83. border: 0;
  84. cursor: pointer;
  85. margin: 0 10px;
  86. top: 50%;
  87. transform: translateY(-50%);
  88. }
  89. .carousel__next--disabled,
  90. .carousel__prev--disabled {
  91. cursor: not-allowed;
  92. opacity: 0.5;
  93. }
  94. .carousel__prev {
  95. left: 0;
  96. }
  97. .carousel__next {
  98. right: 0;
  99. }
  100. .carousel.is-rtl {
  101. .carousel__prev {
  102. left: auto;
  103. right: 0;
  104. }
  105. .carousel__next {
  106. right: auto;
  107. left: 0;
  108. }
  109. }
  110. .carousel.is-vertical {
  111. .carousel__prev,
  112. .carousel__next {
  113. left: auto;
  114. top: auto;
  115. right: 0;
  116. transform: translateY(0);
  117. }
  118. }
  119. .carousel.is-btt {
  120. .carousel__prev {
  121. bottom: 0;
  122. }
  123. .carousel__next {
  124. top: 0;
  125. }
  126. }
  127. .carousel.is-ttb {
  128. .carousel__prev {
  129. top: 0;
  130. }
  131. .carousel__next {
  132. bottom: 0;
  133. }
  134. }
  135. @media (hover: hover) {
  136. .carousel__prev:hover,
  137. .carousel__next:hover {
  138. color: var(--vc-nav-color-hover);
  139. }
  140. }
  141. :root {
  142. --vc-pgn-width: 12px;
  143. --vc-pgn-height: 4px;
  144. --vc-pgn-margin: 4px;
  145. --vc-pgn-border-radius: 0;
  146. --vc-pgn-background-color: var(--vc-clr-secondary);
  147. --vc-pgn-active-color: var(--vc-clr-primary);
  148. }
  149. .carousel__pagination {
  150. display: flex;
  151. justify-content: center;
  152. list-style: none !important;
  153. line-height: 0;
  154. padding: 0 !important;
  155. margin: 0 !important;
  156. position: absolute;
  157. bottom: 5px;
  158. left: 50%;
  159. transform: translateX(-50%);
  160. }
  161. .carousel__pagination-button {
  162. display: block;
  163. border: 0;
  164. margin: 0;
  165. cursor: pointer;
  166. padding: var(--vc-pgn-margin);
  167. background: transparent;
  168. }
  169. .carousel__pagination-button::after {
  170. display: block;
  171. content: '';
  172. width: var(--vc-pgn-width);
  173. height: var(--vc-pgn-height);
  174. border-radius: var(--vc-pgn-border-radius);
  175. background-color: var(--vc-pgn-background-color);
  176. }
  177. .carousel__pagination-button--active::after {
  178. background-color: var(--vc-pgn-active-color);
  179. }
  180. @media (hover: hover) {
  181. .carousel__pagination-button:hover::after {
  182. background-color: var(--vc-pgn-active-color);
  183. }
  184. }
  185. .carousel__slide {
  186. flex-shrink: 0;
  187. margin: 0;
  188. display: flex;
  189. justify-content: center;
  190. align-items: center;
  191. /* Fix iOS scrolling #22 */
  192. transform: translateZ(0);
  193. }