Skip to content

Prettier incorrectly adds spaces around plus sign in css urls #7906

Closed

Description

@remcohaszing

Prettier 2.0.2
Playground link

--parser css

Input:

@import url(https://fonts.googleapis.com/css?family=Noto+Sans);

Output:

@import url(https://fonts.googleapis.com/css?family=Noto + Sans);

Expected behavior:

Prettier doesn’t enclose the plus sign in a url with spaces.

Workaround:

Enclose the url content with quotes

@import url('https://fonts.googleapis.com/css?family=Noto+Sans&display=swap');

Activity

  1. added
    lang:css/scss/less
    on Mar 30, 2020
  2. alexander-akait commented on Mar 31, 2020

    @alexander-akait
    Member

    @thorn0 Duplicate, #5654 and #2835 - same problems, in theory we can union them

  3. thorn0 commented on Mar 31, 2020

    @thorn0
    Member

    Duplicate of #2835

  4. added
    type:duplicate
    and removed
    lang:css/scss/less
    on Mar 31, 2020
  5. added
    locked-due-to-inactivity
    on Jun 30, 2020
  6. locked as resolved and limited conversation to collaborators on Jun 30, 2020
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

    locked-due-to-inactivitytype:duplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions