sugarcss 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (275) hide show
  1. checksums.yaml +7 -0
  2. data/lib/sugarcss.rb +30 -0
  3. data/stylesheets/_sugar.scss +4 -0
  4. data/stylesheets/sugar/_BEM.scss +101 -0
  5. data/stylesheets/sugar/_animations.scss +101 -0
  6. data/stylesheets/sugar/_clearfix.scss +56 -0
  7. data/stylesheets/sugar/_colors.scss +126 -0
  8. data/stylesheets/sugar/_effects.scss +65 -0
  9. data/stylesheets/sugar/_filters.scss +67 -0
  10. data/stylesheets/sugar/_forms.scss +13 -0
  11. data/stylesheets/sugar/_functions.scss +328 -0
  12. data/stylesheets/sugar/_helper-classes.scss +109 -0
  13. data/stylesheets/sugar/_helper-functions.scss +56 -0
  14. data/stylesheets/sugar/_helper-mixins.scss +383 -0
  15. data/stylesheets/sugar/_icons.scss +21 -0
  16. data/stylesheets/sugar/_images.scss +150 -0
  17. data/stylesheets/sugar/_lists.scss +148 -0
  18. data/stylesheets/sugar/_medias.scss +141 -0
  19. data/stylesheets/sugar/_reset.scss +38 -0
  20. data/stylesheets/sugar/_shapes.scss +528 -0
  21. data/stylesheets/sugar/_sugar.scss +606 -0
  22. data/stylesheets/sugar/_typo.scss +849 -0
  23. data/stylesheets/sugar/_units.scss +120 -0
  24. data/stylesheets/sugar/tools/_arrow.scss +70 -0
  25. data/stylesheets/sugar/tools/_blank.scss +0 -0
  26. data/stylesheets/sugar/tools/_list.scss +103 -0
  27. data/stylesheets/sugar/tools/_map.scss +93 -0
  28. data/stylesheets/sugar/tools/_math.scss +196 -0
  29. data/stylesheets/sugar/tools/_string.scss +65 -0
  30. data/stylesheets/sugar/vendors/animatecss/_animate.scss +1474 -0
  31. data/stylesheets/sugar/vendors/animatecss/_base.scss +31 -0
  32. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_bounce.scss +26 -0
  33. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_flash.scss +14 -0
  34. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_jello.scss +34 -0
  35. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_pulse.scss +20 -0
  36. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_rubberBand.scss +34 -0
  37. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_shake.scss +18 -0
  38. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_swing.scss +27 -0
  39. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_tada.scss +26 -0
  40. data/stylesheets/sugar/vendors/animatecss/attention_seekers/_wobble.scss +36 -0
  41. data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceIn.scss +37 -0
  42. data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInDown.scss +32 -0
  43. data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInLeft.scss +32 -0
  44. data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInRight.scss +32 -0
  45. data/stylesheets/sugar/vendors/animatecss/bouncing_entrances/_bounceInUp.scss +32 -0
  46. data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOut.scss +20 -0
  47. data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutDown.scss +20 -0
  48. data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutLeft.scss +16 -0
  49. data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutRight.scss +16 -0
  50. data/stylesheets/sugar/vendors/animatecss/bouncing_exits/_bounceOutUp.scss +20 -0
  51. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeIn.scss +9 -0
  52. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInDown.scss +16 -0
  53. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInDownBig.scss +16 -0
  54. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInLeft.scss +16 -0
  55. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInLeftBig.scss +16 -0
  56. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInRight.scss +16 -0
  57. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInRightBig.scss +16 -0
  58. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInUp.scss +16 -0
  59. data/stylesheets/sugar/vendors/animatecss/fading_entrances/_fadeInUpBig.scss +16 -0
  60. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOut.scss +9 -0
  61. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutDown.scss +15 -0
  62. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutDownBig.scss +15 -0
  63. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutLeft.scss +15 -0
  64. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutLeftBig.scss +15 -0
  65. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutRight.scss +15 -0
  66. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutRightBig.scss +15 -0
  67. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutUp.scss +15 -0
  68. data/stylesheets/sugar/vendors/animatecss/fading_exits/_fadeOutUpBig.scss +15 -0
  69. data/stylesheets/sugar/vendors/animatecss/flippers/_flip.scss +32 -0
  70. data/stylesheets/sugar/vendors/animatecss/flippers/_flipInX.scss +31 -0
  71. data/stylesheets/sugar/vendors/animatecss/flippers/_flipInY.scss +31 -0
  72. data/stylesheets/sugar/vendors/animatecss/flippers/_flipOutX.scss +21 -0
  73. data/stylesheets/sugar/vendors/animatecss/flippers/_flipOutY.scss +21 -0
  74. data/stylesheets/sugar/vendors/animatecss/lightspeed/_lightSpeedIn.scss +27 -0
  75. data/stylesheets/sugar/vendors/animatecss/lightspeed/_lightSpeedOut.scss +16 -0
  76. data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateIn.scss +18 -0
  77. data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInDownLeft.scss +18 -0
  78. data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInDownRight.scss +18 -0
  79. data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInUpLeft.scss +18 -0
  80. data/stylesheets/sugar/vendors/animatecss/rotating_entrances/_rotateInUpRight.scss +18 -0
  81. data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOut.scss +17 -0
  82. data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutDownLeft.scss +17 -0
  83. data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutDownRight.scss +17 -0
  84. data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutUpLeft.scss +17 -0
  85. data/stylesheets/sugar/vendors/animatecss/rotating_exits/_rotateOutUpRight.scss +17 -0
  86. data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInDown.scss +15 -0
  87. data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInLeft.scss +15 -0
  88. data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInRight.scss +15 -0
  89. data/stylesheets/sugar/vendors/animatecss/sliding_entrances/_slideInUp.scss +15 -0
  90. data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutDown.scss +15 -0
  91. data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutLeft.scss +15 -0
  92. data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutRight.scss +15 -0
  93. data/stylesheets/sugar/vendors/animatecss/sliding_exits/_slideOutUp.scss +15 -0
  94. data/stylesheets/sugar/vendors/animatecss/specials/_hinge.scss +29 -0
  95. data/stylesheets/sugar/vendors/animatecss/specials/_rollIn.scss +18 -0
  96. data/stylesheets/sugar/vendors/animatecss/specials/_rollOut.scss +17 -0
  97. data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomIn.scss +15 -0
  98. data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInDown.scss +18 -0
  99. data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInLeft.scss +18 -0
  100. data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInRight.scss +18 -0
  101. data/stylesheets/sugar/vendors/animatecss/zooming_entrances/_zoomInUp.scss +18 -0
  102. data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOut.scss +19 -0
  103. data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutDown.scss +19 -0
  104. data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutLeft.scss +17 -0
  105. data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutRight.scss +17 -0
  106. data/stylesheets/sugar/vendors/animatecss/zooming_exits/_zoomOutUp.scss +19 -0
  107. data/stylesheets/sugar/vendors/cssgram/_1977.scss +16 -0
  108. data/stylesheets/sugar/vendors/cssgram/_aden.scss +18 -0
  109. data/stylesheets/sugar/vendors/cssgram/_brooklyn.scss +17 -0
  110. data/stylesheets/sugar/vendors/cssgram/_cssgram.scss +18 -0
  111. data/stylesheets/sugar/vendors/cssgram/_earlybird.scss +17 -0
  112. data/stylesheets/sugar/vendors/cssgram/_gingham.scss +17 -0
  113. data/stylesheets/sugar/vendors/cssgram/_hudson.scss +18 -0
  114. data/stylesheets/sugar/vendors/cssgram/_inkwell.scss +11 -0
  115. data/stylesheets/sugar/vendors/cssgram/_lark.scss +21 -0
  116. data/stylesheets/sugar/vendors/cssgram/_lofi.scss +16 -0
  117. data/stylesheets/sugar/vendors/cssgram/_mayfair.scss +18 -0
  118. data/stylesheets/sugar/vendors/cssgram/_moon.scss +21 -0
  119. data/stylesheets/sugar/vendors/cssgram/_nashville.scss +22 -0
  120. data/stylesheets/sugar/vendors/cssgram/_perpetua.scss +17 -0
  121. data/stylesheets/sugar/vendors/cssgram/_reyes.scss +18 -0
  122. data/stylesheets/sugar/vendors/cssgram/_shared.scss +29 -0
  123. data/stylesheets/sugar/vendors/cssgram/_toaster.scss +17 -0
  124. data/stylesheets/sugar/vendors/cssgram/_walden.scss +18 -0
  125. data/stylesheets/sugar/vendors/cssgram/_xpro2.scss +17 -0
  126. data/stylesheets/sugar/vendors/fontawesome/_font-awesome.scss +2019 -0
  127. data/stylesheets/sugar/vendors/modularscale/_modular-scale-tests.scss +74 -0
  128. data/stylesheets/sugar/vendors/modularscale/_modular-scale.scss +18 -0
  129. data/stylesheets/sugar/vendors/modularscale/modular-scale/_calc.scss +17 -0
  130. data/stylesheets/sugar/vendors/modularscale/modular-scale/_function-list.scss +68 -0
  131. data/stylesheets/sugar/vendors/modularscale/modular-scale/_function.scss +55 -0
  132. data/stylesheets/sugar/vendors/modularscale/modular-scale/_generate-list.scss +103 -0
  133. data/stylesheets/sugar/vendors/modularscale/modular-scale/_pow.scss +40 -0
  134. data/stylesheets/sugar/vendors/modularscale/modular-scale/_ratios.scss +20 -0
  135. data/stylesheets/sugar/vendors/modularscale/modular-scale/_respond.scss +49 -0
  136. data/stylesheets/sugar/vendors/modularscale/modular-scale/_round-px.scss +6 -0
  137. data/stylesheets/sugar/vendors/modularscale/modular-scale/_sort-list.scss +93 -0
  138. data/stylesheets/sugar/vendors/modularscale/modular-scale/_tests.scss +22 -0
  139. data/stylesheets/sugar/vendors/sassdash/_sassdash.scss +6 -0
  140. data/stylesheets/sugar/vendors/sassdash/api/_add.scss +43 -0
  141. data/stylesheets/sugar/vendors/sassdash/api/_after.scss +66 -0
  142. data/stylesheets/sugar/vendors/sassdash/api/_ary.scss +43 -0
  143. data/stylesheets/sugar/vendors/sassdash/api/_assign.scss +113 -0
  144. data/stylesheets/sugar/vendors/sassdash/api/_at.scss +50 -0
  145. data/stylesheets/sugar/vendors/sassdash/api/_before.scss +64 -0
  146. data/stylesheets/sugar/vendors/sassdash/api/_bind.scss +46 -0
  147. data/stylesheets/sugar/vendors/sassdash/api/_call.scss +0 -0
  148. data/stylesheets/sugar/vendors/sassdash/api/_callback.scss +167 -0
  149. data/stylesheets/sugar/vendors/sassdash/api/_case.scss +179 -0
  150. data/stylesheets/sugar/vendors/sassdash/api/_chunk.scss +44 -0
  151. data/stylesheets/sugar/vendors/sassdash/api/_compact.scss +32 -0
  152. data/stylesheets/sugar/vendors/sassdash/api/_compare.scss +180 -0
  153. data/stylesheets/sugar/vendors/sassdash/api/_concat.scss +62 -0
  154. data/stylesheets/sugar/vendors/sassdash/api/_constant.scss +32 -0
  155. data/stylesheets/sugar/vendors/sassdash/api/_context.scss +51 -0
  156. data/stylesheets/sugar/vendors/sassdash/api/_count-by.scss +51 -0
  157. data/stylesheets/sugar/vendors/sassdash/api/_create.scss +78 -0
  158. data/stylesheets/sugar/vendors/sassdash/api/_debug.scss +26 -0
  159. data/stylesheets/sugar/vendors/sassdash/api/_declare.scss +46 -0
  160. data/stylesheets/sugar/vendors/sassdash/api/_defaults.scss +41 -0
  161. data/stylesheets/sugar/vendors/sassdash/api/_difference.scss +50 -0
  162. data/stylesheets/sugar/vendors/sassdash/api/_drop.scss +226 -0
  163. data/stylesheets/sugar/vendors/sassdash/api/_either.scss +42 -0
  164. data/stylesheets/sugar/vendors/sassdash/api/_encode.scss +42 -0
  165. data/stylesheets/sugar/vendors/sassdash/api/_ends-with.scss +76 -0
  166. data/stylesheets/sugar/vendors/sassdash/api/_escape.scss +39 -0
  167. data/stylesheets/sugar/vendors/sassdash/api/_every.scss +106 -0
  168. data/stylesheets/sugar/vendors/sassdash/api/_exec.scss +31 -0
  169. data/stylesheets/sugar/vendors/sassdash/api/_extrema.scss +224 -0
  170. data/stylesheets/sugar/vendors/sassdash/api/_fill.scss +74 -0
  171. data/stylesheets/sugar/vendors/sassdash/api/_filter.scss +112 -0
  172. data/stylesheets/sugar/vendors/sassdash/api/_find.scss +448 -0
  173. data/stylesheets/sugar/vendors/sassdash/api/_first.scss +29 -0
  174. data/stylesheets/sugar/vendors/sassdash/api/_flatten.scss +88 -0
  175. data/stylesheets/sugar/vendors/sassdash/api/_flow.scss +145 -0
  176. data/stylesheets/sugar/vendors/sassdash/api/_for.scss +325 -0
  177. data/stylesheets/sugar/vendors/sassdash/api/_functions.scss +42 -0
  178. data/stylesheets/sugar/vendors/sassdash/api/_group-by.scss +90 -0
  179. data/stylesheets/sugar/vendors/sassdash/api/_has.scss +30 -0
  180. data/stylesheets/sugar/vendors/sassdash/api/_identity.scss +20 -0
  181. data/stylesheets/sugar/vendors/sassdash/api/_includes.scss +76 -0
  182. data/stylesheets/sugar/vendors/sassdash/api/_index-by.scss +43 -0
  183. data/stylesheets/sugar/vendors/sassdash/api/_index-of.scss +154 -0
  184. data/stylesheets/sugar/vendors/sassdash/api/_initial.scss +19 -0
  185. data/stylesheets/sugar/vendors/sassdash/api/_intersection.scss +59 -0
  186. data/stylesheets/sugar/vendors/sassdash/api/_invert.scss +48 -0
  187. data/stylesheets/sugar/vendors/sassdash/api/_invoke.scss +74 -0
  188. data/stylesheets/sugar/vendors/sassdash/api/_is-empty.scss +48 -0
  189. data/stylesheets/sugar/vendors/sassdash/api/_is-equal.scss +175 -0
  190. data/stylesheets/sugar/vendors/sassdash/api/_is-match.scss +116 -0
  191. data/stylesheets/sugar/vendors/sassdash/api/_is-type.scss +479 -0
  192. data/stylesheets/sugar/vendors/sassdash/api/_join.scss +47 -0
  193. data/stylesheets/sugar/vendors/sassdash/api/_keys.scss +48 -0
  194. data/stylesheets/sugar/vendors/sassdash/api/_last.scss +21 -0
  195. data/stylesheets/sugar/vendors/sassdash/api/_map.scss +265 -0
  196. data/stylesheets/sugar/vendors/sassdash/api/_matches.scss +85 -0
  197. data/stylesheets/sugar/vendors/sassdash/api/_memoize.scss +105 -0
  198. data/stylesheets/sugar/vendors/sassdash/api/_merge.scss +148 -0
  199. data/stylesheets/sugar/vendors/sassdash/api/_modify.scss +17 -0
  200. data/stylesheets/sugar/vendors/sassdash/api/_module.scss +111 -0
  201. data/stylesheets/sugar/vendors/sassdash/api/_negate.scss +42 -0
  202. data/stylesheets/sugar/vendors/sassdash/api/_noop.scss +19 -0
  203. data/stylesheets/sugar/vendors/sassdash/api/_omit.scss +52 -0
  204. data/stylesheets/sugar/vendors/sassdash/api/_once.scss +27 -0
  205. data/stylesheets/sugar/vendors/sassdash/api/_pad.scss +121 -0
  206. data/stylesheets/sugar/vendors/sassdash/api/_pairs.scss +26 -0
  207. data/stylesheets/sugar/vendors/sassdash/api/_parse-int.scss +69 -0
  208. data/stylesheets/sugar/vendors/sassdash/api/_partial.scss +91 -0
  209. data/stylesheets/sugar/vendors/sassdash/api/_partition.scss +53 -0
  210. data/stylesheets/sugar/vendors/sassdash/api/_pick.scss +80 -0
  211. data/stylesheets/sugar/vendors/sassdash/api/_pluck.scss +27 -0
  212. data/stylesheets/sugar/vendors/sassdash/api/_property.scss +91 -0
  213. data/stylesheets/sugar/vendors/sassdash/api/_pull.scss +43 -0
  214. data/stylesheets/sugar/vendors/sassdash/api/_push.scss +27 -0
  215. data/stylesheets/sugar/vendors/sassdash/api/_rand.scss +79 -0
  216. data/stylesheets/sugar/vendors/sassdash/api/_range.scss +59 -0
  217. data/stylesheets/sugar/vendors/sassdash/api/_reduce.scss +146 -0
  218. data/stylesheets/sugar/vendors/sassdash/api/_reject.scss +68 -0
  219. data/stylesheets/sugar/vendors/sassdash/api/_repeat.scss +33 -0
  220. data/stylesheets/sugar/vendors/sassdash/api/_replace.scss +40 -0
  221. data/stylesheets/sugar/vendors/sassdash/api/_rest.scss +26 -0
  222. data/stylesheets/sugar/vendors/sassdash/api/_result.scss +48 -0
  223. data/stylesheets/sugar/vendors/sassdash/api/_reverse.scss +64 -0
  224. data/stylesheets/sugar/vendors/sassdash/api/_rules.scss +55 -0
  225. data/stylesheets/sugar/vendors/sassdash/api/_sample.scss +33 -0
  226. data/stylesheets/sugar/vendors/sassdash/api/_shuffle.scss +37 -0
  227. data/stylesheets/sugar/vendors/sassdash/api/_size.scss +37 -0
  228. data/stylesheets/sugar/vendors/sassdash/api/_slice.scss +60 -0
  229. data/stylesheets/sugar/vendors/sassdash/api/_some.scss +110 -0
  230. data/stylesheets/sugar/vendors/sassdash/api/_sort.scss +335 -0
  231. data/stylesheets/sugar/vendors/sassdash/api/_sorted-index.scss +135 -0
  232. data/stylesheets/sugar/vendors/sassdash/api/_splice.scss +45 -0
  233. data/stylesheets/sugar/vendors/sassdash/api/_split.scss +43 -0
  234. data/stylesheets/sugar/vendors/sassdash/api/_starts-with.scss +78 -0
  235. data/stylesheets/sugar/vendors/sassdash/api/_sum.scss +44 -0
  236. data/stylesheets/sugar/vendors/sassdash/api/_take.scss +211 -0
  237. data/stylesheets/sugar/vendors/sassdash/api/_times.scss +33 -0
  238. data/stylesheets/sugar/vendors/sassdash/api/_to-list.scss +52 -0
  239. data/stylesheets/sugar/vendors/sassdash/api/_to-string.scss +35 -0
  240. data/stylesheets/sugar/vendors/sassdash/api/_trim.scss +138 -0
  241. data/stylesheets/sugar/vendors/sassdash/api/_trunc.scss +92 -0
  242. data/stylesheets/sugar/vendors/sassdash/api/_unescape.scss +48 -0
  243. data/stylesheets/sugar/vendors/sassdash/api/_union.scss +19 -0
  244. data/stylesheets/sugar/vendors/sassdash/api/_uniq.scss +86 -0
  245. data/stylesheets/sugar/vendors/sassdash/api/_unique-id.scss +27 -0
  246. data/stylesheets/sugar/vendors/sassdash/api/_unzip.scss +77 -0
  247. data/stylesheets/sugar/vendors/sassdash/api/_values.scss +54 -0
  248. data/stylesheets/sugar/vendors/sassdash/api/_where.scss +28 -0
  249. data/stylesheets/sugar/vendors/sassdash/api/_without.scss +26 -0
  250. data/stylesheets/sugar/vendors/sassdash/api/_words.scss +50 -0
  251. data/stylesheets/sugar/vendors/sassdash/api/_xor.scss +35 -0
  252. data/stylesheets/sugar/vendors/sassdash/api/_zip.scss +80 -0
  253. data/stylesheets/sugar/vendors/sassdash/constants/_char.scss +97 -0
  254. data/stylesheets/sugar/vendors/sassdash/constants/_constructor.scss +1 -0
  255. data/stylesheets/sugar/vendors/sassdash/constants/_escapes.scss +26 -0
  256. data/stylesheets/sugar/vendors/sassdash/constants/_flags.scss +9 -0
  257. data/stylesheets/sugar/vendors/sassdash/constants/_global.scss +11 -0
  258. data/stylesheets/sugar/vendors/sassdash/constants/_module.scss +9 -0
  259. data/stylesheets/sugar/vendors/sassdash/constants/_native.scss +80 -0
  260. data/stylesheets/sugar/vendors/sassdash/constants/_number.scss +26 -0
  261. data/stylesheets/sugar/vendors/sassdash/constants/_trunc.scss +2 -0
  262. data/stylesheets/sugar/vendors/sassdash/constants/_units.scss +10 -0
  263. data/stylesheets/sugar/vendors/sassdash/helpers/_aggregator.scss +47 -0
  264. data/stylesheets/sugar/vendors/sassdash/helpers/_call.scss +77 -0
  265. data/stylesheets/sugar/vendors/sassdash/helpers/_chain.scss +37 -0
  266. data/stylesheets/sugar/vendors/sassdash/helpers/_char.scss +115 -0
  267. data/stylesheets/sugar/vendors/sassdash/helpers/_coercion.scss +90 -0
  268. data/stylesheets/sugar/vendors/sassdash/helpers/_compounder.scss +25 -0
  269. data/stylesheets/sugar/vendors/sassdash/helpers/_module.scss +8 -0
  270. data/stylesheets/sugar/vendors/sassdash/helpers/_number.scss +165 -0
  271. data/stylesheets/sugar/vendors/sassdash/helpers/_scope.scss +43 -0
  272. data/stylesheets/sugar/vendors/sassdash/static/_local.scss +268 -0
  273. data/stylesheets/sugar/vendors/sassdash/static/_module.scss +2 -0
  274. data/stylesheets/sugar/vendors/sassdash/static/_static.scss +84 -0
  275. metadata +334 -0
@@ -0,0 +1,849 @@
1
+ //
2
+ // Helpers with typography
3
+ //
4
+
5
+ //
6
+ // Font mixin
7
+ //
8
+ $_s-font-properties : (
9
+ font-weight : normal bold bolder lighter number initial inherit,
10
+ font-style : normal italic oblique initial inherit,
11
+ font-variant : normal small-caps initial inherit,
12
+ font-stretch : ultra-condensed extra-condensed condensed semi-condensed normal semi-expanded expanded extra-expanded ultra-expanded initial inherit,
13
+ text-decoration : none underline overline line-through initial inherit,
14
+ text-transform : none capitalize uppercase lowercase initial inherit,
15
+ text-align : left right center justify initial inherit,
16
+ word-wrap : normal break-word initial inherit,
17
+ word-break : normal break-all keep-all initial inherit,
18
+ white-space : normal nowrap pre pre-line pre-wrap initial inherit,
19
+ color : color,
20
+ font-family : string,
21
+ font-size : number,
22
+ line-height : number,
23
+ letter-spacing : number,
24
+ text-indent : number
25
+ );
26
+ $_s-font-aliases : (
27
+ font-family : ff,
28
+ color : c,
29
+ font-size : fs,
30
+ font-style : fstl,
31
+ font-variant : fv,
32
+ font-weight : fw,
33
+ text-decoration : td,
34
+ text-align : ta,
35
+ text-transform : tt,
36
+ font-stretch : fstr,
37
+ white-space : ws,
38
+ line-height : lh,
39
+ letter-spacing : ls,
40
+ text-indent : ti,
41
+ word-break : wb,
42
+ word-wrap : ww
43
+ );
44
+
45
+ @mixin s-vertical-rhythme(
46
+ $rhythme
47
+ ) {
48
+ $rhythme : _sugar-parse-properties($rhythme, (
49
+ font-size : number,
50
+ font-family : string,
51
+ line-height : number,
52
+ margin-top : number,
53
+ margin-bottom : number,
54
+ padding-top : number,
55
+ padding-bottom : number,
56
+ margin : true,
57
+ padding : true,
58
+ border-bottom : true,
59
+ border-top : true,
60
+ border-bottom-width : number,
61
+ border-top-width : number,
62
+ border : true,
63
+ s-font : true
64
+ ), (
65
+ font-size: fs,
66
+ font-family: ff,
67
+ line-height: lh,
68
+ margin-top: mt,
69
+ margin-bottom: mb,
70
+ padding-top : pt,
71
+ padding-bottom : pb,
72
+ margin : m,
73
+ padding : p,
74
+ border-bottom : bb,
75
+ border-top : bt,
76
+ border-bottom-width : bbw,
77
+ border-top-width : btw,
78
+ border : b,
79
+ s-font : sf
80
+ ));
81
+
82
+ // get values
83
+ $font-size : map-get($rhythme, font-size);
84
+ $font-family : map-get($rhythme, font-family);
85
+ $line-height : map-get($rhythme, line-height);
86
+ $s-font : map-get($rhythme, s-font);
87
+ $margin-bottom : map-get($rhythme, margin-bottom);
88
+ $margin-top : map-get($rhythme, margin-top);
89
+ $padding-bottom : map-get($rhythme, padding-bottom);
90
+ $padding-top : map-get($rhythme, padding-top);
91
+ $border-bottom-width : map-get($rhythme, border-bottom-width);
92
+ $border-top-width : map-get($rhythme, border-top-width);
93
+ $border-top : map-get($rhythme, border-top);
94
+ $border-bottom : map-get($rhythme, border-bottom);
95
+ $margin : map-get($rhythme, margin);
96
+ $padding : map-get($rhythme, padding);
97
+ $border : map-get($rhythme, border);
98
+
99
+ // get values from s-font if passed
100
+ @if $s-font {
101
+ $font : s-font($s-font);
102
+ $font-family : map-get-or($font, font-family, $font-family);
103
+ $font-size : map-get-or($font, font-size, $font-size);
104
+ $line-height : map-get-or($font, line-height, $line-height);
105
+ }
106
+
107
+ // calculate number of line height needed
108
+ @if not $line-height {
109
+ $line-height : s-strip-units(ceil(s-rem(s-px($font-size))));
110
+ }
111
+
112
+ // protect
113
+ @if not $font-size {
114
+ @error('s-vertical-rhythme need a font-size');
115
+ }
116
+ @if not $line-height {
117
+ @error('s-vertical-rhythme need a line-height');
118
+ }
119
+
120
+ // get the font object
121
+ $default-font-family : sugar('settings.typo.font-family');
122
+ $fonts : sugar('settings.fonts');
123
+ $f : map-get($fonts, $default-font-family);
124
+ $cap-height : map-get-or($f, cap-height, 0);
125
+
126
+ // if a font family is passed
127
+ @if $font-family {
128
+ @if map-get($fonts, $font-family) {
129
+ $f : map-get($fonts, $font-family);
130
+ $cap-height : map-get-or($f, cap-height, 0);
131
+ $font-family : map-get-or($f, font-family, $font-family);
132
+ }
133
+ }
134
+
135
+ // check some values
136
+ @if $border-bottom {
137
+ $map : s-border($border-bottom);
138
+ $border-bottom-width : map-get-or($map, width, $border-bottom-width);
139
+ }
140
+ @if $border-top {
141
+ $map : s-border($border-top);
142
+ $border-top-width : map-get-or($map, width, $border-top-width);
143
+ }
144
+ @if $margin {
145
+ $map : s-margin($margin);
146
+ $margin-top : map-get-or($map, top, $margin-top);
147
+ $margin-bottom : map-get-or($map, bottom, $margin-bottom);
148
+ }
149
+ @if $padding {
150
+ $map : s-margin($padding);
151
+ $padding-top : map-get-or($map, top, $padding-top);
152
+ $padding-bottom : map-get-or($map, bottom, $padding-bottom);
153
+ }
154
+
155
+ // get the rhythme
156
+ $rhythme-map : map-merge($rhythme, s-get-rhythme(
157
+ -font-size $font-size
158
+ -line-height $line-height
159
+ -margin-top $margin-top
160
+ -margin-bottom $margin-bottom
161
+ -padding-top $padding-top
162
+ -padding-bottom $padding-bottom
163
+ -border-top $border-top-width
164
+ -border-bottom $border-bottom-width
165
+ -cap-height $cap-height
166
+ ));
167
+ // remove margin-top cause it's done by top and margin-bottom compensation
168
+ @if map-get($rhythme-map, top) {
169
+ $rhythme-map : map-remove($rhythme-map, margin-top);
170
+ }
171
+
172
+ // set values
173
+ @if $s-font {
174
+ @include s-font($s-font);
175
+ }
176
+ $rhythme-map : map-remove($rhythme-map, s-font);
177
+
178
+ $scope-class : sugar('settings.typo.vertical-rhythme.scope-class');
179
+ @if $scope-class {
180
+ .#{$scope-class} & {
181
+ @each $prop, $value in $rhythme-map {
182
+ #{$prop} : $value;
183
+ }
184
+ }
185
+ } @else {
186
+ @each $prop, $value in $rhythme-map {
187
+ #{$prop} : $value;
188
+ }
189
+ }
190
+ }
191
+
192
+ @function s-margin(
193
+ $margin
194
+ ) {
195
+ @if type-of($margin) == number {
196
+ @return (
197
+ top : s-rem($margin),
198
+ right : s-rem($margin),
199
+ bottom : s-rem($margin),
200
+ left : s-rem($margin)
201
+ );
202
+ } @else if type-of($margin) == list and length($margin) == 2 {
203
+ @return (
204
+ top : s-rem(nth($margin,1)),
205
+ bottom : s-rem(nth($margin,1)),
206
+ left : s-rem(nth($margin,2)),
207
+ right : s-rem(nth($margin,2))
208
+ );
209
+ } @else if type-of($margin) == list and length($margin) == 4 {
210
+ @return (
211
+ top : s-rem(nth($margin,1)),
212
+ right : s-rem(nth($margin,2)),
213
+ bottom : s-rem(nth($margin,3)),
214
+ left : s-rem(nth($margin,4))
215
+ );
216
+ }
217
+ }
218
+
219
+ @function s-border(
220
+ $border
221
+ ) {
222
+ $border : _sugar-parse-properties($border, (
223
+ width : number,
224
+ color : color,
225
+ style : none hidden dotted dashed solid double groove ridge inset outset initial inherit
226
+ ), (
227
+ style : stl
228
+ ));
229
+ @return $border;
230
+ }
231
+
232
+ @mixin s-font(
233
+ $font
234
+ ) {
235
+ // get the map
236
+ $font-map : s-font($font, $_handle-nested : true);
237
+
238
+ // set values
239
+ @each $prop, $value in $font-map {
240
+ @if $prop != cap-height {
241
+ #{$prop} : $value;
242
+ }
243
+ }
244
+
245
+ // handle nested
246
+ @include _sugar-handle-nested(font) {
247
+ @content;
248
+ }
249
+ }
250
+
251
+ //
252
+ // s-font
253
+ //
254
+ @function s-font(
255
+ $font,
256
+ $_handle-nested : false
257
+ ) {
258
+ $font : _sugar-parse-properties($font, $_s-font-properties, $_s-font-aliases);
259
+
260
+ // handle nested
261
+ @if $_handle-nested {
262
+ $font : _sugar-handle-nested(font, $font);
263
+ }
264
+
265
+ // get values
266
+ $font-family : map-get-or($font, font-family, null);
267
+ $color : map-get($font, color);
268
+ $size : map-get($font, font-size);
269
+ $font-style : map-get($font, font-style);
270
+ $font-variant : map-get($font, font-variant);
271
+ $font-weight : map-get($font, font-weight);
272
+ $text-decoration : map-get($font, text-decoration);
273
+ $text-align : map-get($font, text-align);
274
+ $text-transform : map-get($font, text-transform);
275
+ $font-stretch : map-get($font, font-stretch);
276
+ $white-space : map-get($font, white-space);
277
+ $line-height : map-get-or($font, line-height, null);
278
+ $letter-spacing : map-get($font, letter-spacing);
279
+ $text-indent : map-get($font, text-indent);
280
+ $word-break : map-get($font, word-break);
281
+ $word-wrap : map-get($font, word-wrap);
282
+ $vertical-rhythme : map-get-or($font, vertical-rhythme, sugar('settings.typo.vertical-rhythme'));
283
+
284
+ // get the font object
285
+ $default-font-family : sugar('settings.typo.font-family');
286
+ $fonts : sugar('settings.fonts');
287
+ $f : map-get($fonts, $default-font-family);
288
+ $cap-height : map-get-or($f, cap-height, 0);
289
+
290
+ // if a font family is passed
291
+ @if $font-family {
292
+ @if map-get($fonts, $font-family) {
293
+ $f : map-get($fonts, $font-family);
294
+ $cap-height : map-get-or($f, cap-height, 0);
295
+ $font-family : map-get-or($f, font-family, $font-family);
296
+ }
297
+ }
298
+
299
+ // init object to return
300
+ $return : (
301
+ cap-height : $cap-height
302
+ );
303
+
304
+ // set the font
305
+ @if $font-family {
306
+ $return : map-set($return, font-family, $font-family);
307
+ }
308
+
309
+ // color
310
+ @if $color {
311
+ $return : map-set($return, color, $color);
312
+ }
313
+
314
+ // font-size
315
+ @if $size {
316
+ @if unitless($size) or unit($size) == px {
317
+ $size : s-rem($size);
318
+ }
319
+ $return : map-set($return, font-size, $size);
320
+ }
321
+
322
+ @if $line-height {
323
+ $return : map-set($return, line-height, s-rem($line-height));
324
+ }
325
+
326
+ // font-style
327
+ @if $font-style {
328
+ $return : map-set($return, font-style, $font-style);
329
+ }
330
+ // font-variant
331
+ @if $font-variant {
332
+ $return : map-set($return, font-variant, $font-variant);
333
+ }
334
+ // font-weight
335
+ @if $font-weight {
336
+ $return : map-set($return, font-weight, $font-weight);
337
+ }
338
+ // text-decoration
339
+ @if $text-decoration {
340
+ $return : map-set($return, text-decoration, $text-decoration);
341
+ }
342
+ // text-align
343
+ @if $text-align {
344
+ $return : map-set($return, text-align, $text-align);
345
+ }
346
+ // text-transform
347
+ @if $text-transform {
348
+ $return : map-set($return, text-transform, $text-transform);
349
+ }
350
+ // font-stretch
351
+ @if $font-stretch {
352
+ $return : map-set($return, font-stretch, $font-stretch);
353
+ }
354
+ // white-space
355
+ @if $white-space {
356
+ $return : map-set($return, white-space, $white-space);
357
+ }
358
+ // letter spacing
359
+ @if $letter-spacing {
360
+ $return : map-set($return, letter-spacing, $letter-spacing);
361
+ }
362
+ // text-indent
363
+ @if $text-indent {
364
+ $return : map-set($return, text-indent, $text-indent);
365
+ }
366
+ // word break
367
+ @if $word-break {
368
+ $return : map-set($return, word-break, $word-break);
369
+ }
370
+ // word wrap
371
+ @if $word-wrap {
372
+ $return : map-set($return, word-wrap, $word-wrap);
373
+ }
374
+
375
+ // add all the others properties
376
+ $return : map-merge($return, map-get-or($font, others, ()));
377
+
378
+ // return the map
379
+ @return $return;
380
+ }
381
+
382
+ //
383
+ // Font face
384
+ //
385
+ @mixin s-font-face(
386
+ $font-face
387
+ ) {
388
+ $font-face : _sugar-parse-properties($font-face, (
389
+ ext : eot eot2 otf woff2 woff ttf svg svgz,
390
+ font-weight : normal bold bolder lighter number initial inherit,
391
+ font-style : normal italic oblique initial inherit,
392
+ font-family : string,
393
+ src : string
394
+ ), (
395
+ ext : e,
396
+ font-weight : fw,
397
+ font-style : fs,
398
+ font-family : ff,
399
+ src : s
400
+ ));
401
+ $font-family : map-get($font-face, font-family);
402
+ $src : map-get($font-face, src);
403
+ $ext : map-get-or($font-face, ext, ());
404
+ $font-weight : map-get($font-face, font-weight);
405
+ $font-style : map-get($font-face, font-style);
406
+
407
+ // protect
408
+ @if $font-family == null {
409
+ @error("You need to specify a font-family for your s-font-face statement...");
410
+ }
411
+ @if $src == null {
412
+ @error("You need to specify an src for your s-font-face statement...");
413
+ }
414
+
415
+ // get font format from settings
416
+ $font-format : sugar('settings.typo.font-format');
417
+
418
+ // process url
419
+ $split : _split($src, '.');
420
+ $e : last-nth($split);
421
+ $split : list-pop($split);
422
+ $path : list-implode($split, '.');
423
+
424
+ // add extention in list
425
+ @if index($ext, $e) == null {
426
+ $ext : append($ext, $e);
427
+ }
428
+
429
+ // loop on each extensions
430
+ $srcs : ();
431
+ @each $e in $ext {
432
+ // get the format
433
+ $format : map-get($font-format, $e);
434
+ $srcs : append($srcs, url('#{$path}.#{$e}') format('#{$format}'), comma);
435
+ }
436
+
437
+ // declare font
438
+ @font-face {
439
+ font-family: "#{$font-family}";
440
+ src : $srcs;
441
+ @if $font-style {
442
+ font-style : $font-style;
443
+ }
444
+ @if $font-weight {
445
+ font-weight : $font-weight;
446
+ }
447
+ }
448
+ }
449
+
450
+ //
451
+ // Get rhythme max-width
452
+ //
453
+ @function s-rhythme-width(
454
+ $letters-count : sugar('settings.typo.line-letters-count')
455
+ ) {
456
+ @if unitless($letters-count) {
457
+ @return (
458
+ display: block,
459
+ max-width : $letters-count + ex
460
+ );
461
+ } @else {
462
+ @return (
463
+ display: block,
464
+ max-width : $letters-count
465
+ );
466
+ }
467
+ }
468
+
469
+ //
470
+ // Set rhythme max-width
471
+ //
472
+ @mixin s-rhythme-width(
473
+ $letters-count : sugar('settings.typo.line-letters-count')
474
+ ) {
475
+ @each $prop, $value in s-rhythme-width($letters-count) {
476
+ #{$prop} : $value;
477
+ }
478
+ }
479
+
480
+ //
481
+ // Set rhythme
482
+ //
483
+ @mixin s-set-rhythme(
484
+ $rhythme
485
+ ) {
486
+ // scope class
487
+ $scope-class : sugar('settings.typo.vertical-rhythme.scope-class');
488
+
489
+ // get the rhythme values
490
+ $rhythme-values : s-get-rhythme($rhythme);
491
+
492
+ // set rhythme
493
+ @if $scope-class {
494
+ .#{$scope-class} & {
495
+ @each $prop, $value in $rhythme-values {
496
+ #{$prop} : $value;
497
+ }
498
+ }
499
+ } @else {
500
+ @each $prop, $value in $rhythme-values {
501
+ #{$prop} : $value;
502
+ }
503
+ }
504
+
505
+ }
506
+
507
+ //
508
+ // Get rhythme
509
+ //
510
+ @function s-get-rhythme(
511
+ $rhythme
512
+ ) {
513
+ $rhythme : _sugar-parse-properties($rhythme, (
514
+ font-size : number,
515
+ line-height : number,
516
+ margin-top : number,
517
+ margin-bottom : number,
518
+ padding-top : number,
519
+ padding-bottom : number,
520
+ border-bottom : number,
521
+ border-top : number,
522
+ cap-height : number
523
+ ), (
524
+ font-size : fs,
525
+ line-height : lh,
526
+ margin-top: mt,
527
+ margin-bottom: mb,
528
+ padding-top: pt,
529
+ padding-bottom: pb,
530
+ border-bottom : bb,
531
+ border-top : bt,
532
+ cap-height: ch
533
+ ));
534
+
535
+ $font-size : map-get($rhythme, font-size);
536
+ $line-height : map-get-or($rhythme, line-height, 2);
537
+ $margin-top : map-get-or($rhythme, margin-top, 0);
538
+ $margin-bottom : map-get-or($rhythme, margin-bottom, 0);
539
+ $padding-top : map-get-or($rhythme, padding-top, 0);
540
+ $padding-bottom : map-get-or($rhythme, padding-bottom, 0);
541
+ $border-bottom : map-get-or($rhythme, border-bottom, 0);
542
+ $border-top : map-get-or($rhythme, border-top, 0);
543
+ $cap-height : map-get-or($rhythme, cap-height, 0);
544
+ $root-font-size : sugar('settings.typo.font-size');
545
+
546
+ // process values
547
+ @if $margin-top > 0 {
548
+ @if unit($margin-top) != rem {
549
+ // transform margin top in rems
550
+ $margin-top : s-rem($margin-top);
551
+ // round the margin top
552
+ $margin-top : round(s-strip-units($margin-top));
553
+ // set to rem again
554
+ $margin-top : s-rem($margin-top);
555
+ }
556
+ }
557
+ @if $margin-bottom > 0 {
558
+ @if unit($margin-bottom) != rem {
559
+ // transform margin bottom in rems
560
+ $margin-bottom : s-rem($margin-bottom);
561
+ // round the margin bottom
562
+ $margin-bottom : round(s-strip-units($margin-bottom));
563
+ // set to rem again
564
+ $margin-bottom : s-rem($margin-bottom);
565
+ }
566
+ }
567
+ @if $padding-top > 0 {
568
+ @if unit($padding-top) != rem {
569
+ // transform margin top in rems
570
+ $padding-top : s-rem($padding-top);
571
+ // round the margin top
572
+ $padding-top : round(s-strip-units($padding-top));
573
+ // set to rem again
574
+ $padding-top : s-rem($padding-top);
575
+ }
576
+ }
577
+ @if $padding-bottom > 0 {
578
+ @if unit($padding-bottom) != rem {
579
+ // transform margin top in rems
580
+ $padding-bottom : s-rem($padding-bottom);
581
+ // round the margin top
582
+ $padding-bottom : round(s-strip-units($padding-bottom));
583
+ // set to rem again
584
+ $padding-bottom : s-rem($padding-bottom);
585
+ }
586
+ }
587
+ @if $border-bottom > 0 {
588
+ @if unit($border-bottom) != rem {
589
+ // transform margin top in rems
590
+ $border-bottom : s-rem($border-bottom);
591
+ }
592
+ }
593
+ @if $border-top > 0 {
594
+ @if unit($border-top) != rem {
595
+ // transform margin top in rems
596
+ $border-top : s-rem($border-top);
597
+ }
598
+ }
599
+ @if $line-height > 0 {
600
+ @if unit($line-height) != rem {
601
+ // transform margin top in rems
602
+ $line-height : s-rem($line-height);
603
+ // round the margin top
604
+ $line-height : round(s-strip-units($line-height));
605
+ // set to rem again
606
+ $line-height : s-rem($line-height);
607
+ }
608
+ }
609
+
610
+ // transform in rem if are pixels passed
611
+ @if unit($font-size) != px {
612
+ $font-size : s-px($font-size);
613
+ }
614
+
615
+ // manage cap height
616
+ @if $cap-height == null {
617
+ $cap-height : 0;
618
+ }
619
+
620
+ // protect
621
+ @if type-of($font-size) == number {
622
+ $rootsize: $root-font-size;
623
+ $baseline-shift: ($font-size / 2 * (($line-height * $rootsize / $font-size) - $cap-height)) / $rootsize + 0.00001;
624
+ $baseline-push: $margin-bottom - (($font-size / 2 * (($line-height * $rootsize / $font-size) - $cap-height)) / $rootsize + 0.00001);
625
+
626
+ // if we have a padding top, respect it and
627
+ // push a little bit the content lower to respect
628
+ // vertical rhythme
629
+ @if $padding-top and $padding-top >= 1 {
630
+
631
+ // if we have some borders
632
+ @if $border-top > 0 {
633
+ $dec : $border-top % 1;
634
+ $margin-top : $margin-top + ( 1 - $dec );
635
+ }
636
+ @if $border-bottom > 0 {
637
+ $dec : $border-bottom % 1;
638
+ $margin-bottom : $margin-bottom + ( 1 - $dec );
639
+ }
640
+ $ret : (
641
+ padding-top : $padding-top,
642
+ margin-bottom : $margin-bottom,
643
+ padding-bottom : $padding-bottom,
644
+ font-size : s-rem($font-size),
645
+ line-height : s-rem($line-height)
646
+ );
647
+ @if $margin-top > 0 {
648
+ $ret : map-merge($ret, (
649
+ position : relative,
650
+ top : $margin-top,
651
+ margin-bottom : $margin-bottom + $margin-top
652
+ ));
653
+ }
654
+ @return $ret;
655
+ } @else {
656
+ $baseline-shift : $baseline-shift % 1;
657
+ $decimal : $baseline-push % 1;
658
+ $baseline-push : $decimal + $margin-bottom;
659
+ @if $decimal <= 0.33 and $baseline-push < $margin-bottom {
660
+ $baseline-push : $baseline-push + 1;
661
+ } @else if $decimal >= 0.66 and $baseline-push > $margin-bottom {
662
+ $baseline-push : $baseline-push - 1;
663
+ }
664
+ @if $baseline-shift >= 0.66 {
665
+ $margin-top : $margin-top - 1rem;
666
+ }
667
+
668
+ @if $border-top > 0 {
669
+ $dec : $border-top % 1;
670
+ $margin-top : $margin-top + ( 1 - $dec );
671
+ }
672
+ @if $border-bottom > 0 {
673
+ $dec : $border-bottom % 1;
674
+ $baseline-push : $baseline-push + ( 1 - $dec );
675
+ }
676
+
677
+
678
+
679
+ $ret : (
680
+ padding-top : $baseline-shift,
681
+ margin-bottom : $baseline-push,
682
+ padding-bottom : $padding-bottom,
683
+ font-size : s-rem($font-size),
684
+ line-height : s-rem($line-height)
685
+ );
686
+ @if $margin-top > 0 {
687
+ $ret : map-merge($ret, (
688
+ position : relative,
689
+ top : $margin-top,
690
+ margin-bottom : $margin-bottom + $margin-top
691
+ ));
692
+ }
693
+ @return $ret;
694
+ }
695
+ } @else {
696
+ @warn "#{$font-size} is not a valid scale variable";
697
+ }
698
+ @return null;
699
+ }
700
+
701
+ //
702
+ // Show rhythme
703
+ //
704
+ @mixin s-show-rhythme(
705
+ $color : #0ff
706
+ ) {
707
+ // overflow: hidden;
708
+ position: relative;
709
+ &:after {
710
+ pointer-events: none;
711
+ content:'';
712
+ display: block;
713
+ position: absolute;
714
+ top:0; left:0;
715
+ width:100%; height:100%;
716
+ background-image: -webkit-linear-gradient(top,$color 0,rgba(255,255,255,0)1px);
717
+ background-image: -moz-linear-gradient(top,$color 0,rgba(255,255,255,0)1px);
718
+ background-image: -o-linear-gradient(top,$color 0,rgba(255,255,255,0)1px);
719
+ background-image: linear-gradient(to bottom,$color 0,rgba(255,255,255,0)1px);
720
+ background-repeat: repeat-y;
721
+ background-size: 100% 1rem;
722
+ }
723
+ }
724
+
725
+ //
726
+ // Columns
727
+ //
728
+ @mixin s-columns(
729
+ $columns
730
+ ) {
731
+ // get columns props
732
+ $columns : s-columns($columns, $_handle-nested : true);
733
+
734
+ // set props
735
+ @each $prop, $value in $columns {
736
+ #{$prop} : $value;
737
+ }
738
+
739
+ // handle nested
740
+ @include _sugar-handle-nested(columns) {
741
+ @content;
742
+ }
743
+ }
744
+ @function s-columns(
745
+ $columns,
746
+ $_handle-nested : false
747
+ ) {
748
+ $columns : _sugar-parse-properties($columns, (
749
+ fill : balance auto initial inherit,
750
+ rule-style : none hidden dotted dashed solid double groove ridge inset outset initial inherit,
751
+ count : number,
752
+ gap : number,
753
+ width : number,
754
+ span : number,
755
+ rule-color : color,
756
+ rule-width : number,
757
+ rule : true,
758
+ ), (
759
+ fill : f,
760
+ rule-style : rstl,
761
+ count : c,
762
+ gap : g,
763
+ span : s,
764
+ rule-color : rc,
765
+ rule-width : rw,
766
+ rule : r
767
+ ));
768
+
769
+ // handle nested
770
+ @if $_handle-nested {
771
+ $columns : _sugar-handle-nested(columns, $columns);
772
+ }
773
+
774
+ // get values
775
+ $fill : map-get($columns, fill);
776
+ $rule-style : map-get($columns, rule-style);
777
+ $count : map-get-or($columns, count, 2);
778
+ $gap : map-get($columns, gap);
779
+ $width : map-get($columns, width);
780
+ $span : map-get($columns, span);
781
+ $rule-color : map-get($columns, rule-color);
782
+ $rule-width : map-get($columns, rule-width);
783
+ $rule : map-get($columns, rule);
784
+
785
+ $return : ();
786
+
787
+ @if $count {
788
+ $return : map-set($return, column-count, $count);
789
+ }
790
+ @if $width {
791
+ $return : map-set($return, column-width, $width);
792
+ }
793
+ @if $rule {
794
+ $return : map-set($return, column-rule, $rule);
795
+ } @else {
796
+ @if $rule-style {
797
+ $return : map-set($return, column-rule-style, $rule-style);
798
+ }
799
+ @if $rule-color {
800
+ $return : map-set($return, column-rule-color, $rule-color);
801
+ }
802
+ @if $rule-width {
803
+ $return : map-set($return, column-rule-width, $rule-width);
804
+ }
805
+ }
806
+ @if $gap {
807
+ $return : map-set($return, column-gap, $gap);
808
+ }
809
+ @if $fill {
810
+ $return : map-set($return, column-fill, $fill);
811
+ }
812
+ @if $span {
813
+ $return : map-set($return, column-span, $span);
814
+ }
815
+
816
+ // return
817
+ @return $return;
818
+ }
819
+
820
+ //
821
+ // Truncate
822
+ //
823
+ @mixin _s-text-truncate() {
824
+ display: inline-block;
825
+ overflow: hidden;
826
+ text-overflow: ellipsis;
827
+ white-space: nowrap;
828
+ }
829
+ %s-text-truncate {
830
+ @include _s-text-truncate();
831
+ }
832
+ @mixin s-text-truncate() {
833
+ @include _s-text-truncate();
834
+ }
835
+
836
+ //
837
+ // Hide text
838
+ //
839
+ @mixin _s-text-hidden() {
840
+ overflow:hidden;
841
+ text-indent:-9000px;
842
+ display:block;
843
+ }
844
+ %s-text-hidden {
845
+ @include _s-text-hidden();
846
+ }
847
+ @mixin s-text-hidden() {
848
+ @include _s-text-hidden();
849
+ }