vendor/docs/iteration.md in stylus-source-0.22.6 vs vendor/docs/iteration.md in stylus-source-0.23.0
- old
+ new
@@ -9,11 +9,11 @@
body
for num in 1 2 3
foo num
-yields:
+Yields:
body {
foo: 1;
foo: 2;
foo: 3;
@@ -24,22 +24,24 @@
body
fonts = Impact Arial sans-serif
for font, i in fonts
foo i font
-yielding:
+Yielding:
body {
foo: 0 Impact;
foo: 1 Arial;
foo: 2 sans-serif;
}
### Mixins
- We may utilize iteration within mixins to produce powerful functionality, for example we can apply expression pairs as properties using interpolation and iteration. Below we define `apply()`, conditionally utilizing all the `arguments` so that comma-delimited _and_ expression lists are supported:
+ We can use iteration within mixins to produce powerful functionality. For example, we can apply expression pairs as properties using interpolation and iteration.
+ Below we define `apply()`, conditionally utilizing all the `arguments` so that comma-delimited _and_ expression lists are supported:
+
apply(props)
props = arguments if length(arguments) > 1
for prop in props
{prop[0]} prop[1]
@@ -50,12 +52,12 @@
list = (one 1) (two 2) (three 3)
apply(list)
### Functions
- Stylus functions may also contain for-loops, below are some example use-cases:
+ Stylus functions may also contain for-loops. Below are some example use-cases:
-sum:
+Sum:
sum(nums)
sum = 0
for n in nums
sum += n
\ No newline at end of file