CSS - font-face with multiple urls
See original GitHub issueOriginal:
@font-face {
font-family: "coolremote";
src: url("/fonts/coolremote.eot");
src: url("/fonts/coolremote.eot?#iefix") format("embedded-opentype"),
url("/fonts/coolremote.woff") format("woff"),
url("/fonts/coolremote.ttf") format("truetype"),
url("/fonts/coolremote.svg#coolremote") format("svg");
font-weight: normal;
font-style: normal;
}
Formatted:
@font-face {
font-family: "coolremote";
src: url("/fonts/coolremote.eot");
src: url("/fonts/coolremote.eot?#iefix") format("embedded-opentype"),
url("/fonts/coolremote.woff") format("woff"), url("/fonts/coolremote.ttf") format("truetype"),
url("/fonts/coolremote.svg#coolremote") format("svg");
font-weight: normal;
font-style: normal;
}
Expected (break after comma all the way till ;
):
@font-face {
font-family: "coolremote";
src: url("/fonts/coolremote.eot");
src: url("/fonts/coolremote.eot?#iefix") format("embedded-opentype"),
url("/fonts/coolremote.woff") format("woff"),
url("/fonts/coolremote.ttf") format("truetype"),
url("/fonts/coolremote.svg#coolremote") format("svg");
font-weight: normal;
font-style: normal;
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:6 (4 by maintainers)
Top Results From Across the Web
If multiple sources are listed in an @font-face, are all of them ...
Multiple @font-face rules can be used to construct font families with a variety of faces. Using CSS font matching rules, a user agent...
Read more >How to use @font-face in CSS
The @font-face rule allows custom fonts to be loaded on a webpage. Once added to a stylesheet, the rule instructs the browser to...
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 >Using multiple font files the right way - HackSoft
Having multiple font files for a single font can lead to a messy css if you don't know how to use them all...
Read more >How to Setup Custom Fonts with CSS & @font-face
Step 1: Get all the font files you need for cross-browser support · Step 2: Add the font files to your project ·...
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 Free
Top 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
@kachkaev Increase
--print-width
to see the issue:Prettier 1.19.1 Playground link
Input:
Output:
Other example:
input
output
expected