user1486133
user1486133

Reputation: 1487

JetBrains PhpStorm highlights font-face TTF formatting as wrong

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:

enter image description here

Upvotes: 0

Views: 372

Answers (1)

LazyOne
LazyOne

Reputation: 165393

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.

Upvotes: 3

Related Questions