Broken url path in font-face
See original GitHub issueEnvironment
- 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:
- Created 2 years ago
- Comments:9
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, @jakubpawlowicz, I believe the issue can be closed then.
Cool, closing it now, please reopen if needed.