Skip to content

[SCSS] Space removed after minus sign #4698

@dfdeagle47

Description

@dfdeagle47

Prettier 1.13.5
Playground link

# Options (if any):
--parser scss

Input:

$positions: first, second, third;
@each $position in $positions {
    #{$position} {
      left: - index($positions, $position) * 100px;
  	}
}

Output:

$positions: first, second, third;
@each $position in $positions {
  #{$position} {
    left: -index($positions, $position) * 100px;
  }
}

Expected behavior:
The space after between the minus sign and index should never be removed. Otherwise, it breaks the scss compilation with an error Undefined operation "-index(first, second, third, first) * 100px"..

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lessIssues affecting CSS, Less or SCSSlocked-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