_clearing.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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: .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. list-style: none;
  38. margin-#{$default-float}: 0;
  39. margin-bottom: 0;
  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. height: 100%;
  51. position: fixed;
  52. top: 0;
  53. width: 100%;
  54. z-index: 998;
  55. #{$default-float}: 0;
  56. .clearing-close { display: block; }
  57. }
  58. .clearing-container {
  59. height: 100%;
  60. margin: 0;
  61. overflow: hidden;
  62. position: relative;
  63. z-index: 998;
  64. }
  65. .clearing-touch-label {
  66. color: $base;
  67. font-size: .6em;
  68. left: 50%;
  69. position: absolute;
  70. top: 50%;
  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. -webkit-transform: translateY(-50%) translateX(-50%);
  81. -moz-transform: translateY(-50%) translateX(-50%);
  82. -ms-transform: translateY(-50%) translateX(-50%);
  83. -o-transform: translateY(-50%) translateX(-50%);
  84. transform: translateY(-50%) translateX(-50%);
  85. }
  86. @else {
  87. -webkit-transform: translateY(-50%) translateX(50%);
  88. -moz-transform: translateY(-50%) translateX(50%);
  89. -ms-transform: translateY(-50%) translateX(50%);
  90. -o-transform: translateY(-50%) translateX(50%);
  91. transform: translateY(-50%) translateX(50%);
  92. };
  93. max-height: 100%;
  94. max-width: 100%;
  95. }
  96. }
  97. .clearing-caption {
  98. background: $clearing-caption-bg;
  99. bottom: 0;
  100. color: $clearing-caption-font-color;
  101. font-size: $clearing-caption-font-size;
  102. line-height: 1.3;
  103. margin-bottom: 0;
  104. padding: $clearing-caption-padding;
  105. position: absolute;
  106. text-align: center;
  107. width: 100%;
  108. #{$default-float}: 0;
  109. }
  110. .clearing-close {
  111. color: $clearing-close-color;
  112. display: none;
  113. font-size: $clearing-close-size;
  114. line-height: 1;
  115. padding-#{$default-float}: 20px;
  116. padding-top: 10px;
  117. z-index: 999;
  118. &:hover,
  119. &:focus { color: $iron; }
  120. }
  121. .clearing-assembled .clearing-container { height: 100%;
  122. .carousel > ul { display: none; }
  123. }
  124. // If you want to show a lightbox, but only have a single image come through as the thumbnail
  125. .clearing-feature li {
  126. display: none;
  127. &.clearing-featured-img {
  128. display: block;
  129. }
  130. }
  131. // Large screen overrides
  132. @media #{$medium-up} {
  133. .clearing-main-prev,
  134. .clearing-main-next {
  135. height: 100%;
  136. position: absolute;
  137. top: 0;
  138. width: 40px;
  139. > span {
  140. border: solid $clearing-arrow-size;
  141. display: block;
  142. height: 0;
  143. position: absolute;
  144. top: 50%;
  145. width: 0;
  146. &:hover { opacity: .8; }
  147. }
  148. }
  149. .clearing-main-prev {
  150. #{$default-float}: 0;
  151. > span {
  152. #{$default-float}: 5px;
  153. border-color: transparent;
  154. border-#{$opposite-direction}-color: $clearing-arrow-color;
  155. }
  156. }
  157. .clearing-main-next {
  158. #{$opposite-direction}: 0;
  159. > span {
  160. border-color: transparent;
  161. border-#{$default-float}-color: $clearing-arrow-color;
  162. }
  163. }
  164. .clearing-main-prev.disabled,
  165. .clearing-main-next.disabled { opacity: .3; }
  166. .clearing-assembled .clearing-container {
  167. .carousel {
  168. background: $clearing-carousel-bg;
  169. height: $clearing-carousel-height;
  170. margin-top: 10px;
  171. text-align: center;
  172. > ul {
  173. display: inline-block;
  174. z-index: 999;
  175. height: 100%;
  176. position: relative;
  177. float: none;
  178. li {
  179. clear: none;
  180. cursor: $cursor-pointer-value;
  181. display: block;
  182. float: $default-float;
  183. margin-#{$opposite-direction}: 0;
  184. min-height: inherit;
  185. opacity: .4;
  186. overflow: hidden;
  187. padding: 0;
  188. position: relative;
  189. width: $clearing-carousel-thumb-width;
  190. &.fix-height {
  191. img {
  192. height: 100%;
  193. max-width: none;
  194. }
  195. }
  196. a.th {
  197. border: none;
  198. box-shadow: none;
  199. display: block;
  200. }
  201. img {
  202. cursor: $cursor-pointer-value !important;
  203. width: 100% !important;
  204. }
  205. &.visible { opacity: 1; }
  206. &:hover { opacity: .8; }
  207. }
  208. }
  209. }
  210. .visible-img {
  211. background: $clearing-img-bg;
  212. height: $clearing-active-img-height;
  213. overflow: hidden;
  214. }
  215. }
  216. .clearing-close {
  217. padding-#{$default-float}: 0;
  218. padding-top: 0;
  219. position: absolute;
  220. top: 10px;
  221. #{$opposite-direction}: 20px;
  222. }
  223. }
  224. }
  225. }