You are here

slick.theme.css in Slick Carousel 7.3

. Provided basic styling for the Slick based on custom settings.

File

css/theme/slick.theme.css
View source
  1. /**
  2. * @file.
  3. * Provided basic styling for the Slick based on custom settings.
  4. */
  5. .slick-wrapper,
  6. .slick,
  7. .slick *,
  8. .slick *::after,
  9. .slick *::before {
  10. box-sizing: border-box;
  11. }
  12. .slick img {
  13. height: auto;
  14. }
  15. .slick img,
  16. .slick iframe {
  17. border: 0;
  18. max-width: 100%;
  19. }
  20. /* Prevents overflowing nested slides. */
  21. .slick,
  22. .slick-wrapper {
  23. margin-left: auto;
  24. margin-right: auto;
  25. max-width: 100%;
  26. position: relative;
  27. }
  28. /**
  29. * Misc overrides core slick.
  30. */
  31. .slick-initialized {
  32. overflow: visible;
  33. }
  34. .slick__slider::before,
  35. .slick__slider::after {
  36. display: table;
  37. content: '';
  38. }
  39. .slick__slider::after {
  40. clear: both;
  41. }
  42. /** Draggable. */
  43. .draggable {
  44. cursor: -webkit-grab;
  45. cursor: grab;
  46. }
  47. .draggable:active {
  48. cursor: -webkit-grabbing;
  49. cursor: grabbing;
  50. }
  51. .draggable:active a,
  52. .draggable:active .slide__caption {
  53. cursor: -webkit-grabbing;
  54. cursor: grabbing;
  55. -moz-user-select: none;
  56. -ms-user-select: none;
  57. -o-user-select: none;
  58. -webkit-user-select: none;
  59. user-select: none;
  60. }
  61. /** Visibility fix for stacking slides during initialization. */
  62. .slick__slide {
  63. /* Overrides library height 100% causes excessive issue with aspect ratio. */
  64. height: auto;
  65. max-width: 100%;
  66. position: absolute;
  67. visibility: hidden;
  68. }
  69. /** Prevents collapsing container during initialization. */
  70. .slick__slide.slide--0 {
  71. position: relative;
  72. }
  73. .unslick .slick__slide,
  74. .slick-initialized .slick__slide {
  75. position: relative;
  76. visibility: visible;
  77. }
  78. /* Fix for Chrome blue outline */
  79. .slick__slide:focus {
  80. outline: 0;
  81. }
  82. /* Prevents collapsing slick when unslick like one item. */
  83. .unslick .slick__slide {
  84. width: 100%;
  85. }
  86. .slick-current {
  87. z-index: 4;
  88. }
  89. /**
  90. * Slide layouts, adjust accordingly per actual container slide.
  91. */
  92. .slide__content,
  93. .grid__content {
  94. position: relative;
  95. }
  96. .slide__content::after {
  97. content: "";
  98. display: table;
  99. clear: both;
  100. }
  101. .slide__title {
  102. margin: 10px 0 5px;
  103. line-height: 1.2;
  104. }
  105. .slide__link {
  106. margin: 30px auto;
  107. }
  108. /* Overrides .slick-slider to make caption text selectable. */
  109. .slide__caption {
  110. cursor: text;
  111. -moz-user-select: text;
  112. -ms-user-select: text;
  113. -o-user-select: text;
  114. -webkit-user-select: text;
  115. user-select: text;
  116. width: 100%;
  117. }
  118. /* Only display when JS is ready. */
  119. .slick__arrow,
  120. .is-loading .slide__caption {
  121. visibility: hidden;
  122. }
  123. /** Arrows are outside slick-initialized. */
  124. .slick--initialized .slick__arrow {
  125. visibility: visible;
  126. }
  127. .slick--main .slide__caption {
  128. min-height: 32%;
  129. padding: 20px 0;
  130. z-index: 3;
  131. }
  132. .slick--thumbnail .slide__caption {
  133. padding: 5px 6px;
  134. }
  135. /**
  136. * Skins.
  137. * Arrows contained/wrapped within slick__arrow for easy moves.
  138. */
  139. /* Overrides problematic hidden arrows at core slick.css */
  140. .slick-prev {
  141. left: 0;
  142. }
  143. .slick-next {
  144. right: 0;
  145. }
  146. .slick__arrow {
  147. bottom: auto;
  148. height: 2px;
  149. left: 0;
  150. margin-top: -1px;
  151. pointer-events: none;
  152. position: absolute;
  153. top: 50%;
  154. transform: translateY(-50%);
  155. width: 100%;
  156. z-index: 2;
  157. }
  158. /** Keeps decent fallback for when slick-theme.css is disabled, even if dup. */
  159. .slick-arrow {
  160. border: 0;
  161. border-radius: 50%;
  162. font-size: 0;
  163. height: 42px;
  164. pointer-events: auto;
  165. position: absolute;
  166. top: 50%;
  167. -webkit-transform: translateY(-50%);
  168. transform: translateY(-50%);
  169. width: 42px;
  170. z-index: 98;
  171. }
  172. .slick-arrow:active,
  173. .slick-arrow:focus {
  174. box-shadow: none;
  175. outline: 0;
  176. }
  177. .slick-arrow::before,
  178. .slick-arrow::after {
  179. pointer-events: none;
  180. }
  181. .slick-arrow::before {
  182. color: #ff6d2c;
  183. font-size: 36px;
  184. font-size: 2.25rem;
  185. }
  186. .slick-arrow:hover::before {
  187. color: #37465b;
  188. }
  189. /**
  190. * Bullets.
  191. */
  192. /* Makes the pointer work when bullets placed over the slide. */
  193. /* Overrides core > 1.3.11, otherwise thumbnails are non-clickable */
  194. .slick button,
  195. .slick--thumbnail .slick__slide img {
  196. pointer-events: auto;
  197. }
  198. /* Provides decent dots if core slick-theme.css is disabled. */
  199. .slick-dots li {
  200. margin-bottom: 5px;
  201. display: inline-block;
  202. vertical-align: top;
  203. }
  204. /* Overrides too tiny bullets from core slick.css.*/
  205. .slick-dots li button::before {
  206. font-size: 12px;
  207. font-size: 0.75rem;
  208. }
  209. /**
  210. * Media.
  211. */
  212. /* Hide lazyloaded image when JS is off.*/
  213. img[data-lazy] {
  214. display: none;
  215. }
  216. .slide__media {
  217. overflow: hidden;
  218. position: relative;
  219. }
  220. /* Center the image to reduce gap at RHS with smaller image, larger container */
  221. .media__image {
  222. margin: 0 auto;
  223. }
  224. /** @todo: Remove temp fix for when total <= slidesToShow at 1.6.1+. */
  225. /** @see https://github.com/kenwheeler/slick/issues/262 */
  226. .slick--less .slick-track {
  227. margin-left: auto;
  228. margin-right: auto;
  229. text-align: center;
  230. }
  231. .slick--less .slick-slide {
  232. float: none;
  233. display: inline-block;
  234. vertical-align: top;
  235. }
  236. .slick--less .draggable {
  237. cursor: default;
  238. }