WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Stripping quotes breaks font-family with double spaces #1054

@heypiotr

Description

@heypiotr

We have CSS that defines a font face, which we we minify using Lightning CSS:

@font-face {
  font-family: "HW Impey  Bold";
  src: url("https://framerusercontent.com/assets/eHJXMAuuWuyUyN6atg5CoJTAWRo.woff2");
  font-display: block;
}

Note the double space after "Impey".

Then in another place, we have CSS that uses the font, which we don't minify:

h1 {
  font-family: "HW Impey  Bold", sans-serif;
}

The font-face rule gets minfied to font-family:HW Impey Bold, which seems to cause a mis-match and the font doesn't work:

https://codesandbox.io/p/sandbox/gg67sx
https://gg67sx.csb.app/

Would it make sense to keep the quotes if the font-family includes multiple consecutive (white-)spaces?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions