View Single Post
Old 01-22-2013, 07:38 AM   #7
mzmm
Groupie
mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.mzmm has not lost his or her sense of wonder.
 
mzmm's Avatar
 
Posts: 156
Karma: 86115
Join Date: Feb 2012
Device: iPad, Kindle Touch, Sony PRS-T1
Quote:
Originally Posted by Jellby View Post
Shouldn't they be quoted too (at least where there are spaces)?
er, yes, i guess that's best practice, although according to CSS 2.1 it's not absolutely necessary. CSS 2.1 states that

"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.

If a sequence of identifiers is given as a font family name, the computed value is the name converted to a string by joining all the identifiers in the sequence by single spaces."

so a reader will(should) compute that

Code:
Palatino Linotype
=

Code:
"Palatino Linotype"
there would only be a problem if the font name were to contain a digits, punctuation, or reserved keywords like 'inherit', 'serif', 'sans-serif', 'monospace', 'fantasy', or 'cursive', in which case the tokens should be escaped or the font names should be quoted.

CSS 2.1 on font-family here: http://www.w3.org/TR/CSS2/fonts.html#font-family-prop

Last edited by mzmm; 01-22-2013 at 07:42 AM.
mzmm is offline   Reply With Quote