Stylus ParseError: expected "indent", got "outdent"
Asked Answered
I

6

18

Stylus ParseError: expected "indent", got "outdent"

Unable to compile Stylus file app/css/app.styl to CSS: ParseError: app/css/provider.styl:22
   18|  padding-top: 20px
   19|  text-align: center
   20|  border-bottom: 1px solid white
   21|  margin-bottom: 25px
 > 22| 
   23| .aclass
   24|  display: none
   25| 

expected "indent", got "outdent"

What am I doing wrong here? Thanks for any information on this error!

Interlanguage answered 6/7, 2011 at 8:42 Comment(0)
I
11

found some hidden white space

:/ watch out!

Interlanguage answered 6/7, 2011 at 10:37 Comment(5)
also, don't forget you can skip the : if you want.Eulaheulalee
what hidden whitespace? i have the same problem and can't for the life of me figure out how to fix this?Emalia
there were some spaces that weren't visible, not sure how they got in there possibly from copy and pasting codeInterlanguage
When dealing with indent-based languages, it's often beneficial to set your text editor to "show invisibles".Warlock
@JimmyMiller mine was 8 lines up where I had .d7d7d7 instead of #d7d7d7.Confectionery
B
17

I tend to get this when converting CSS files from other libraries. Usually, it has to do with a nearby rule that contains a filter property.

When a rule contains any Microsoft "progid" you need to escape the entire value.

filter: unqoute("progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b80ff', endColorstr='#1d66d3', GradientType=0)")
-ms-filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=50)")

And finally, Stylus has a build-in alpha function so you need to escape it with unquote it like so:

filter: unquote("alpha(opacity=50)")
Bengal answered 6/12, 2013 at 17:22 Comment(0)
I
11

found some hidden white space

:/ watch out!

Interlanguage answered 6/7, 2011 at 10:37 Comment(5)
also, don't forget you can skip the : if you want.Eulaheulalee
what hidden whitespace? i have the same problem and can't for the life of me figure out how to fix this?Emalia
there were some spaces that weren't visible, not sure how they got in there possibly from copy and pasting codeInterlanguage
When dealing with indent-based languages, it's often beneficial to set your text editor to "show invisibles".Warlock
@JimmyMiller mine was 8 lines up where I had .d7d7d7 instead of #d7d7d7.Confectionery
D
3

Got same error message when I forgot to quote a path.

error:

.bg-img-001
   background-image imgs/img-001.jpg

no error:

.bg-img-001
   background-image 'imgs/img-001.jpg'
Doublepark answered 30/1, 2018 at 11:23 Comment(0)
L
1

I've had this issue when i've mixed using spaces for indentation and tabs for indentation.

A good way to see if you're doing that is to select the text using Sublime 2-- tabs are bars and spaces are dots in selected text.

In the end i converted the spaces to tabs.

Landgrabber answered 8/7, 2014 at 0:42 Comment(0)
B
1

I got this error because I had a class that started with a number.

.1080spacer
  z-index 1

etc. The error appeared on the next class declaration line. Once I moved the number to the end of the class, the error went away. Like this:

.spacer1080
  z-index 1

That solved it for me.

Boyla answered 22/11, 2015 at 19:54 Comment(0)
C
0

Mine was 8 lines up where I had .e7e7e7 instead of #e7e7e7.

Confectionery answered 26/4, 2022 at 1:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.