[Bug] Indenting when "Indent @-moz-document" unchecked
Bug Report
Bug Description
If the "Indent @-moz-document" beautify setting is unchecked, properties are no longer indented and an empty line is added below the last property.
Screenshots
System Information
- OS: Windows 10 22H2
- Browser: Firefox 108.0
- Stylus Version: 1.5.33 (& also 1.5.31)
Additional Context
I have not changed any of my beautify settings. I have confirmed that this problem persists after turning all of my styles off. I have restarted the browser several times, updated Stylus (from 1.5.31 to 1.5.31) , and have checked in another Firefox profile. My educated guess is that this bug was introduced with the recently added additional beautify settings.
Please fix soon because the beautify tool is now useless unless I enable "Indent @-moz-document" (which I will not do). I love Stylus but manually "beautifying" the code is a pain.
Sounds like our code incorrectly migrates the old settings. Try changing some setting on and off, it should help.
Sounds like our code incorrectly migrates the old settings. Try changing some setting on and off, it should help.
Wow your quick! Any settings specifically? I have already tried "on-off-ing" the editor settings in the sidebar and all the beautify settings. I can tell you that turning on "Indent @-moz-document" avoids this issue.
Try toggling any setting and then toggle it back.
Try toggling any setting and then toggle it back.
Definitely doesn't fix this issue; I've tried this multiple times. It just changes the code to look like the first photo (indented though) when toggled on, and then back to the second when toggled off. Thanks for the suggestion anyway.
In that case I don't know what is the problem. Could you run prefs.get('editor.beautify') in devtools console of the editor and paste the output here?
prefs.get('editor.beautify') Object { selector_separator_newline: false, newline_before_open_brace: false, newline_after_open_brace: true, newline_between_properties: true, newline_before_close_brace: true, newline_between_rules: true, preserve_newlines: false, end_with_newline: false, indent_conditional: true, indent_mozdoc: false, … }
I hope I have copied the right thing. And, sorry for the late replies by the way.
It's an incomplete preview of the object. Click it to expand fully so it shows the contents of ....
There's no internal problem with your settings, and I'm seeing the bug now with my own settings too, gonna investigate...
Thanks heaps
@tophf Hey. Any update on this?
It's not as trivial as I hoped because I also want to support the CSS nesting syntax. I'm contemplating rewriting the beautifier or at least reusing our existing code from one of the linters...
Alright, appreciate it.
Just wanted to say that this is still happening for me
Yeah, @tophf any plans on when this might be fixed?