Skip to content

SCSS removing space when it shouldn't #5636

@jerelmiller

Description

@jerelmiller

Prettier 1.15.3
Playground link

--parser scss

Input:

.result-container {
  @include transition(min-height ($spacer/2) ease-in-out);
}

Output:

.result-container {
  @include transition(min-height($spacer/2) ease-in-out);
}

Expected behavior:

That space between min-height and the math should be left alone. With the space removed, this unfortunately results in some invalid CSS as its now treated as a CSS function instead of the property name. This results in something similar to the the following CSS when compiled by Sass

// Incorrect
.result-container {
  transition: min-height(50px) ease-in-out;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lessIssues affecting CSS, Less or SCSSpriority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions