You are here

slick.theme.css in Slick Carousel 8

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