Skip to content

Consistent spacing around mathematical operators in CSS #2793

Closed

Description

@fredrikekelund

Prettier Version: 1.6.1 / master

Code

In CSS (and CSS-like languages), it would be nice if prettier could output the same consistent spacing around mathematical operators as we get in JS (a single space on each side of the operator).

Example input:

body {
    margin-left: calc(2em/2);
}

Expected behavior:
Preferred output:

body {
    margin-left: calc(2em / 2);
}

Actual behavior:
No change between input and output

Activity

  1. lydell commented on Sep 12, 2017

    @lydell
    Member

    Thanks for the issue! I'm merging this into #1811 since both issues require the same fix (implementing an arithmetic parser).

  2. fredrikekelund commented on Sep 12, 2017

    @fredrikekelund
    Author

    Alright, cool! Will keep an eye on that issue then 👍

  3. added
    type:duplicate
    on Sep 12, 2017
  4. added
    lang:css/scss/less
    on Oct 1, 2017
  5. added
    locked-due-to-inactivity
    on Jul 6, 2018
  6. locked as resolved and limited conversation to collaborators on Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lesslocked-due-to-inactivitytype:duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions