These are chat archives for LearnBoost/stylus

12th
Jun 2017
Mihail Malo
@qm3ster
Jun 12 2017 09:34
@colshacol CSS-in-js
bruce
@sqram
Jun 12 2017 19:53
I think i found a bug
colors = $white #C6C6C6 #00C1A5 #00C473
for color, i in colors
  &:nth-of-type(i)
    .front
      background color
transpiles fine, except for the 'i' variable. it just goes out as i, instead of the intended index number
Mihail Malo
@qm3ster
Jun 12 2017 20:43
@sqram
colors = $white #C6C6C6 #00C1A5 #00C473
for color, i in colors
  &:nth-of-type({i})
    .front
      background color
Reading the docs saves lives;
But being a condescending douche like me saves even more.
bruce
@sqram
Jun 12 2017 21:28
i did read the docs
i saw {} under hashes
Mihail Malo
@qm3ster
Jun 12 2017 21:29
Well actually jamming the variables into the css is covered under interpolation
This message was deleted
bruce
@sqram
Jun 12 2017 21:31

I reached this example:

  body
    fonts = Impact Arial sans-serif
    for font, i in fonts
      foo i font

in here http://stylus-lang.com/docs/iteration.html

but good ot know when inside a css expression it needs {}. thanks