2

I have some CSS Stylus code which compiles perfectly on CodePen:

for i in (1..3)
  $keyframe-name = (name + i)
    @keyframes {$keyframe-name} 
      0% 
        height 0
      75% 
        height 10px
      100%

However, when I compile in Prepros I get the following error;

css/style.styl:3
   1| 
   2| for i in (1..3)
 > 3|   $keyframe-name = (name + i)
   4|     @keyframes {$keyframe-name} 
   5|       0% 
   6|         height 0

cannot coerce 1 to ident

What am I doing wrong?

TylerH
  • 20,799
  • 66
  • 75
  • 101
user43251
  • 225
  • 1
  • 11

2 Answers2

2

For anyone interested, I figured out a workaround to get it working in Prepros:

for i in (1..3)

    $keyframe-name = "name" + i + ""

        @keyframes $keyframe-name
            0% 
                height 0
            75% 
                height 10px
            100%

Don't know why there's a difference though.

user43251
  • 225
  • 1
  • 11
2

Prepros just using an older version of Stylus. Codepen — 0.47.1, Prepros — 0.46.3.

Panya
  • 2,679
  • 2
  • 18
  • 17
  • Codepen — http://codepen.io/versions, Prepros — https://github.com/Subash/Prepros/blob/master/application/package.json – Panya Aug 20 '14 at 11:41