stylus-source 0.23.0 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (595) hide show
  1. data/Rakefile +5 -5
  2. data/VERSION +1 -1
  3. data/vendor/lib/functions/index.js +11 -12
  4. data/vendor/lib/functions/index.styl +45 -0
  5. data/vendor/lib/parser.js +13 -0
  6. data/vendor/lib/stylus.js +1 -1
  7. data/vendor/lib/visitor/evaluator.js +8 -0
  8. data/vendor/node_modules/cssom/Jakefile.js +35 -0
  9. data/vendor/node_modules/cssom/lib/CSSImportRule.js +10 -9
  10. data/vendor/node_modules/cssom/lib/CSSKeyframeRule.js +2 -0
  11. data/vendor/node_modules/cssom/lib/CSSKeyframesRule.js +2 -1
  12. data/vendor/node_modules/cssom/lib/CSSMediaRule.js +2 -1
  13. data/vendor/node_modules/cssom/lib/CSSRule.js +1 -0
  14. data/vendor/node_modules/cssom/lib/CSSStyleDeclaration.js +7 -5
  15. data/vendor/node_modules/cssom/lib/CSSStyleRule.js +11 -9
  16. data/vendor/node_modules/cssom/lib/CSSStyleSheet.js +4 -4
  17. data/vendor/node_modules/cssom/lib/MediaList.js +3 -3
  18. data/vendor/node_modules/cssom/lib/StyleSheet.js +3 -1
  19. data/vendor/node_modules/cssom/lib/clone.js +5 -5
  20. data/vendor/node_modules/cssom/lib/index.js +14 -12
  21. data/vendor/node_modules/cssom/lib/parse.js +48 -43
  22. data/vendor/node_modules/cssom/package.json +5 -4
  23. data/vendor/node_modules/debug/History.md +35 -0
  24. data/vendor/node_modules/debug/Makefile +5 -0
  25. data/vendor/node_modules/debug/Readme.md +128 -0
  26. data/vendor/node_modules/debug/debug.js +111 -0
  27. data/vendor/node_modules/debug/example/app.js +19 -0
  28. data/vendor/node_modules/debug/example/browser.html +24 -0
  29. data/vendor/node_modules/debug/example/wildcards.js +10 -0
  30. data/vendor/node_modules/debug/example/worker.js +22 -0
  31. data/vendor/node_modules/debug/index.js +2 -0
  32. data/vendor/node_modules/debug/lib/debug.js +129 -0
  33. data/vendor/node_modules/debug/package.json +11 -0
  34. data/vendor/node_modules/growl/History.md +21 -0
  35. data/vendor/node_modules/growl/Readme.md +29 -20
  36. data/vendor/node_modules/growl/lib/growl.js +113 -36
  37. data/vendor/node_modules/growl/package.json +1 -1
  38. data/vendor/node_modules/growl/test.js +12 -13
  39. data/vendor/node_modules/mkdirp/README.markdown +35 -2
  40. data/vendor/node_modules/mkdirp/examples/pow.js +1 -1
  41. data/vendor/node_modules/mkdirp/index.js +72 -13
  42. data/vendor/node_modules/mkdirp/package.json +2 -2
  43. data/vendor/node_modules/mkdirp/test/chmod.js +38 -0
  44. data/vendor/node_modules/mkdirp/test/clobber.js +37 -0
  45. data/vendor/node_modules/mkdirp/test/perm.js +32 -0
  46. data/vendor/node_modules/mkdirp/test/perm_sync.js +39 -0
  47. data/vendor/node_modules/mkdirp/test/sync.js +27 -0
  48. data/vendor/node_modules/mkdirp/test/umask.js +28 -0
  49. data/vendor/node_modules/mkdirp/test/umask_sync.js +27 -0
  50. data/vendor/package.json +6 -5
  51. data/vendor/testing/test.css +39 -0
  52. data/vendor/testing/test.html +21 -0
  53. data/vendor/testing/test.js +5 -3
  54. data/vendor/testing/test.styl +42 -2
  55. metadata +23 -542
  56. data/vendor/History.md +0 -672
  57. data/vendor/Makefile +0 -20
  58. data/vendor/Readme.md +0 -155
  59. data/vendor/docs/bifs.md +0 -598
  60. data/vendor/docs/comments.md +0 -35
  61. data/vendor/docs/compare.md +0 -81
  62. data/vendor/docs/conditionals.md +0 -107
  63. data/vendor/docs/css-style.md +0 -77
  64. data/vendor/docs/error-reporting.md +0 -50
  65. data/vendor/docs/escape.md +0 -28
  66. data/vendor/docs/executable.md +0 -163
  67. data/vendor/docs/extend.md +0 -123
  68. data/vendor/docs/firebug.md +0 -59
  69. data/vendor/docs/font-face.md +0 -26
  70. data/vendor/docs/functions.md +0 -197
  71. data/vendor/docs/functions.url.md +0 -32
  72. data/vendor/docs/gedit.md +0 -24
  73. data/vendor/docs/import.md +0 -75
  74. data/vendor/docs/interpolation.md +0 -55
  75. data/vendor/docs/introspection.md +0 -38
  76. data/vendor/docs/iteration.md +0 -102
  77. data/vendor/docs/js.md +0 -157
  78. data/vendor/docs/keyframes.md +0 -122
  79. data/vendor/docs/kwargs.md +0 -34
  80. data/vendor/docs/literal.md +0 -16
  81. data/vendor/docs/media.md +0 -18
  82. data/vendor/docs/middleware.md +0 -72
  83. data/vendor/docs/mixins.md +0 -138
  84. data/vendor/docs/operators.md +0 -470
  85. data/vendor/docs/selectors.md +0 -133
  86. data/vendor/docs/textmate.md +0 -4
  87. data/vendor/docs/vargs.md +0 -84
  88. data/vendor/docs/variables.md +0 -85
  89. data/vendor/editors/Stylus.tmbundle/Commands/Compile and Display CSS.tmCommand +0 -33
  90. data/vendor/editors/Stylus.tmbundle/Preferences/Comments.tmPreferences +0 -36
  91. data/vendor/editors/Stylus.tmbundle/Syntaxes/Stylus.tmLanguage +0 -228
  92. data/vendor/editors/Stylus.tmbundle/info.plist +0 -10
  93. data/vendor/editors/gedit/styl.lang +0 -475
  94. data/vendor/examples/arithmetic.js +0 -12
  95. data/vendor/examples/arithmetic.styl +0 -29
  96. data/vendor/examples/basic.js +0 -12
  97. data/vendor/examples/basic.styl +0 -8
  98. data/vendor/examples/builtins.js +0 -12
  99. data/vendor/examples/builtins.styl +0 -56
  100. data/vendor/examples/comments.js +0 -11
  101. data/vendor/examples/comments.styl +0 -15
  102. data/vendor/examples/compress.js +0 -12
  103. data/vendor/examples/conversions.js +0 -12
  104. data/vendor/examples/conversions.styl +0 -34
  105. data/vendor/examples/functions.js +0 -12
  106. data/vendor/examples/functions.styl +0 -30
  107. data/vendor/examples/gradients.js +0 -13
  108. data/vendor/examples/gradients.styl +0 -8
  109. data/vendor/examples/images/gopher.jpg +0 -0
  110. data/vendor/examples/images/gradient.svg +0 -9
  111. data/vendor/examples/images/jesus.gif +0 -0
  112. data/vendor/examples/images/sprite.gif +0 -0
  113. data/vendor/examples/images.js +0 -20
  114. data/vendor/examples/images.styl +0 -15
  115. data/vendor/examples/implicit-functions.js +0 -12
  116. data/vendor/examples/implicit-functions.styl +0 -23
  117. data/vendor/examples/import.js +0 -12
  118. data/vendor/examples/import.styl +0 -11
  119. data/vendor/examples/js-functions.js +0 -55
  120. data/vendor/examples/js-functions.styl +0 -23
  121. data/vendor/examples/literal.js +0 -12
  122. data/vendor/examples/literal.styl +0 -8
  123. data/vendor/examples/middleware.js +0 -23
  124. data/vendor/examples/mixins/box.styl +0 -14
  125. data/vendor/examples/mixins/gradients.styl +0 -92
  126. data/vendor/examples/nesting.js +0 -12
  127. data/vendor/examples/nesting.styl +0 -14
  128. data/vendor/examples/variables.js +0 -12
  129. data/vendor/examples/variables.styl +0 -24
  130. data/vendor/node_modules/cssom/Jakefile +0 -37
  131. data/vendor/node_modules/cssom/MIT-LICENSE.txt +0 -20
  132. data/vendor/node_modules/cssom/README.mdown +0 -34
  133. data/vendor/node_modules/cssom/Rakefile +0 -23
  134. data/vendor/node_modules/cssom/animation.html +0 -27
  135. data/vendor/node_modules/cssom/bench.html +0 -47
  136. data/vendor/node_modules/cssom/comments.js +0 -63
  137. data/vendor/node_modules/cssom/docs/bar.css +0 -3
  138. data/vendor/node_modules/cssom/docs/col_table.html +0 -15
  139. data/vendor/node_modules/cssom/docs/cols.html +0 -14
  140. data/vendor/node_modules/cssom/docs/cols_inline-blocks.html +0 -33
  141. data/vendor/node_modules/cssom/docs/demo.css +0 -0
  142. data/vendor/node_modules/cssom/docs/diff.html +0 -132
  143. data/vendor/node_modules/cssom/docs/foo.css +0 -4
  144. data/vendor/node_modules/cssom/docs/parse.html +0 -282
  145. data/vendor/node_modules/cssom/docs/parse.html_ +0 -268
  146. data/vendor/node_modules/cssom/docs/parse2.html +0 -518
  147. data/vendor/node_modules/cssom/docs/parser.html +0 -31
  148. data/vendor/node_modules/cssom/index.html +0 -100
  149. data/vendor/node_modules/cssom/lib/CSSOM.js +0 -3
  150. data/vendor/node_modules/cssom/lib/Parser.js +0 -362
  151. data/vendor/node_modules/cssom/media.html +0 -17
  152. data/vendor/node_modules/cssom/plugins/toHTML.js +0 -32
  153. data/vendor/node_modules/cssom/server/index.html +0 -22
  154. data/vendor/node_modules/cssom/server/index.js +0 -21
  155. data/vendor/node_modules/cssom/shorthands.html +0 -21
  156. data/vendor/node_modules/cssom/strings.html +0 -10
  157. data/vendor/node_modules/cssom/test/CSSImportRule.test.js +0 -52
  158. data/vendor/node_modules/cssom/test/CSSStyleDeclaration.test.js +0 -42
  159. data/vendor/node_modules/cssom/test/CSSStyleRule.test.js +0 -12
  160. data/vendor/node_modules/cssom/test/CSSStyleSheet.test.js +0 -16
  161. data/vendor/node_modules/cssom/test/MediaList.test.js +0 -21
  162. data/vendor/node_modules/cssom/test/_helper.js +0 -122
  163. data/vendor/node_modules/cssom/test/clone.test.js +0 -38
  164. data/vendor/node_modules/cssom/test/fixtures/dummy.css +0 -3
  165. data/vendor/node_modules/cssom/test/helper.js +0 -122
  166. data/vendor/node_modules/cssom/test/index.html +0 -45
  167. data/vendor/node_modules/cssom/test/parse.test.js +0 -718
  168. data/vendor/node_modules/cssom/test/vendor/qunit.css +0 -189
  169. data/vendor/node_modules/cssom/test/vendor/qunit.js +0 -1415
  170. data/vendor/test/cases/arithmetic.color.css +0 -44
  171. data/vendor/test/cases/arithmetic.color.styl +0 -48
  172. data/vendor/test/cases/arithmetic.css +0 -23
  173. data/vendor/test/cases/arithmetic.styl +0 -30
  174. data/vendor/test/cases/arithmetic.unary.css +0 -16
  175. data/vendor/test/cases/arithmetic.unary.styl +0 -16
  176. data/vendor/test/cases/atscope.css +0 -21
  177. data/vendor/test/cases/atscope.styl +0 -23
  178. data/vendor/test/cases/bifs.add-property.css +0 -21
  179. data/vendor/test/cases/bifs.add-property.styl +0 -48
  180. data/vendor/test/cases/bifs.components.css +0 -9
  181. data/vendor/test/cases/bifs.components.styl +0 -9
  182. data/vendor/test/cases/bifs.dark.css +0 -5
  183. data/vendor/test/cases/bifs.dark.styl +0 -4
  184. data/vendor/test/cases/bifs.darken.css +0 -8
  185. data/vendor/test/cases/bifs.darken.styl +0 -9
  186. data/vendor/test/cases/bifs.fade.css +0 -6
  187. data/vendor/test/cases/bifs.fade.styl +0 -6
  188. data/vendor/test/cases/bifs.image-size.css +0 -9
  189. data/vendor/test/cases/bifs.image-size.styl +0 -16
  190. data/vendor/test/cases/bifs.join.css +0 -18
  191. data/vendor/test/cases/bifs.join.styl +0 -21
  192. data/vendor/test/cases/bifs.keys.css +0 -4
  193. data/vendor/test/cases/bifs.keys.styl +0 -6
  194. data/vendor/test/cases/bifs.last.css +0 -5
  195. data/vendor/test/cases/bifs.last.styl +0 -6
  196. data/vendor/test/cases/bifs.length.css +0 -10
  197. data/vendor/test/cases/bifs.length.styl +0 -18
  198. data/vendor/test/cases/bifs.light.css +0 -5
  199. data/vendor/test/cases/bifs.light.styl +0 -4
  200. data/vendor/test/cases/bifs.lighten.css +0 -14
  201. data/vendor/test/cases/bifs.lighten.styl +0 -14
  202. data/vendor/test/cases/bifs.lookup.css +0 -3
  203. data/vendor/test/cases/bifs.lookup.styl +0 -8
  204. data/vendor/test/cases/bifs.match.css +0 -4
  205. data/vendor/test/cases/bifs.match.styl +0 -9
  206. data/vendor/test/cases/bifs.opposite-position.css +0 -8
  207. data/vendor/test/cases/bifs.opposite-position.styl +0 -9
  208. data/vendor/test/cases/bifs.push.css +0 -25
  209. data/vendor/test/cases/bifs.push.styl +0 -48
  210. data/vendor/test/cases/bifs.rgba.css +0 -5
  211. data/vendor/test/cases/bifs.rgba.styl +0 -4
  212. data/vendor/test/cases/bifs.s.css +0 -11
  213. data/vendor/test/cases/bifs.s.styl +0 -12
  214. data/vendor/test/cases/bifs.type.css +0 -11
  215. data/vendor/test/cases/bifs.type.styl +0 -12
  216. data/vendor/test/cases/bifs.unit.css +0 -6
  217. data/vendor/test/cases/bifs.unit.styl +0 -5
  218. data/vendor/test/cases/bifs.unquote.css +0 -5
  219. data/vendor/test/cases/bifs.unquote.styl +0 -8
  220. data/vendor/test/cases/bifs.url.css +0 -11
  221. data/vendor/test/cases/bifs.url.styl +0 -15
  222. data/vendor/test/cases/bifs.values.css +0 -5
  223. data/vendor/test/cases/bifs.values.styl +0 -6
  224. data/vendor/test/cases/casting.css +0 -12
  225. data/vendor/test/cases/casting.styl +0 -14
  226. data/vendor/test/cases/coercion.css +0 -6
  227. data/vendor/test/cases/coercion.styl +0 -5
  228. data/vendor/test/cases/comments.css +0 -18
  229. data/vendor/test/cases/comments.styl +0 -28
  230. data/vendor/test/cases/compress.comments.css +0 -2
  231. data/vendor/test/cases/compress.comments.styl +0 -5
  232. data/vendor/test/cases/compress.units.css +0 -2
  233. data/vendor/test/cases/compress.units.styl +0 -18
  234. data/vendor/test/cases/conditional-assignment.css +0 -4
  235. data/vendor/test/cases/conditional-assignment.styl +0 -9
  236. data/vendor/test/cases/control.blueprint.ie.css +0 -126
  237. data/vendor/test/cases/control.blueprint.ie.styl +0 -36
  238. data/vendor/test/cases/control.blueprint.screen.css +0 -1103
  239. data/vendor/test/cases/control.blueprint.screen.styl +0 -265
  240. data/vendor/test/cases/control.boilerplate.css +0 -473
  241. data/vendor/test/cases/control.boilerplate.styl +0 -265
  242. data/vendor/test/cases/css.extend.css +0 -13
  243. data/vendor/test/cases/css.extend.styl +0 -15
  244. data/vendor/test/cases/css.functions.single-line.css +0 -9
  245. data/vendor/test/cases/css.functions.single-line.styl +0 -13
  246. data/vendor/test/cases/css.if.css +0 -8
  247. data/vendor/test/cases/css.if.styl +0 -21
  248. data/vendor/test/cases/css.keyframes.css +0 -57
  249. data/vendor/test/cases/css.keyframes.styl +0 -48
  250. data/vendor/test/cases/css.large.css +0 -172
  251. data/vendor/test/cases/css.large.styl +0 -172
  252. data/vendor/test/cases/css.media.css +0 -15
  253. data/vendor/test/cases/css.media.styl +0 -17
  254. data/vendor/test/cases/css.mixins.braces.css +0 -38
  255. data/vendor/test/cases/css.mixins.braces.styl +0 -53
  256. data/vendor/test/cases/css.mixins.css +0 -38
  257. data/vendor/test/cases/css.mixins.root.css +0 -26
  258. data/vendor/test/cases/css.mixins.root.styl +0 -25
  259. data/vendor/test/cases/css.mixins.root.wonky.css +0 -26
  260. data/vendor/test/cases/css.mixins.root.wonky.styl +0 -17
  261. data/vendor/test/cases/css.mixins.styl +0 -47
  262. data/vendor/test/cases/css.selector.interpolation.css +0 -91
  263. data/vendor/test/cases/css.selector.interpolation.styl +0 -90
  264. data/vendor/test/cases/css.selectors.css +0 -38
  265. data/vendor/test/cases/css.selectors.styl +0 -53
  266. data/vendor/test/cases/css.whitespace.css +0 -37
  267. data/vendor/test/cases/css.whitespace.styl +0 -38
  268. data/vendor/test/cases/dumb.css +0 -10
  269. data/vendor/test/cases/dumb.styl +0 -11
  270. data/vendor/test/cases/eol-escape.css +0 -11
  271. data/vendor/test/cases/eol-escape.styl +0 -27
  272. data/vendor/test/cases/escape.css +0 -4
  273. data/vendor/test/cases/escape.styl +0 -4
  274. data/vendor/test/cases/extend.complex.css +0 -16
  275. data/vendor/test/cases/extend.complex.styl +0 -15
  276. data/vendor/test/cases/extend.css +0 -22
  277. data/vendor/test/cases/extend.multiple-definitions.css +0 -11
  278. data/vendor/test/cases/extend.multiple-definitions.styl +0 -9
  279. data/vendor/test/cases/extend.styl +0 -22
  280. data/vendor/test/cases/fontface.css +0 -4
  281. data/vendor/test/cases/fontface.styl +0 -5
  282. data/vendor/test/cases/for.complex.css +0 -44
  283. data/vendor/test/cases/for.complex.styl +0 -28
  284. data/vendor/test/cases/for.css +0 -52
  285. data/vendor/test/cases/for.function.css +0 -20
  286. data/vendor/test/cases/for.function.styl +0 -51
  287. data/vendor/test/cases/for.styl +0 -44
  288. data/vendor/test/cases/function.arguments.css +0 -4
  289. data/vendor/test/cases/function.arguments.styl +0 -14
  290. data/vendor/test/cases/function.literals.css +0 -6
  291. data/vendor/test/cases/function.literals.styl +0 -12
  292. data/vendor/test/cases/functions.arg-calls.css +0 -3
  293. data/vendor/test/cases/functions.arg-calls.styl +0 -9
  294. data/vendor/test/cases/functions.call.css +0 -4
  295. data/vendor/test/cases/functions.call.styl +0 -7
  296. data/vendor/test/cases/functions.css +0 -11
  297. data/vendor/test/cases/functions.defaults.css +0 -15
  298. data/vendor/test/cases/functions.defaults.styl +0 -30
  299. data/vendor/test/cases/functions.multi-line.css +0 -9
  300. data/vendor/test/cases/functions.multi-line.styl +0 -25
  301. data/vendor/test/cases/functions.multiple-calls.css +0 -13
  302. data/vendor/test/cases/functions.multiple-calls.styl +0 -26
  303. data/vendor/test/cases/functions.nested-calls.css +0 -3
  304. data/vendor/test/cases/functions.nested-calls.styl +0 -9
  305. data/vendor/test/cases/functions.nested.css +0 -10
  306. data/vendor/test/cases/functions.nested.styl +0 -37
  307. data/vendor/test/cases/functions.property.css +0 -10
  308. data/vendor/test/cases/functions.property.styl +0 -11
  309. data/vendor/test/cases/functions.return.css +0 -15
  310. data/vendor/test/cases/functions.return.each.css +0 -10
  311. data/vendor/test/cases/functions.return.each.styl +0 -23
  312. data/vendor/test/cases/functions.return.styl +0 -86
  313. data/vendor/test/cases/functions.styl +0 -34
  314. data/vendor/test/cases/functions.variable.css +0 -9
  315. data/vendor/test/cases/functions.variable.ident.css +0 -3
  316. data/vendor/test/cases/functions.variable.ident.styl +0 -11
  317. data/vendor/test/cases/functions.variable.styl +0 -27
  318. data/vendor/test/cases/hack.star.css +0 -27
  319. data/vendor/test/cases/hack.star.styl +0 -37
  320. data/vendor/test/cases/if.css +0 -43
  321. data/vendor/test/cases/if.else.css +0 -6
  322. data/vendor/test/cases/if.else.styl +0 -16
  323. data/vendor/test/cases/if.mixin.css +0 -7
  324. data/vendor/test/cases/if.mixin.styl +0 -24
  325. data/vendor/test/cases/if.postfix.css +0 -61
  326. data/vendor/test/cases/if.postfix.styl +0 -110
  327. data/vendor/test/cases/if.selectors.css +0 -16
  328. data/vendor/test/cases/if.selectors.styl +0 -22
  329. data/vendor/test/cases/if.styl +0 -99
  330. data/vendor/test/cases/import.basic/a.styl +0 -5
  331. data/vendor/test/cases/import.basic/b.styl +0 -5
  332. data/vendor/test/cases/import.basic/c.styl +0 -3
  333. data/vendor/test/cases/import.basic.css +0 -11
  334. data/vendor/test/cases/import.basic.styl +0 -4
  335. data/vendor/test/cases/import.complex/a.styl +0 -4
  336. data/vendor/test/cases/import.complex/c.styl +0 -2
  337. data/vendor/test/cases/import.complex/nested/b.styl +0 -4
  338. data/vendor/test/cases/import.complex.css +0 -9
  339. data/vendor/test/cases/import.complex.styl +0 -1
  340. data/vendor/test/cases/import.index/vendor/a.styl +0 -2
  341. data/vendor/test/cases/import.index/vendor/b.styl +0 -2
  342. data/vendor/test/cases/import.index/vendor/c.styl +0 -2
  343. data/vendor/test/cases/import.index/vendor/index.styl +0 -4
  344. data/vendor/test/cases/import.index.css +0 -9
  345. data/vendor/test/cases/import.index.styl +0 -2
  346. data/vendor/test/cases/import.literal.css +0 -2
  347. data/vendor/test/cases/import.literal.styl +0 -3
  348. data/vendor/test/cases/import.mixins.css +0 -7
  349. data/vendor/test/cases/import.mixins.styl +0 -9
  350. data/vendor/test/cases/import.ordering/five.styl +0 -2
  351. data/vendor/test/cases/import.ordering/four.styl +0 -4
  352. data/vendor/test/cases/import.ordering/two.styl +0 -2
  353. data/vendor/test/cases/import.ordering.css +0 -15
  354. data/vendor/test/cases/import.ordering.styl +0 -12
  355. data/vendor/test/cases/important.css +0 -6
  356. data/vendor/test/cases/important.styl +0 -6
  357. data/vendor/test/cases/interpolation.properties.css +0 -40
  358. data/vendor/test/cases/interpolation.properties.styl +0 -56
  359. data/vendor/test/cases/introspection.css +0 -7
  360. data/vendor/test/cases/introspection.styl +0 -14
  361. data/vendor/test/cases/jquery.css +0 -3
  362. data/vendor/test/cases/jquery.styl +0 -5
  363. data/vendor/test/cases/keyframes.css +0 -9
  364. data/vendor/test/cases/keyframes.fabrication.css +0 -18
  365. data/vendor/test/cases/keyframes.fabrication.defaults.css +0 -45
  366. data/vendor/test/cases/keyframes.fabrication.defaults.styl +0 -9
  367. data/vendor/test/cases/keyframes.fabrication.styl +0 -11
  368. data/vendor/test/cases/keyframes.newlines.css +0 -45
  369. data/vendor/test/cases/keyframes.newlines.styl +0 -7
  370. data/vendor/test/cases/keyframes.styl +0 -6
  371. data/vendor/test/cases/kwargs.css +0 -63
  372. data/vendor/test/cases/kwargs.styl +0 -74
  373. data/vendor/test/cases/list.css +0 -3
  374. data/vendor/test/cases/list.styl +0 -3
  375. data/vendor/test/cases/literal.color.css +0 -10
  376. data/vendor/test/cases/literal.color.styl +0 -9
  377. data/vendor/test/cases/literal.css +0 -10
  378. data/vendor/test/cases/literal.styl +0 -18
  379. data/vendor/test/cases/media.css +0 -14
  380. data/vendor/test/cases/media.styl +0 -11
  381. data/vendor/test/cases/mixin.conditional.css +0 -19
  382. data/vendor/test/cases/mixin.conditional.styl +0 -36
  383. data/vendor/test/cases/mixin.order.conditional.css +0 -11
  384. data/vendor/test/cases/mixin.order.conditional.styl +0 -20
  385. data/vendor/test/cases/mixin.order.css +0 -9
  386. data/vendor/test/cases/mixin.order.nested.css +0 -9
  387. data/vendor/test/cases/mixin.order.nested.styl +0 -21
  388. data/vendor/test/cases/mixin.order.styl +0 -20
  389. data/vendor/test/cases/mixins/box.styl +0 -11
  390. data/vendor/test/cases/mixins.complex.css +0 -30
  391. data/vendor/test/cases/mixins.complex.fix-to.css +0 -15
  392. data/vendor/test/cases/mixins.complex.fix-to.styl +0 -28
  393. data/vendor/test/cases/mixins.complex.styl +0 -41
  394. data/vendor/test/cases/mixins.conditional.css +0 -3
  395. data/vendor/test/cases/mixins.conditional.styl +0 -8
  396. data/vendor/test/cases/mixins.nested.css +0 -7
  397. data/vendor/test/cases/mixins.nested.selectors.css +0 -21
  398. data/vendor/test/cases/mixins.nested.selectors.styl +0 -31
  399. data/vendor/test/cases/mixins.nested.styl +0 -14
  400. data/vendor/test/cases/mixins.order.2.css +0 -11
  401. data/vendor/test/cases/mixins.order.2.styl +0 -16
  402. data/vendor/test/cases/mixins.reset.css +0 -75
  403. data/vendor/test/cases/mixins.reset.styl +0 -27
  404. data/vendor/test/cases/mixins.return.css +0 -4
  405. data/vendor/test/cases/mixins.return.styl +0 -8
  406. data/vendor/test/cases/mixins.root.css +0 -3
  407. data/vendor/test/cases/mixins.root.styl +0 -5
  408. data/vendor/test/cases/operator.range.css +0 -15
  409. data/vendor/test/cases/operator.range.styl +0 -23
  410. data/vendor/test/cases/operators.assignment.function.css +0 -15
  411. data/vendor/test/cases/operators.assignment.function.styl +0 -34
  412. data/vendor/test/cases/operators.assignment.mixin.css +0 -15
  413. data/vendor/test/cases/operators.assignment.mixin.styl +0 -39
  414. data/vendor/test/cases/operators.assignment.root.css +0 -25
  415. data/vendor/test/cases/operators.assignment.root.styl +0 -55
  416. data/vendor/test/cases/operators.complex.css +0 -9
  417. data/vendor/test/cases/operators.complex.styl +0 -32
  418. data/vendor/test/cases/operators.css +0 -40
  419. data/vendor/test/cases/operators.equality.css +0 -55
  420. data/vendor/test/cases/operators.equality.styl +0 -55
  421. data/vendor/test/cases/operators.in.css +0 -37
  422. data/vendor/test/cases/operators.in.styl +0 -51
  423. data/vendor/test/cases/operators.mixins.css +0 -10
  424. data/vendor/test/cases/operators.mixins.styl +0 -25
  425. data/vendor/test/cases/operators.precedence.css +0 -51
  426. data/vendor/test/cases/operators.precedence.styl +0 -82
  427. data/vendor/test/cases/operators.styl +0 -96
  428. data/vendor/test/cases/operators.subscript.assign.css +0 -21
  429. data/vendor/test/cases/operators.subscript.assign.styl +0 -45
  430. data/vendor/test/cases/operators.subscript.css +0 -59
  431. data/vendor/test/cases/operators.subscript.range.css +0 -14
  432. data/vendor/test/cases/operators.subscript.range.styl +0 -15
  433. data/vendor/test/cases/operators.subscript.styl +0 -81
  434. data/vendor/test/cases/page.css +0 -16
  435. data/vendor/test/cases/page.styl +0 -17
  436. data/vendor/test/cases/parent.css +0 -32
  437. data/vendor/test/cases/parent.styl +0 -33
  438. data/vendor/test/cases/properties.colons.css +0 -8
  439. data/vendor/test/cases/properties.colons.styl +0 -10
  440. data/vendor/test/cases/properties.css +0 -4
  441. data/vendor/test/cases/properties.one-line.css +0 -10
  442. data/vendor/test/cases/properties.one-line.styl +0 -11
  443. data/vendor/test/cases/properties.styl +0 -4
  444. data/vendor/test/cases/property-access.bubble.css +0 -38
  445. data/vendor/test/cases/property-access.bubble.styl +0 -46
  446. data/vendor/test/cases/property-access.css +0 -48
  447. data/vendor/test/cases/property-access.siblings.css +0 -19
  448. data/vendor/test/cases/property-access.siblings.styl +0 -20
  449. data/vendor/test/cases/property-access.styl +0 -62
  450. data/vendor/test/cases/regression.107.lookup-failure.css +0 -12
  451. data/vendor/test/cases/regression.107.lookup-failure.styl +0 -13
  452. data/vendor/test/cases/regression.127.css +0 -3
  453. data/vendor/test/cases/regression.127.styl +0 -2
  454. data/vendor/test/cases/regression.130.css +0 -16
  455. data/vendor/test/cases/regression.130.styl +0 -6
  456. data/vendor/test/cases/regression.131.css +0 -7
  457. data/vendor/test/cases/regression.131.styl +0 -2
  458. data/vendor/test/cases/regression.137.css +0 -7
  459. data/vendor/test/cases/regression.137.styl +0 -7
  460. data/vendor/test/cases/regression.139.css +0 -5
  461. data/vendor/test/cases/regression.139.styl +0 -21
  462. data/vendor/test/cases/regression.142.css +0 -39
  463. data/vendor/test/cases/regression.142.styl +0 -54
  464. data/vendor/test/cases/regression.146.css +0 -30
  465. data/vendor/test/cases/regression.146.styl +0 -31
  466. data/vendor/test/cases/regression.153.css +0 -8
  467. data/vendor/test/cases/regression.153.styl +0 -9
  468. data/vendor/test/cases/regression.154.css +0 -8
  469. data/vendor/test/cases/regression.154.styl +0 -14
  470. data/vendor/test/cases/regression.156.css +0 -4
  471. data/vendor/test/cases/regression.156.styl +0 -6
  472. data/vendor/test/cases/regression.212.css +0 -15
  473. data/vendor/test/cases/regression.212.styl +0 -14
  474. data/vendor/test/cases/regression.216.css +0 -10
  475. data/vendor/test/cases/regression.216.styl +0 -8
  476. data/vendor/test/cases/regression.220.css +0 -5
  477. data/vendor/test/cases/regression.220.styl +0 -5
  478. data/vendor/test/cases/regression.229.css +0 -12
  479. data/vendor/test/cases/regression.229.styl +0 -9
  480. data/vendor/test/cases/regression.233.css +0 -6
  481. data/vendor/test/cases/regression.233.styl +0 -7
  482. data/vendor/test/cases/regression.235.css +0 -11
  483. data/vendor/test/cases/regression.235.styl +0 -13
  484. data/vendor/test/cases/regression.243.css +0 -3
  485. data/vendor/test/cases/regression.243.styl +0 -4
  486. data/vendor/test/cases/regression.244.css +0 -3
  487. data/vendor/test/cases/regression.244.styl +0 -3
  488. data/vendor/test/cases/regression.247.css +0 -6
  489. data/vendor/test/cases/regression.247.styl +0 -6
  490. data/vendor/test/cases/regression.248.compressed.css +0 -4
  491. data/vendor/test/cases/regression.248.compressed.styl +0 -10
  492. data/vendor/test/cases/regression.252.css +0 -13
  493. data/vendor/test/cases/regression.252.styl +0 -13
  494. data/vendor/test/cases/regression.260.css +0 -6
  495. data/vendor/test/cases/regression.260.styl +0 -6
  496. data/vendor/test/cases/regression.267.css +0 -3
  497. data/vendor/test/cases/regression.267.styl +0 -3
  498. data/vendor/test/cases/regression.270.css +0 -5
  499. data/vendor/test/cases/regression.270.styl +0 -7
  500. data/vendor/test/cases/regression.272.css +0 -11
  501. data/vendor/test/cases/regression.272.styl +0 -17
  502. data/vendor/test/cases/regression.274.css +0 -14
  503. data/vendor/test/cases/regression.274.styl +0 -16
  504. data/vendor/test/cases/regression.292.css +0 -3
  505. data/vendor/test/cases/regression.292.styl +0 -3
  506. data/vendor/test/cases/regression.360.css +0 -19
  507. data/vendor/test/cases/regression.360.styl +0 -1
  508. data/vendor/test/cases/regression.368.css +0 -4
  509. data/vendor/test/cases/regression.368.styl +0 -3
  510. data/vendor/test/cases/regression.379.css +0 -6
  511. data/vendor/test/cases/regression.379.styl +0 -10
  512. data/vendor/test/cases/regression.380.css +0 -8
  513. data/vendor/test/cases/regression.380.styl +0 -14
  514. data/vendor/test/cases/regression.388.css +0 -2
  515. data/vendor/test/cases/regression.388.styl +0 -6
  516. data/vendor/test/cases/regression.415.css +0 -5
  517. data/vendor/test/cases/regression.415.styl +0 -3
  518. data/vendor/test/cases/regression.420.css +0 -21
  519. data/vendor/test/cases/regression.420.styl +0 -29
  520. data/vendor/test/cases/regression.432.css +0 -5
  521. data/vendor/test/cases/regression.432.styl +0 -4
  522. data/vendor/test/cases/regression.440.css +0 -5
  523. data/vendor/test/cases/regression.440.styl +0 -7
  524. data/vendor/test/cases/regression.449.css +0 -9
  525. data/vendor/test/cases/regression.449.styl +0 -10
  526. data/vendor/test/cases/regression.458.css +0 -3
  527. data/vendor/test/cases/regression.458.styl +0 -3
  528. data/vendor/test/cases/regression.460.css +0 -13
  529. data/vendor/test/cases/regression.460.styl +0 -18
  530. data/vendor/test/cases/regression.469.css +0 -4
  531. data/vendor/test/cases/regression.469.styl +0 -6
  532. data/vendor/test/cases/regression.472.css +0 -10
  533. data/vendor/test/cases/regression.472.styl +0 -23
  534. data/vendor/test/cases/regression.475.css +0 -6
  535. data/vendor/test/cases/regression.475.styl +0 -7
  536. data/vendor/test/cases/regression.480.css +0 -9
  537. data/vendor/test/cases/regression.480.styl +0 -12
  538. data/vendor/test/cases/regression.484.css +0 -9
  539. data/vendor/test/cases/regression.484.styl +0 -8
  540. data/vendor/test/cases/regression.498.css +0 -8
  541. data/vendor/test/cases/regression.498.styl +0 -11
  542. data/vendor/test/cases/regression.499.css +0 -14
  543. data/vendor/test/cases/regression.499.styl +0 -20
  544. data/vendor/test/cases/regression.503.css +0 -65
  545. data/vendor/test/cases/regression.503.styl +0 -7
  546. data/vendor/test/cases/regression.504.css +0 -65
  547. data/vendor/test/cases/regression.504.styl +0 -12
  548. data/vendor/test/cases/regression.524.css +0 -4
  549. data/vendor/test/cases/regression.524.styl +0 -7
  550. data/vendor/test/cases/regression.535.css +0 -3
  551. data/vendor/test/cases/regression.535.styl +0 -9
  552. data/vendor/test/cases/regression.536.css +0 -3
  553. data/vendor/test/cases/regression.536.styl +0 -5
  554. data/vendor/test/cases/reset.css +0 -70
  555. data/vendor/test/cases/reset.styl +0 -16
  556. data/vendor/test/cases/rule.charset.css +0 -1
  557. data/vendor/test/cases/rule.charset.styl +0 -2
  558. data/vendor/test/cases/rulset.css +0 -4
  559. data/vendor/test/cases/rulset.newline.css +0 -5
  560. data/vendor/test/cases/rulset.newline.styl +0 -5
  561. data/vendor/test/cases/rulset.styl +0 -3
  562. data/vendor/test/cases/scope.complex.css +0 -10
  563. data/vendor/test/cases/scope.complex.styl +0 -16
  564. data/vendor/test/cases/scope.css +0 -5
  565. data/vendor/test/cases/scope.nested.css +0 -9
  566. data/vendor/test/cases/scope.nested.styl +0 -10
  567. data/vendor/test/cases/scope.styl +0 -12
  568. data/vendor/test/cases/selector.interpolation.css +0 -57
  569. data/vendor/test/cases/selector.interpolation.styl +0 -45
  570. data/vendor/test/cases/selectors.complex.css +0 -28
  571. data/vendor/test/cases/selectors.complex.styl +0 -27
  572. data/vendor/test/cases/selectors.css +0 -50
  573. data/vendor/test/cases/selectors.nested.comma.css +0 -9
  574. data/vendor/test/cases/selectors.nested.comma.styl +0 -8
  575. data/vendor/test/cases/selectors.nested.css +0 -34
  576. data/vendor/test/cases/selectors.nested.styl +0 -33
  577. data/vendor/test/cases/selectors.pseudo.css +0 -27
  578. data/vendor/test/cases/selectors.pseudo.elements.css +0 -26
  579. data/vendor/test/cases/selectors.pseudo.elements.styl +0 -29
  580. data/vendor/test/cases/selectors.pseudo.styl +0 -24
  581. data/vendor/test/cases/selectors.styl +0 -46
  582. data/vendor/test/cases/self-assignment.css +0 -3
  583. data/vendor/test/cases/self-assignment.styl +0 -4
  584. data/vendor/test/cases/vargs.call.css +0 -24
  585. data/vendor/test/cases/vargs.call.styl +0 -40
  586. data/vendor/test/cases/vargs.css +0 -30
  587. data/vendor/test/cases/vargs.styl +0 -49
  588. data/vendor/test/cases/variable.css +0 -3
  589. data/vendor/test/cases/variable.styl +0 -4
  590. data/vendor/test/cases/variables.css +0 -12
  591. data/vendor/test/cases/variables.styl +0 -17
  592. data/vendor/test/images/gif +0 -0
  593. data/vendor/test/images/squirrel.jpeg +0 -0
  594. data/vendor/test/images/tux.png +0 -0
  595. data/vendor/test/run.js +0 -169
@@ -1,122 +0,0 @@
1
-
2
- ## @keyframes
3
-
4
- Stylus supports the `@keyframes` at-rule, which is converted to `@-webkit-keyframes` when compiled:
5
-
6
-
7
- @keyframes pulse
8
- 0%
9
- background-color red
10
- opacity 1.0
11
- -webkit-transform scale(1.0) rotate(0deg)
12
- 33%
13
- background-color blue
14
- opacity 0.75
15
- -webkit-transform scale(1.1) rotate(-5deg)
16
- 67%
17
- background-color green
18
- opacity 0.5
19
- -webkit-transform scale(1.1) rotate(5deg)
20
- 100%
21
- background-color red
22
- opacity 1.0
23
- -webkit-transform scale(1.0) rotate(0deg)
24
-
25
- yielding:
26
-
27
- @-webkit-keyframes pulse {
28
- 0% {
29
- background-color: red;
30
- opacity: 1;
31
- -webkit-transform: scale(1) rotate(0deg);
32
- }
33
-
34
- 33% {
35
- background-color: blue;
36
- opacity: 0.75;
37
- -webkit-transform: scale(1.1) rotate(-5deg);
38
- }
39
-
40
- 67% {
41
- background-color: green;
42
- opacity: 0.5;
43
- -webkit-transform: scale(1.1) rotate(5deg);
44
- }
45
-
46
- 100% {
47
- background-color: red;
48
- opacity: 1;
49
- -webkit-transform: scale(1) rotate(0deg);
50
- }
51
-
52
- }
53
-
54
- ## Expansion
55
-
56
- By using `@keyframes`, your rules are automatically expanded to the vendor prefixes defined by the `vendors` variable (default: `webkit moz official`). This means we can alter it at any time for the expansion to take effect immediately.
57
-
58
- For example, consider the following:
59
-
60
- @keyframes foo {
61
- from {
62
- color: black
63
- }
64
- to {
65
- color: white
66
- }
67
- }
68
-
69
- This expands to our two default vendors, and the official syntax:
70
-
71
- @-moz-keyframes foo {
72
- 0% {
73
- color: #000;
74
- }
75
-
76
- 100% {
77
- color: #fff;
78
- }
79
- }
80
- @-webkit-keyframes foo {
81
- 0% {
82
- color: #000;
83
- }
84
-
85
- 100% {
86
- color: #fff;
87
- }
88
- }
89
- @keyframes foo {
90
- 0% {
91
- color: #000;
92
- }
93
-
94
- 100% {
95
- color: #fff;
96
- }
97
- }
98
-
99
- If we wanted to limit to the official syntax only, simply alter `vendors`:
100
-
101
- vendors = official
102
-
103
- @keyframes foo {
104
- from {
105
- color: black
106
- }
107
- to {
108
- color: white
109
- }
110
- }
111
-
112
- Yielding:
113
-
114
- @keyframes foo {
115
- 0% {
116
- color: #000;
117
- }
118
-
119
- 100% {
120
- color: #fff;
121
- }
122
- }
@@ -1,34 +0,0 @@
1
-
2
- ## Keyword Arguments
3
-
4
- Stylus supports keyword arguments, or "kwargs". These allow you to reference arguents by their associated parameter name.
5
-
6
- The examples shown below are functionally equivalent. However, we can
7
- place keyword arguments anywhere within the list. The remaining arguments
8
- that are _not_ keyed will be applied to the parameters that have not
9
- been satisfied.
10
-
11
- body {
12
- color: rgba(255, 200, 100, 0.5);
13
- color: rgba(red: 255, green: 200, blue: 100, alpha: 0.5);
14
- color: rgba(alpha: 0.5, blue: 100, red: 255, 200);
15
- color: rgba(alpha: 0.5, blue: 100, 255, 200);
16
- }
17
-
18
- Yielding:
19
-
20
- body {
21
- color: rgba(255,200,100,0.5);
22
- color: rgba(255,200,100,0.5);
23
- color: rgba(255,200,100,0.5);
24
- color: rgba(255,200,100,0.5);
25
- }
26
-
27
-
28
- To see what parameters a function or mixin accept, use the `p()` function:
29
-
30
- p(rgba)
31
-
32
- Yielding:
33
-
34
- inspect: rgba(red, green, blue, alpha)
@@ -1,16 +0,0 @@
1
- ## Literal CSS
2
-
3
- If for any reason Stylus cannot accommodate a specific need, you can always resort to literal CSS with `@css`:
4
-
5
-
6
- @css {
7
- body {
8
- font: 14px;
9
- }
10
- }
11
-
12
- Compiling to:
13
-
14
- body {
15
- font: 14px;
16
- }
data/vendor/docs/media.md DELETED
@@ -1,18 +0,0 @@
1
-
2
- ## @media
3
-
4
- The `@media` works just as it does within regular CSS, but with Stylus's block notation:
5
-
6
- @media print
7
- #header
8
- #footer
9
- display none
10
-
11
- Yielding:
12
-
13
- @media print {
14
- #header,
15
- #footer {
16
- display: none;
17
- }
18
- }
@@ -1,72 +0,0 @@
1
-
2
- ## Connect Middleware
3
-
4
- Stylus ships with Connect middleware for auto-compiling Stylus sheets whenever they're modified.
5
-
6
- ## stylus.middleware(options)
7
-
8
- Return Connect middleware with the given `options`.
9
-
10
- #### Options
11
-
12
- `force` When __true__ styles will always re-compile
13
- `src` Source directory used to find .styl files
14
- `dest` Destination directory used to output .css files
15
- when undefined defaults to `src`.
16
- `compress` Whether the output .css files should be compressed
17
- `compile` Custom compile function, accepting the arguments
18
- `(str, path)` returning the renderer.
19
- `firebug` Emits debug infos in the generated css that can
20
- be used by the FireStylus Firebug plugin
21
- `linenos` Emits comments in the generated css indicating
22
- the corresponding stylus line
23
-
24
- #### Examples
25
-
26
- Here we set up the custom compile function so that we may
27
- alter the renderer by providing additional settings.
28
-
29
- By default, the compile function simply sets the `filename`
30
- and renders the CSS.
31
-
32
- function compile(str, path) {
33
- return stylus(str)
34
- .import(__dirname + '/css/mixins/blueprint')
35
- .import(__dirname + '/css/mixins/css3')
36
- .set('filename', path)
37
- .set('warn', true)
38
- .set('compress', true);
39
- }
40
-
41
- Pass the middleware to Connect, grabbing `.styl` files from this directory
42
- and saving `.css` files to _./public_. Also supplying our custom `compile` function.
43
-
44
- Following that, we have a `staticProvider` layer setup to serve the `.css`
45
- files generated by Stylus.
46
-
47
- var stylus = require('stylus');
48
-
49
- var server = connect.createServer(
50
- stylus.middleware({
51
- src: __dirname
52
- , dest: __dirname + '/public'
53
- , compile: compile
54
- })
55
- , connect.staticProvider(__dirname + '/public')
56
- );
57
-
58
- When `force` is used, the styles will unconditionally be re-compiled. But even without this option, the Stylus middleware is smart enough to detect changes in `@import`ed files.
59
-
60
- For development purposes, you can enable the `firebug` option if you want to
61
- use the [FireStylus extension for Firebug](//github.com/LearnBoost/stylus/blob/master/docs/firebug.md)
62
- and/or the `linenos` option to emit debug info in the generated CSS.
63
-
64
- function compile(str, path) {
65
- return stylus(str)
66
- .import(__dirname + '/css/mixins/blueprint')
67
- .import(__dirname + '/css/mixins/css3')
68
- .set('filename', path)
69
- .set('warn', true)
70
- .set('firebug', true)
71
- .set('linenos', true);
72
- }
@@ -1,138 +0,0 @@
1
-
2
- ## Mixins
3
-
4
- Both mixins and functions are defined in the same manner, but they are applied in different ways.
5
-
6
- For example, we have a `border-radius(n)` function defined below, which is invoked as a _mixin_ (i.e., invoked as a statement, rather than part of an expression).
7
-
8
- When `border-radius()` is invoked within a selector, the properties are expanded and copied into the selector.
9
-
10
- border-radius(n)
11
- -webkit-border-radius n
12
- -moz-border-radius n
13
- border-radius n
14
-
15
- form input[type=button]
16
- border-radius(5px)
17
-
18
- Compiles to:
19
-
20
- form input[type=button] {
21
- -webkit-border-radius: 5px;
22
- -moz-border-radius: 5px;
23
- border-radius: 5px;
24
- }
25
-
26
- When using mixins you can omit the parentheses altogether, providing fantastic transparent vendor property support!
27
-
28
- border-radius(n)
29
- -webkit-border-radius n
30
- -moz-border-radius n
31
- border-radius n
32
-
33
- form input[type=button]
34
- border-radius 5px
35
-
36
- Note that the `border-radius` within our mixin is treated as a property, and not a recursive function invocation.
37
-
38
- To take this further, we can utilize the automatic `arguments` local variable, containing the expression passed, allowing multiple values to be passed:
39
-
40
- border-radius()
41
- -webkit-border-radius arguments
42
- -moz-border-radius arguments
43
- border-radius arguments
44
-
45
- Now we can pass values like `border-radius 1px 2px / 3px 4px`!
46
-
47
- Another great use of this is the addition of transparent support for vendor-specifics—such as `opacity` support for IE:
48
-
49
- support-for-ie ?= true
50
-
51
- opacity(n)
52
- opacity n
53
- if support-for-ie
54
- filter unquote('progid:DXImageTransform.Microsoft.Alpha(Opacity=' + round(n * 100) + ')')
55
-
56
- #logo
57
- &:hover
58
- opacity 0.5
59
-
60
- Rendering:
61
-
62
- #logo:hover {
63
- opacity: 0.5;
64
- filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=50);
65
- }
66
-
67
- ### Parent References
68
-
69
- Mixins may utilize the parent reference character `&`, acting on the parent instead of further nesting.
70
-
71
- For example, let's say we want to create a `stripe(even, odd)` mixin for striping table rows. We provide both `even` and `odd` with default color values, and assign the `background-color` property on the row. Nested within the `tr` we use `&` to reference the `tr`, providing the `even` color.
72
-
73
- stripe(even = #fff, odd = #eee)
74
- tr
75
- background-color odd
76
- &.even
77
- &:nth-child(even)
78
- background-color even
79
-
80
- We may then utilize the mixin as shown below:
81
-
82
- table
83
- stripe()
84
- td
85
- padding 4px 10px
86
-
87
- table#users
88
- stripe(#303030, #494848)
89
- td
90
- color white
91
-
92
- Alternatively, `stripe()` could be defined without parent references:
93
-
94
- stripe(even = #fff, odd = #eee)
95
- tr
96
- background-color odd
97
- tr.even
98
- tr:nth-child(even)
99
- background-color even
100
-
101
- If we wished, we could invoke `stripe()` as if it were a property:
102
-
103
- stripe #fff #000
104
-
105
- ### Mixing Mixins in Mixins
106
-
107
- Mixins can (of course!) utilize other mixins, building upon their own selectors and properties.
108
-
109
- For example, below we create `comma-list()` to inline (via `inline-list()`) and comma-separate an unordered list.
110
-
111
-
112
- inline-list()
113
- li
114
- display inline
115
-
116
- comma-list()
117
- inline-list()
118
- li
119
- &:after
120
- content ', '
121
- &:last-child:after
122
- content ''
123
-
124
- ul
125
- comma-list()
126
-
127
- Rendering:
128
-
129
- ul li:after {
130
- content: ", ";
131
- }
132
- ul li:last-child:after {
133
- content: "";
134
- }
135
- ul li {
136
- display: inline;
137
- }
138
-