Skip to content

CSS type(<number>+) adds a space that breaks the css functionality #19509

Description

@bigandy

Prettier 3.9.4
Playground link

# Options (if any):
--parser css

Input:

div {
  border-radius: attr(br type(<length>+)); 
}

Output:

div {
  border-radius: attr(br type(<length> +));
}

Expected output:

div {
  border-radius: attr(br type(<length>+));
}

There should be no space between the > and the +

Why?

The type(<length>+) is only valid with no space between the > and the + so having the space breaks the functionality. See MDN article on type() or CSSWG spec

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe're a small group who can't get to every issue promptly. We’d appreciate help fixing this issue!lang:css/scss/lessIssues affecting CSS, Less or SCSS

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions