_clearing.scss 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. // Foundation by ZURB
  2. // foundation.zurb.com
  3. // Licensed under MIT Open Source
  4. @import "global";
  5. //
  6. // @variables
  7. //
  8. $include-html-clearing-classes: $include-html-classes !default;
  9. // We use these to set the background colors for parts of Clearing.
  10. $clearing-bg: $oil !default;
  11. $clearing-caption-bg: $clearing-bg !default;
  12. $clearing-carousel-bg: rgba(51,51,51,0.8) !default;
  13. $clearing-img-bg: $clearing-bg !default;
  14. // We use these to style the close button
  15. $clearing-close-color: $iron !default;
  16. $clearing-close-size: 30px !default;
  17. // We use these to style the arrows
  18. $clearing-arrow-size: 12px !default;
  19. $clearing-arrow-color: $clearing-close-color !default;
  20. // We use these to style captions
  21. $clearing-caption-font-color: $iron !default;
  22. $clearing-caption-font-size: 0.875em !default;
  23. $clearing-caption-padding: 10px 30px 20px !default;
  24. // We use these to make the image and carousel height and style
  25. $clearing-active-img-height: 85% !default;
  26. $clearing-carousel-height: 120px !default;
  27. $clearing-carousel-thumb-width: 120px !default;
  28. $clearing-carousel-thumb-active-border: 1px solid rgb(255,255,255) !default;
  29. @include exports("clearing") {
  30. @if $include-html-clearing-classes {
  31. // We decided to not create a mixin for Clearing because it relies
  32. // on predefined classes and structure to work properly.
  33. // The variables above should give enough control.
  34. /* Clearing Styles */
  35. .clearing-thumbs, #{data('clearing')} {
  36. @include clearfix;
  37. margin-bottom: 0;
  38. margin-#{$default-float}: 0;
  39. list-style: none;
  40. li {
  41. float: $default-float;
  42. margin-#{$opposite-direction}: 10px;
  43. }
  44. &[class*="block-grid-"] li {
  45. margin-#{$opposite-direction}: 0;
  46. }
  47. }
  48. .clearing-blackout {
  49. background: $clearing-bg;
  50. position: fixed;
  51. width: 100%;
  52. height: 100%;
  53. top: 0;
  54. #{$default-float}: 0;
  55. z-index: 998;
  56. .clearing-close { display: block; }
  57. }
  58. .clearing-container {
  59. position: relative;
  60. z-index: 998;
  61. height: 100%;
  62. overflow: hidden;
  63. margin: 0;
  64. }
  65. .clearing-touch-label {
  66. position: absolute;
  67. top: 50%;
  68. left: 50%;
  69. color: $base;
  70. font-size: 0.6em;
  71. }
  72. .visible-img {
  73. height: 95%;
  74. position: relative;
  75. img {
  76. position: absolute;
  77. #{$default-float}: 50%;
  78. top: 50%;
  79. @if $default-float == left {
  80. transform: translateY(-50%) translateX(-50%);
  81. -webkit-transform: translateY(-50%) translateX(-50%);
  82. -ms-transform: translateY(-50%) translateX(-50%);
  83. }
  84. @else {
  85. transform: translateY(-50%) translateX(50%);
  86. -webkit-transform: translateY(-50%) translateX(50%);
  87. -ms-transform: translateY(-50%) translateX(50%);
  88. };
  89. max-height: 100%;
  90. max-width: 100%;
  91. }
  92. }
  93. .clearing-caption {
  94. color: $clearing-caption-font-color;
  95. font-size: $clearing-caption-font-size;
  96. line-height: 1.3;
  97. margin-bottom: 0;
  98. text-align: center;
  99. bottom: 0;
  100. background: $clearing-caption-bg;
  101. width: 100%;
  102. padding: $clearing-caption-padding;
  103. position: absolute;
  104. #{$default-float}: 0;
  105. }
  106. .clearing-close {
  107. z-index: 999;
  108. padding-#{$default-float}: 20px;
  109. padding-top: 10px;
  110. font-size: $clearing-close-size;
  111. line-height: 1;
  112. color: $clearing-close-color;
  113. display: none;
  114. &:hover,
  115. &:focus { color: $iron; }
  116. }
  117. .clearing-assembled .clearing-container { height: 100%;
  118. .carousel > ul { display: none; }
  119. }
  120. // If you want to show a lightbox, but only have a single image come through as the thumbnail
  121. .clearing-feature li {
  122. display: none;
  123. &.clearing-featured-img {
  124. display: block;
  125. }
  126. }
  127. // Large screen overrides
  128. @media #{$medium-up} {
  129. .clearing-main-prev,
  130. .clearing-main-next {
  131. position: absolute;
  132. height: 100%;
  133. width: 40px;
  134. top: 0;
  135. & > span {
  136. position: absolute;
  137. top: 50%;
  138. display: block;
  139. width: 0;
  140. height: 0;
  141. border: solid $clearing-arrow-size;
  142. &:hover { opacity: 0.8; }
  143. }
  144. }
  145. .clearing-main-prev {
  146. #{$default-float}: 0;
  147. & > span {
  148. #{$default-float}: 5px;
  149. border-color: transparent;
  150. border-#{$opposite-direction}-color: $clearing-arrow-color;
  151. }
  152. }
  153. .clearing-main-next {
  154. #{$opposite-direction}: 0;
  155. & > span {
  156. border-color: transparent;
  157. border-#{$default-float}-color: $clearing-arrow-color;
  158. }
  159. }
  160. .clearing-main-prev.disabled,
  161. .clearing-main-next.disabled { opacity: 0.3; }
  162. .clearing-assembled .clearing-container {
  163. .carousel {
  164. background: $clearing-carousel-bg;
  165. height: $clearing-carousel-height;
  166. margin-top: 10px;
  167. text-align: center;
  168. & > ul {
  169. display: inline-block;
  170. z-index: 999;
  171. height: 100%;
  172. position: relative;
  173. float: none;
  174. li {
  175. display: block;
  176. width: $clearing-carousel-thumb-width;
  177. min-height: inherit;
  178. float: $default-float;
  179. overflow: hidden;
  180. margin-#{$opposite-direction}: 0;
  181. padding: 0;
  182. position: relative;
  183. cursor: $cursor-pointer-value;
  184. opacity: 0.4;
  185. clear: none;
  186. &.fix-height {
  187. img {
  188. height: 100%;
  189. max-width: none;
  190. }
  191. }
  192. a.th {
  193. border: none;
  194. box-shadow: none;
  195. display: block;
  196. }
  197. img {
  198. cursor: $cursor-pointer-value !important;
  199. width: 100% !important;
  200. }
  201. &.visible { opacity: 1; }
  202. &:hover { opacity: 0.8; }
  203. }
  204. }
  205. }
  206. .visible-img {
  207. background: $clearing-img-bg;
  208. overflow: hidden;
  209. height: $clearing-active-img-height;
  210. }
  211. }
  212. .clearing-close {
  213. position: absolute;
  214. top: 10px;
  215. #{$opposite-direction}: 20px;
  216. padding-#{$default-float}: 0;
  217. padding-top: 0;
  218. }
  219. }
  220. }
  221. }