Skip to content

Unary minus must not be followed by a space in LESS #13998

@mvorisek

Description

@mvorisek

Current version of Prettier is adding a space after unary minus operator in LESS.

Config:

module.exports = {
    tabWidth: 4,
    overrides: [
        {
            files: ['*.less'],
            options: {
                parser: 'less',
            },
        },
    ],
};

Wrong autoformat:

 .xxx {
-    margin: 0 -(@arrowBorderWidth / 2) 0 0;
+    margin: 0 - (@arrowBorderWidth / 2) 0 0;
 }

I would expect no fix/added space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:lessIssues affecting Less-specific syntax (not plain CSS)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions