question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken url path in font-face

See original GitHub issue

Environment

  • jsDelivr using clean-css v5.2.2

Input CSS bootstrap-icons.css

@font-face {
  font-family: "bootstrap-icons";
  src: url("./fonts/bootstrap-icons.woff2?e2f6e48459d8b0f394eea57aba940179") format("woff2"),
url("./fonts/bootstrap-icons.woff?e2f6e48459d8b0f394eea57aba940179") format("woff");
}

Actual output CSS bootstrap-icons.min.css

@font-face{font-family:bootstrap-icons;src:url("../fonts/bootstrap-icons.woff2?e2f6e48459d8b0f394eea57aba940179") format("woff2"),url("../fonts/bootstrap-icons.woff?e2f6e48459d8b0f394eea57aba940179") format("woff")}

Expected output CSS

@font-face{font-family:bootstrap-icons;src:url("./fonts/bootstrap-icons.woff2?e2f6e48459d8b0f394eea57aba940179") format("woff2"),url("./fonts/bootstrap-icons.woff?e2f6e48459d8b0f394eea57aba940179") format("woff")}

This causes a 404 error in the .woff and woff2 font files. This behavior does not occur in clean-css v4.2.4.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
MartinKolarikcommented, Feb 3, 2022

Thanks, @jakubpawlowicz, I believe the issue can be closed then.

0reactions
jakubpawlowiczcommented, Feb 4, 2022

Cool, closing it now, please reopen if needed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Broken url path in font-face · Issue #18371 - GitHub
We're going to fix this by tweaking our clean-css config as it seems to be an intentional change in v5. 👍 ...
Read more >
css - @font-face not working - Stack Overflow
@font-face { font-family: Gotham; src: url(. ... The problem with the path is that I am referring to the font from my CSS...
Read more >
font-face - CSS: Cascading Style Sheets - MDN Web Docs
Chrome Edge @font‑face Full support. Chrome1. Toggle history Full support... OpenType CBDT and CBLC rendering Full support. Chrome66. Toggle history Full support... OpenType COLRv0 rendering Full...
Read more >
IE @font-face CSS hack URL broken by CDN module's ...
I've modified the patch to only apply to paths containing ".eot?#" and allow any variation of the hash and moved the check to...
Read more >
Optimize WebFont loading and rendering - web.dev
Using <link rel="preload"> will trigger a request for the WebFont early in the ... During this period, if the font face is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found