Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

expected "indent", got "outdent"

Tags:

css

stylus

  ParseError: /Users/JMiller/Projects/multisport-momentum/public/stylesheets/style.styl:15

  11|     color #031634
  12| }
  13| a {
  14|     color font.color
> 15|     text-decoration none
  16| }
  17| 
  18| .header

  expected "indent", got "outdent"

What does this mean? It has something to do with whitespace? What whitespace? How do I fix this?

like image 820
Jimmy Miller Avatar asked Mar 22 '12 01:03

Jimmy Miller


2 Answers

The problem here is error reporting more than anything else. Dots . are not allowed in stylus variable names (nor mixin names), so renaming font.color to e.g. font-color will solve your problem.

like image 99
Linus Thiel Avatar answered Sep 21 '22 17:09

Linus Thiel


Write property through the colon. For Example:

fontFamily = {
   primary: unquote ("'Open Sans', sans-serif")
}

font-family: fontFamily.primary

WebStorm swears on this syntax. For this to change, add $ before the variable. For Example:

$fontFamily = {
   primary: unquote ("'Open Sans', sans-serif")
}

font-family: $fontFamily.primary
like image 37
Антон Масаллимов Avatar answered Sep 20 '22 17:09

Антон Масаллимов