js-beautify icon indicating copy to clipboard operation
js-beautify copied to clipboard

Extra line created for css property

Open pierrevano opened this issue 3 years ago • 1 comments

Description

Extra line created for css property

Input

The code looked like this before beautification:

@media (-moz-touch-enabled:0),
(pointer:fine) {
    .class1 button:hover, .class2 button:hover {
        color: #fff;
        background-color: #000;
    }
}

Expected Output

The code should have looked like this after beautification:

@media (-moz-touch-enabled:0),
(pointer:fine) {
    .class1 button:hover,
    .class2 button:hover {
        color: #fff;
        background-color: #000;
    }
}

Actual Output

The code actually looked like this after beautification:

@media (-moz-touch-enabled:0),
(pointer:fine) {

    .class1 button:hover,
    .class2 button:hover {
        color: #fff;
        background-color: #000;
    }
}

Steps to Reproduce

Take the first css code and try to beautify it. An extra space is created after (pointer:fine) {

Environment

OS: macOS

Settings

{
    "indent_size": 4,
    "indent_char": " ",
    "indent_level": 0,
    "indent_with_tabs": false,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "jslint_happy": false,
    "space_after_anon_function": false,
    "brace_style": "collapse,preserve-inline",
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "space_before_conditional": true,
    "break_chained_methods": false,
    "eval_code": false,
    "unescape_strings": false,
    "wrap_line_length": 0
}

pierrevano avatar Mar 18 '21 15:03 pierrevano

hello, can I work on this

achyut2000 avatar Sep 10 '21 14:09 achyut2000