I've included a font in my site in .woff
, .woff2
and .ttf
formats. I'm using truetype
as the format for the .ttf
Though the code does compile, PhpStorm marks the syntax as incorrect.
My code is:
src: url('assets/icomoon.woff2') format('woff2'),
url('assets/icomoon.woff') format('woff'),
url('assets/icomoon.ttf') format ('truetype');
Here's what PhpStorm is doing:
You have
format ('truetype')
There should be no space between format
and (
.
P.S. You can also test your code here: https://jigsaw.w3.org/css-validator/#validate_by_input
Variant with space produces error while the same with no space shows all green.