ParseError: expected "indent", got "outdent" (using hashes)
See original GitHub issueThe following Stylus fails when not using a colon after background-color
but works with one:
Failure
$Colors = {'Red': #ff0000}
body
background-color $Colors.Red
> stylus < test.styl
/usr/local/lib/node_modules/stylus/bin/stylus:494
if (err) throw err;
^
ParseError: stdin:4
1| $Colors = {'Red': #ff0000}
2|
3| body
> 4| background-color $Colors.Red
5|
expected "indent", got "outdent"
at Parser.error (/usr/local/lib/node_modules/stylus/lib/parser.js:179:11)
at Parser.expect (/usr/local/lib/node_modules/stylus/lib/parser.js:207:12)
at Parser.block (/usr/local/lib/node_modules/stylus/lib/parser.js:688:12)
at Parser.selector (/usr/local/lib/node_modules/stylus/lib/parser.js:1224:24)
at Parser.property (/usr/local/lib/node_modules/stylus/lib/parser.js:1175:47)
at Parser.ident (/usr/local/lib/node_modules/stylus/lib/parser.js:1130:25)
at Parser.stmt (/usr/local/lib/node_modules/stylus/lib/parser.js:632:26)
at Parser.statement (/usr/local/lib/node_modules/stylus/lib/parser.js:540:21)
at Parser.block (/usr/local/lib/node_modules/stylus/lib/parser.js:700:21)
at Parser.selector (/usr/local/lib/node_modules/stylus/lib/parser.js:1224:24)
Success
$Colors = {'Red': #ff0000}
body
background-color: $Colors.Red
> stylus < test.styl
body {
background-color: #f00;
}
Issue Analytics
- State:
- Created 10 years ago
- Reactions:2
- Comments:25 (15 by maintainers)
Top Results From Across the Web
Stylus ParseError: expected "indent", got "outdent"
Usually, it has to do with a nearby rule that contains a filter property. When a rule contains any Microsoft "progid" you need...
Read more >Node.js – Stylus ParseError: expected “indent”, got “outdent”
The problem here is error reporting more than anything else. Dots . are not allowed in stylus variable names (nor mixin names), so...
Read more >[Solved]-Stylus ParseError: expected “indent”, got “;”-grunt.js
I had a similar issue but there was no identifyable character and the error kept moving lines whenever I would delete one. Turns...
Read more >Perltidy Change Log - SourceForge
One indentation space is removed to improve alignment: # OLD: perltidy -xlp ... ($expected)"); - Fix for issue git #105, incorrect formatting with...
Read more >Lightning Aura Components Developer Guide
Get Your Aura Components Ready to Use on Lightning Pages . ... Data updates behave as you would expect in JavaScript.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
guys, missing the obvious… you could go the array notation route, works just fine
i just run into the same problem. maybe the documentation on the hashes should be extended.