Chrome error for font family: "Invalid property value"
Asked Answered
R

1

10

The following CSS works well on IE and FireFox, but chrome marks it as "Invalid property value" -

TD.desc1_hp { font-family: Arial,Arial (Hebrew),David (Hebrew);  }

any hint why?

Thanks,

Atara

Refer answered 25/11, 2012 at 12:5 Comment(2)
Do you think arial (hebrew) will be present if arial is not?Phytobiology
Also, just to add to this, you cannot use font-family: default; either...Lomalomas
P
13

Font faces should be enclosed in double quotes. Font faces with parentheses seem to require that. This works:

TD.desc1_hp { font-family: Arial, "Arial (Hebrew)", "David (Hebrew)";  }
Phytobiology answered 25/11, 2012 at 12:10 Comment(2)
By the CSS 2.1 spec, “Font family names must either be given quoted as strings, or unquoted as a sequence of one or more identifiers. This means most punctuation characters and digits at the start of each token must be escaped in unquoted font family names.”Plowboy
@JukkaK.Korpela This shows they should be quoted as the alternative is to escape all punctuation. Thanks for the specs.Phytobiology

© 2022 - 2024 — McMap. All rights reserved.