I am trying to use stylus a css preprocessor with twitter bootstrap version 2.04. When I download boostrap I run "stylus --css < bootstrap.css > bootstrap.styl" so that I can create a bootstrap.styl file. However I get the following error when my browser tries to parse bootstrap.styl
ParseError: /Users/user/Projects/node_tutorials/project/static/css/bootstrap.styl:1835
1831| background-position: -313px -119px
1832|
1833| .icon-retweet
1834| background-position: -336px -120px
> 1835|
1836| .icon-shopping-cart
1837| background-position: -360px -120px
1838|
expected "indent", got "outdent"
at Parser.error (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:166:11)
at Parser.expect (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:194:12)
at Parser.block (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:597:12)
at Parser.selector (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:1099:24)
at Parser.property (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:1013:47)
at Parser.ident (/Users//Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:970:25)
at Parser.stmt (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:546:25)
at Parser.statement (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:458:21)
at Parser.block (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:609:21)
at Parser.selector (/Users/user/Projects/node_tutorials/project/node_modules/stylus/lib/parser.js:1099:24)
I've checked for additional whitespace and have even hexdumped the file and nothing appears to be wrong. Can anyone identify the problem?
@Jonathan is right. the problem is caused by filter
I found a workaround using stylus function unquote
just do a regex replace filter: (.+)$
=> filter: unquote("\1")
to bootstrap.styl
Did you check the indentation of the entire file? This sort of message can often be caused by an error located well before the parser sees something wrong.