ThisIsManta / stylus-supremacy

A Node.js script that helps formatting Stylus files.
https://thisismanta.github.io/stylus-supremacy
MIT License
88 stars 9 forks source link

parenthesis get added to calculus #55

Open Cactusbone opened 5 years ago

Cactusbone commented 5 years ago

Using command line and options:

    "stylusSupremacy.insertSpaceInsideParenthesis": false,
    "stylusSupremacy.insertParenthesisAfterNegation": false,
    "stylusSupremacy.insertParenthesisAroundIfCondition": false,

I'm not expecting parenthesis to be added :

ThisIsManta commented 4 years ago

Thanks for reporting this.

Dealing with parentheses is always a hassle because there is no explicit representation of a parenthesis in Stylus AST generated by Stylus compiler (only nested Expression objects).

I do have a plan to refactor the formatter so it will handle this better, but no ETA though. Please bear with me.

aleclarson commented 3 years ago

+1 to this :)

Note that if you minify your CSS before shipping it, the extra parentheses are harmless