Sass file watcher: @font-face / font-family missing

Hello,

I'm trying to include a local web font using the file watchers 'Sass' and 'YUI compressor CSS'.
Overall this works fine, except for my @font-face rule.

My current code is
@font-face
font-family: "FONTNAME"
src: url("/path/to/fonts/FONTNAME.ttf") format("truetype")

The output in the CSS file is just
src:url("/path/to/fonts/FONTNAME.ttf") format("truetype")
(the font-face/font-family part is missing)

Any ideas what the problem might be?

Cheers,
Jochen

3 comments

BTW, the 'font-family' and 'src' lines in my Sass code are indented correctly.

0

can't recreate.

Do you compile your .sass with 'Sass' and then transpile generated .css with 'YUI compressor CSS'? Please try disabling the latter - does the generated .css include 'font-family'? What do your file watchers settings look like (arguments, programs being used)?

0

Hi Elena,

thanks for mentioning the YUI compressor. This pointed me in the right direction.

The problem had to do with a programming error on my side. PhpStorm worked fine!

Cheers, Jochen

1

Please sign in to leave a comment.