Skip to content

@font-face urls are incorrectly stripped of commas #14237

@drott

Description

@drott

Prettier 2.8.3
Playground link

--parser html

Input:

<style>
  @font-face {
        font-family: rob;                                                                                
        src: url(RobotoFlex-VariableFont_GRAD,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght.ttf);
   }     
</style>
    

Output:

<style>
  @font-face {
    font-family: rob;
    src: url(RobotoFlex-VariableFont_GRADXTRAYOPQYTASYTDEYTFIYTLCYTUCopszslntwdthwght.ttf);
  }
</style>

Expected behavior:

Commas in filename should be kept - I don't see why they would be invalid inside a url() CSS function.

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