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,74 @@
1
+ @if "#{ms(2, 16, $minor-sixth)}" != "40.96" {
2
+ @debug "";
3
+ @warn "function ms(): FAIL!";
4
+ @debug "function ms(2, 16, $minor-sixth)";
5
+ @debug "Result: #{ms(2, 16, $minor-sixth)}";
6
+ @debug "Intended: 40.96";
7
+ @debug "";
8
+ }@else {
9
+ @warn "function ms(+): pass";
10
+ }
11
+
12
+ @if "#{ms(-2, 16, $minor-sixth)}" != "6.25" {
13
+ @debug "";
14
+ @warn "function ms(): FAIL!";
15
+ @debug "function ms(-2, 16, $minor-sixth)";
16
+ @debug "Result: #{ms(-2, 16, $minor-sixth)}";
17
+ @debug "Intended: 6.25";
18
+ @debug "";
19
+ }@else {
20
+ @warn "function ms(-): pass";
21
+ }
22
+
23
+ @if ms(2, 14 18, $major-second) != 15.75 {
24
+ @debug "";
25
+ @warn "function ms() multi-base: FAIL!";
26
+ @debug "function ms(2, 14 18, $major-second)";
27
+ @debug "Result: #{ms(2, 14 18, $major-second)}";
28
+ @debug "Intended: 15.75";
29
+ @debug "";
30
+ }@else {
31
+ @warn "function ms(+) multi-base: pass";
32
+ }
33
+
34
+ @if ms(-1, 14 18, $major-third) != 11.52 {
35
+ @debug "";
36
+ @warn "function ms() multi-base: FAIL!";
37
+ @debug "function ms(-1, 14 18, $major-third)";
38
+ @debug "Result: #{ms(-1, 14 18, $major-third)}";
39
+ @debug "Intended: 11.52";
40
+ @debug "";
41
+ }@else {
42
+ @warn "function ms(-) multi-base: pass";
43
+ }
44
+
45
+ @if "#{ms(-4, 12, $major-tenth $octave)}" != "1.92" {
46
+ @debug "";
47
+ @warn "function ms() multi-ratio: FAIL!";
48
+ @debug "function ms(-4, 12, $major-tenth $octave)";
49
+ @debug "Result: #{ms(-4, 12, $major-tenth $octave)}";
50
+ @debug "Intended: 1.92";
51
+ @debug "";
52
+ }@else {
53
+ @warn "function ms(+) multi-ratio: pass";
54
+ }
55
+
56
+ @if ms(-4, 12, $major-tenth $octave) != 1.92 {
57
+ @debug "";
58
+ @warn "function ms() multi-ratio: FAIL!";
59
+ @debug "function ms(-4, 12, $major-tenth $octave)";
60
+ @debug "Result: #{ms(-4, 12, $major-tenth $octave)}";
61
+ @debug "Intended: 1.92";
62
+ @debug "";
63
+ }@else {
64
+ @warn "function ms(-) multi-ratio: pass";
65
+ }
66
+
67
+ @if ms-list(-3, 3, 10 16, $major-third) != (6.5536 8 8.192 10 10.24 12.5 12.8) {
68
+ @debug "function ms-list(): FAIL!";
69
+ @warn "function ms-list(-3, 3, 10 16, $major-third)";
70
+ @debug "Result: (#{ms-list(-3, 3, 10 16, $major-third)})";
71
+ @debug "Intended: (6.5536 8 8.192 10 10.24 12.5 12.8)";
72
+ }@else {
73
+ @warn "function ms-list(): pass";
74
+ }
@@ -0,0 +1,18 @@
1
+ @import "modular-scale/ratios";
2
+
3
+ $ms-base: 1em !default;
4
+ $ms-ratio: $golden !default;
5
+ $ms-range: null !default;
6
+ $ms-fluid: true !default;
7
+
8
+ @import "modular-scale/tests";
9
+
10
+ @import "modular-scale/pow";
11
+ @import "modular-scale/calc";
12
+ @import "modular-scale/generate-list";
13
+ @import "modular-scale/sort-list";
14
+ @import "modular-scale/round-px";
15
+ @import "modular-scale/function";
16
+ @import "modular-scale/function-list";
17
+
18
+ @import "modular-scale/respond";
@@ -0,0 +1,17 @@
1
+ @function ms-calc($Value, $Base: $ms-base, $Ratio: $ms-ratio) {
2
+
3
+ // If pow exists use it.
4
+ // It supports non-interger values!
5
+ @if $MS-pow-exists {
6
+
7
+ // The formula for figuring out modular scales is:
8
+ // (r^v)*b
9
+ @return pow($Ratio, $Value) * $Base;
10
+ }
11
+
12
+ // If not, use ms-pow().
13
+ // Not as fast or capable of non-integer exponents.
14
+ @else {
15
+ @return ms-pow($Ratio, $Value) * $Base;
16
+ }
17
+ }
@@ -0,0 +1,68 @@
1
+ // Outputs a list of values instead of a single value
2
+ @function ms-list($Start: 0, $End: 0, $Bases: $ms-base, $Ratios: $ms-ratio) {
3
+
4
+ // Seed results
5
+ $Positive-return: ();
6
+ $Negitive-return: ();
7
+ $Return: ();
8
+
9
+ @if $End >= 0 {
10
+ // Generate a list of all possible values
11
+ $Positive-return: ms-generate-list($End, $Bases, $Ratios);
12
+
13
+ // Sort the generated lists
14
+ $Positive-return: ms-sort-list($Positive-return);
15
+
16
+ // Trim list
17
+ $Trim-list: ();
18
+ // If the starting value is a positive number
19
+ // trim the positive return from that
20
+ @if $Start >= 0 {
21
+ @for $i from ($Start + 1) through $End + 1 {
22
+ $Trim-list: join($Trim-list, nth($Positive-return, $i));
23
+ }
24
+ }
25
+ // If not, then include everything up to the end.
26
+ @else {
27
+ @for $i from 1 through $End + 1 {
28
+ $Trim-list: join($Trim-list, nth($Positive-return, $i));
29
+ }
30
+ }
31
+ $Positive-return: $Trim-list;
32
+ }
33
+
34
+ // Generate a negitive list
35
+ @if $Start < 0 {
36
+ // Generate a list of all possible values
37
+ $Negitive-return: ms-generate-list($Start, $Bases, $Ratios);
38
+
39
+ // Sort the generated lists
40
+ $Negitive-return: ms-sort-list($Negitive-return);
41
+
42
+ // Reverse negitive list results.
43
+ $MS-new-return: ();
44
+ @each $i in $Negitive-return {
45
+ $MS-new-return: join($i, $MS-new-return);
46
+ }
47
+ $Negitive-return: $MS-new-return;
48
+
49
+ // Trim list
50
+ $Trim-list: ();
51
+ @if $End < 0 {
52
+ @for $i from abs($End) through (abs($Start) + 2) {
53
+ $Trim-list: join(nth($Negitive-return, $i), $Trim-list);
54
+ }
55
+ }
56
+ @else {
57
+ @for $i from 2 through (abs($Start) + 1) {
58
+ $Trim-list: join(nth($Negitive-return, $i), $Trim-list);
59
+ }
60
+ }
61
+ $Negitive-return: $Trim-list;
62
+ }
63
+
64
+ // Join both positive and negitive possibilities.
65
+ $Return: join($Negitive-return, $Positive-return);
66
+
67
+ @return $Return;
68
+ }
@@ -0,0 +1,55 @@
1
+ // The main function that brings it all together
2
+ @function ms($Value: 0, $Bases: $ms-base, $Ratios: $ms-ratio) {
3
+
4
+ // If no multi-base or multi-ratio stuff is going on
5
+ // then just retrn the basic calculaiton
6
+ @if length($Bases) == 1 and length($Ratios) == 1 {
7
+ @return ms-round-px(ms-calc($Value, $Bases, $Ratios));
8
+ }
9
+
10
+ // Do calculations directly in Ruby when avalible
11
+ @if $MS-gem-exists {
12
+
13
+ // Remove units from bases
14
+ $Unit: nth($Bases, 1) * 0 + 1; // Extracts the unit from the base
15
+ $Unitless-Bases: ();
16
+ @each $Base in $Bases {
17
+ $Base: $Base/$Unit;
18
+ $Unitless-Bases: join($Unitless-Bases, $Base);
19
+ }
20
+
21
+ // Calculate natively in Ruby
22
+ @return ms-round-px(ms-gem-func($Value, $Unitless-Bases, $Ratios) * $Unit);
23
+ }
24
+
25
+ // Generate a list of all possible values
26
+ $Return: ms-generate-list($Value, $Bases, $Ratios);
27
+
28
+ // Sort the generated lists
29
+ $Return: ms-sort-list($Return);
30
+
31
+ // Reverse list if its negitive.
32
+ @if $Value < 0 {
33
+ $MS-new-return: ();
34
+ @each $i in $Return {
35
+ $MS-new-return: join($i, $MS-new-return);
36
+ }
37
+ $Return: $MS-new-return;
38
+ }
39
+
40
+ // Normalize value for counting from 1
41
+ // Because CSS counts things from 1
42
+ // So Sass does as well
43
+ // So I get to write fun stuff like this
44
+ $Value: abs($Value) + 1;
45
+
46
+ // Find the correct value in the list
47
+ $Return: nth($Return, $Value);
48
+
49
+ @return ms-round-px($Return);
50
+ }
51
+
52
+ // Same function, different name, for good measure.
53
+ @function modular-scale($Value: 0, $Bases: $ms-base, $Ratios: $ms-ratio) {
54
+ @return ms($Value, $Bases, $Ratios);
55
+ }
@@ -0,0 +1,103 @@
1
+ @function ms-reverse-list($list) {
2
+ @if length($list) > 1 {
3
+ @if nth($list, 1) > nth($list, length($list)) {
4
+ $MS-reversed-list: ();
5
+ @each $Value in $list {
6
+ $MS-reversed-list: join($Value, $MS-reversed-list);
7
+ }
8
+ @return $MS-reversed-list;
9
+ }
10
+ }
11
+ @return $list;
12
+ }
13
+
14
+
15
+ @function ms-generate-list($Value: 0, $Bases: $ms-base, $Ratios: $ms-ratio) {
16
+
17
+ // Create blank lists
18
+ $MS-list: ();
19
+ $MS-base-list: ();
20
+
21
+ // Loop through each ratio AND each base
22
+ // to generate all possibilities.
23
+ @each $Ratio in $Ratios {
24
+ @each $Base in $Bases {
25
+
26
+ // Set base variables
27
+ $MS-base-list: ();
28
+ $Base-counter: 0;
29
+
30
+ // Seed list with an initial value
31
+ $MS-base-list: $Base;
32
+
33
+ // Find values on a positive scale
34
+ @if $Value >= 0 {
35
+
36
+ // Find lower values on the scale
37
+ $Base-counter: -1;
38
+ @while ms-calc($Base-counter, $Base, $Ratio) >= nth($Bases, 1) {
39
+ $MS-base-list: join($MS-base-list, ms-calc($Base-counter, $Base, $Ratio));
40
+ $Base-counter: $Base-counter - 1;
41
+ }
42
+
43
+ // Ensure the list is smallest to largest
44
+ $MS-base-list: ms-reverse-list($MS-base-list);
45
+
46
+ // Find higher possible values on the scale
47
+ $Base-counter: 1;
48
+ @while ms-calc($Base-counter, $Base, $Ratio) <= ms-calc($Value, nth($Bases, 1), $Ratio) {
49
+ $MS-base-list: join($MS-base-list, ms-calc($Base-counter, $Base, $Ratio));
50
+ $Base-counter: $Base-counter + 1;
51
+ }
52
+ }
53
+
54
+ // Find values on a negitive scale
55
+ @else {
56
+
57
+ // Find lower values on the scale
58
+ $Base-counter: 1;
59
+ @while ms-calc($Base-counter, $Base, $Ratio) <= nth($Bases, 1) {
60
+ $MS-base-list: join($MS-base-list, ms-calc($Base-counter, $Base, $Ratio));
61
+ $Base-counter: $Base-counter + 1;
62
+ }
63
+
64
+ // Ensure the list is smallest to largest
65
+ $MS-base-list: ms-reverse-list($MS-base-list);
66
+
67
+ // Find higher possible values on the scale
68
+ $Base-counter: -1;
69
+ @while ms-calc($Base-counter, $Base, $Ratio) >= ms-calc($Value, nth($Bases, 1), $Ratio) {
70
+ $MS-calc: ms-calc($Base-counter, $Base, $Ratio);
71
+ // detect if the value excedes the main base value
72
+ @if $MS-calc < nth($Bases, 1) {
73
+ $MS-base-list: join($MS-base-list, $MS-calc);
74
+ }
75
+ $Base-counter: $Base-counter - 1;
76
+ }
77
+
78
+ // Trim outlier base.
79
+ @if length($Bases) > 1 {
80
+ @for $i from 2 through length($Bases) {
81
+ @if nth($MS-base-list, 1) > nth($Bases, 1) {
82
+ $MS-new-list: ();
83
+ @for $i from 2 through length($MS-base-list) {
84
+ $MS-new-list: join($MS-new-list, nth($MS-base-list, $i));
85
+ }
86
+ $MS-base-list: $MS-new-list;
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ // reverse list if its largest to smallest
93
+ $MS-base-list: ms-reverse-list($MS-base-list);
94
+
95
+ // Add new possibilities to the master list
96
+ $MS-list: append($MS-list, $MS-base-list, comma);
97
+
98
+ }
99
+ }
100
+
101
+ // After all the possibilities are found, output a master list
102
+ @return $MS-list;
103
+ }
@@ -0,0 +1,40 @@
1
+ // If a native exponent function doesnt exist
2
+ // this one is needed.
3
+ @function ms-pow($Base, $Exponent) {
4
+
5
+ // Find and remove unit.
6
+ // Avoids messyness with unit calculations
7
+ $Unit: $Base * 0 + 1;
8
+ $Base: $Base/$Unit;
9
+
10
+ // This function doesnt support non-interger exponents.
11
+ // Warn the user about why this is breaking.
12
+ @if round($Exponent) != $Exponent {
13
+ @warn "Unfortunately, you need Compass to use non-integer exponents";
14
+ }
15
+
16
+ // Set up the loop, priming the return with the base.
17
+ $Return: $Base;
18
+
19
+ // If the number is positive, multiply it.
20
+ @if $Exponent > 0 {
21
+ // Basic feedback loop as exponents
22
+ // are recursivley multiplied numbers.
23
+ @for $i from 1 to $Exponent {
24
+ $Return: $Return * $Base;
25
+ }
26
+ }
27
+
28
+ // If the number is 0 or negitive
29
+ // divide instead of multiply.
30
+ @else {
31
+ // Libsass doesnt allow negitive values in loops
32
+ @for $i from (-1 + 1) to (abs($Exponent) + 1) {
33
+ $Return: $Return / $Base;
34
+ }
35
+ }
36
+
37
+ // Return is now compounded redy to be returned.
38
+ // Add the unit back onto the number.
39
+ @return $Return * $Unit;
40
+ }
@@ -0,0 +1,20 @@
1
+ // Golden ratio
2
+ $phi : 1.618034 ;
3
+ $golden : $phi ;
4
+
5
+ $double-octave : 4 ;
6
+ $major-twelfth : 3 ;
7
+ $major-eleventh : 2.666666667 ;
8
+ $major-tenth : 2.5 ;
9
+ $octave : 2 ;
10
+ $major-seventh : 1.875 ;
11
+ $minor-seventh : 1.777777778 ;
12
+ $major-sixth : 1.666666667 ;
13
+ $minor-sixth : 1.6 ;
14
+ $fifth : 1.5 ;
15
+ $augmented-fourth : 1.41421 ;
16
+ $fourth : 1.333333333 ;
17
+ $major-third : 1.25 ;
18
+ $minor-third : 1.2 ;
19
+ $major-second : 1.125 ;
20
+ $minor-second : 1.066666667 ;
@@ -0,0 +1,49 @@
1
+ // Stripping units is rarely a best practice and this function
2
+ // should not be used elsewhere
3
+ @function ms-unitless($val) {
4
+ $val: $val / ($val - $val + 1);
5
+ @return $val;
6
+ }
7
+
8
+ // Search config for values
9
+ @function ms-range($x,$y,$range:$ms-range) {
10
+ @return nth(nth($range,$x),$y);
11
+ }
12
+
13
+ // Generate calc() function
14
+ @function ms-respond-calc($value, $n, $range: $ms-range, $base: $ms-base) {
15
+ $val1: ms($value,$base,ms-range($n,1,$range));
16
+ $val2: ms($value,$base,ms-range($n+1,1,$range));
17
+ $break1: ms-range($n,2,$range);
18
+ $break2: ms-range($n+1,2,$range);
19
+ $diff: ms-unitless($val2) - ms-unitless($val1);
20
+ @if $ms-fluid {
21
+ @return calc( #{$val1} + #{$diff} * ( ( 100vw - #{$break1}) / #{ms-unitless($break2) - ms-unitless($break1)} ) );
22
+ } @else {
23
+ @return ms($value,$base,ms-range($n,1,$range));
24
+ }
25
+ }
26
+
27
+ // Main responsive mixin
28
+ @mixin ms-respond($property, $value, $range: $ms-range, $base: $ms-base) {
29
+ // If there is no responsive config, just output the property and value
30
+ @if $ms-range == null {
31
+ #{$property}: ms($value,$base,$ms-ratio);
32
+ } @else {
33
+
34
+ // Initial value
35
+ #{$property}: ms($value,$base,ms-range(1,1,$range));
36
+
37
+ // Loop through breakpoints
38
+ @for $i from 1 through (length($range) - 1) {
39
+ @media (min-width: ms-range($i,2,$range)) and (max-width: ms-range($i+1,2,$range)) {
40
+ #{$property}: ms-respond-calc($value, $i, $range, $base);
41
+ }
42
+ }
43
+
44
+ // Final breakpoint is just an override value
45
+ @media (min-width: ms-range(length($range),2,$range)) {
46
+ #{$property}: ms($value,$base,ms-range(length($range),1,$range));
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,6 @@
1
+ @function ms-round-px($Result) {
2
+ @if unit($Result) == 'px' {
3
+ @return round($Result);
4
+ }
5
+ @return $Result;
6
+ }
@@ -0,0 +1,93 @@
1
+ // List sorting via a modified merge-sort algorythmn
2
+ // http://en.wikipedia.org/wiki/Merge_sort
3
+
4
+ @function ms-merge($A, $B) {
5
+
6
+ $Return: ();
7
+
8
+ // Some empty lists get passed through
9
+ // so just pass the other list throguh
10
+ @if length($A) == 0 {
11
+ @return $B;
12
+ }
13
+
14
+ // If lists fit next to each other, just merge them
15
+ // This helps performance skipping the need to check each value
16
+ @if nth($A, length($A)) < nth($B, 1) {
17
+ @return join($A, $B);
18
+ }
19
+ @if nth($B, length($B)) < nth($A, 1) {
20
+ @return join($B, $A);
21
+ }
22
+
23
+ // Counters start at 1
24
+ $A-counter: 1;
25
+ $B-counter: 1;
26
+
27
+ // Start looping through all numbers in array
28
+ @while $A-counter <= length($A) and $B-counter <= length($B) {
29
+
30
+ // Check if the A value is smaller
31
+ // Uses or equal to avoid duplicate numbers
32
+ @if nth($A, $A-counter) <= nth($B, $B-counter) {
33
+ $Return: join($Return, nth($A, $A-counter));
34
+ $A-counter: $A-counter + 1;
35
+ }
36
+
37
+ // Check if the B value is smaller
38
+ @else if nth($A, $A-counter) > nth($B, $B-counter) {
39
+ $Return: join($Return, nth($B, $B-counter));
40
+ $B-counter: $B-counter + 1;
41
+ }
42
+ }
43
+
44
+ // Run through remainder values in the list
45
+ @while $A-counter <= length($A) {
46
+ $Current: nth($A, $A-counter);
47
+ @if $Current != nth($Return, length($Return)) {
48
+ $Return: join($Return, $Current);
49
+ }
50
+ $A-counter: $A-counter + 1;
51
+ }
52
+ @while $B-counter <= length($B) {
53
+ $Current: nth($B, $B-counter);
54
+ @if $Current != nth($Return, length($Return)) {
55
+ $Return: join($Return, $Current);
56
+ }
57
+ $B-counter: $B-counter + 1;
58
+ }
59
+
60
+ // Done! return is now sorted and complete
61
+ @return $Return;
62
+ }
63
+
64
+
65
+
66
+ // Pull it all together
67
+ @function ms-sort-list($Lists) {
68
+
69
+ $Return: ();
70
+
71
+ @each $List in $Lists {
72
+ @if $Return == () {
73
+ $Return: $List;
74
+ }
75
+ @else {
76
+ $Return: ms-merge($List, $Return);
77
+ }
78
+ }
79
+
80
+ // final cleanup of repeated items
81
+ $Last: null;
82
+ $New-list: ();
83
+ @each $Item in $Return {
84
+ @if $Item != $Last {
85
+ $New-list: join($New-list, $Item);
86
+ }
87
+ $Last: $Item;
88
+ }
89
+ $Return: $New-list;
90
+
91
+
92
+ @return $Return;
93
+ }
@@ -0,0 +1,22 @@
1
+ // Feature testing
2
+
3
+
4
+ // Test if the pow() function exists
5
+ @function ms-pow-exists() {
6
+ @if pow(4, 2) == 16 {
7
+ @return true;
8
+ }
9
+ @return false;
10
+ }
11
+
12
+ $MS-pow-exists: ms-pow-exists();
13
+
14
+ // Test if MS was installed via the gem
15
+ @function ms-gem-exists() {
16
+ @if ms-gem-installed() == true {
17
+ @return true;
18
+ }
19
+ @return false;
20
+ }
21
+
22
+ $MS-gem-exists: ms-gem-exists();
@@ -0,0 +1,6 @@
1
+ @charset 'utf-8';
2
+
3
+ @import 'static/module';
4
+ @import 'constants/module';
5
+ @import 'helpers/module';
6
+ @import 'api/module';
@@ -0,0 +1,43 @@
1
+
2
+ @function __add($augend, $addend, $args...) {
3
+ $augend: __parse-float($augend);
4
+ $addend: __parse-float($addend);
5
+
6
+ $units: __map($augend $addend, __unit);
7
+ $unit-groups: __map($units, __unit-group);
8
+
9
+ $unit-groups-equal: if(
10
+ __every($unit-groups, __is-equal null),
11
+ __is-equal($units...),
12
+ __is-equal($unit-groups...));
13
+
14
+ @if ($unit-groups-equal == false and __every($units)) {
15
+ @return calc(#{unquote('#{$augend} + #{$addend}')});
16
+ }
17
+
18
+ @return $augend + $addend;
19
+ }
20
+
21
+
22
+ ///
23
+ /// Adds two numbers.
24
+ ///
25
+ /// @access public
26
+ /// @group Math
27
+ /// @param {number} $augend The first number to add.
28
+ /// @param {number} $addend The second number to add.
29
+ /// @returns {number} Returns the sum.
30
+ /// @example scss
31
+ /// $foo: _add(6, 4);
32
+ /// // => 10
33
+
34
+ @function _add($args...) {
35
+ @return call('__add', $args...);
36
+ }
37
+
38
+
39
+ /// @alias _add
40
+
41
+ @function \+($args...) {
42
+ @return call('__add', $args...);
43
+ }
@@ -0,0 +1,66 @@
1
+ @function __after-callback($arguments...) {
2
+ $n: __this('n');
3
+ $function: __this('function');
4
+
5
+ @if ($n < 1) {
6
+ @return __call($function, __this(), $arguments...);
7
+ }
8
+
9
+ $_: __this('n', $n - 1);
10
+
11
+ @return null;
12
+ }
13
+
14
+
15
+ @function __after($n, $function) {
16
+ @if not (__function-exists($function)) {
17
+ @if (__function-exists($n)) {
18
+ $temp: $n;
19
+ $n: $function;
20
+ $function: $temp;
21
+ } @else {
22
+ @error '#{$function} is not a function for __after.';
23
+ }
24
+ }
25
+
26
+ $_: __scope((
27
+ 'function': $function,
28
+ 'n': $n
29
+ ));
30
+
31
+ $after-callback: __bind('__after-callback');
32
+
33
+ $_: __scope(false);
34
+
35
+ @return $after-callback;
36
+ }
37
+
38
+
39
+ /// The opposite of `_before`; this method creates a function that invokes
40
+ /// `$function` once it is called `$n` or more times.
41
+ ///
42
+ ///
43
+ /// @access public
44
+ /// @group Function
45
+ /// @param {number} n The number of calls before `$function` is invoked.
46
+ /// @param {Function} func The function to restrict.
47
+ /// @returns {Function} Returns the new restricted function.
48
+ /// @example scss
49
+ /// @function warn-overuse() {
50
+ /// @warn 'You are using this mixin too many times.';
51
+ /// }
52
+ ///
53
+ /// $warn-overuse: _after(3, warn-overuse);
54
+ ///
55
+ /// @mixin my-mixin() {
56
+ /// // ...
57
+ /// $overuse: _exec($warn-overuse);
58
+ /// }
59
+ ///
60
+ /// @each $selector in '.one', '.two', '.three', '.four' {
61
+ /// @include my-mixin();
62
+ /// }
63
+
64
+ @function _after($args...) {
65
+ @return call('__after', $args...);
66
+ }