openstyles / stylus

Stylus - Userstyles Manager
https://add0n.com/stylus.html
GNU General Public License v3.0
5.46k stars 305 forks source link

[Bug] Descendant selector AND general sibling selector with curly bracket in new line causes error #1730

Closed wykopx closed 10 months ago

wykopx commented 10 months ago

Bug Report

Bug Description

When you put descendant selector (div span) or general sibling selector (div ~ span) and also use curly brackets to group css properties and put the opening bracket in a new line like this:

image

image

you will get an error:

image

This error is not occuring for child selector (div > span)

image

and also not occuring for adjacent sibling selector (div + span)

image

The error is not occuring for descendant selector and general sibling selector when you put opening curly bracket in the same line:

image

Example Stylus style for testing:

https://userstyles.world/style/14118/descendant-selector-and-general-sibling-selector

tophf commented 10 months ago

It's a bug in the preprocessor, nothing we can do about it. You can see the same in https://stylus-lang.com/try.html