Since 0.45.0
, stylus is not throwing errors when the top parent selector is indented.
In 0.44.0
.element
color: #fff
Is throwing an error:
{ [ParseError: stylus:1
> 1| .element
2| color: #fff
3|
unexpected "space"
]
name: 'ParseError',
message: 'stylus:1\n > 1| .element\n 2| color: #fff\n 3| \n\nunexpected "space"\n'
}
In 0.52.4
, is compiled to:
.element {
color: #fff;
}
That's valid, but when there is a wrong indented comment before, the source is producing unexpected output without throwing an error:
.element
.child-1
color: #fff
// wrong indent
.child-2
color: #fff
.element .child-1 {
color: #fff;
}
.child-2 {
color: #fff;
}