3 ms·
Nice post, and a good explanation of how CSS handles identifiers and strings. But I can't figure out why you'd want to specify a font-family without using quote
by taylorfausak 15y ago
Nice post, and a good explanation of how CSS handles identifiers and strings. But I can't figure out why you'd want to specify a font-family without using quotes. To save two bytes?
- jedahan 15y agoBy using a string you are specifying on a particular installed font. For doing a fallback where the system chooses the particular appropriate font within a family, using the identifier form is better. See sans-serif vs. 'sans-serif' in that article.
- taylorfausak 15y agoI understand that CSS' generic fonts must be given as an identifier. I was wondering why you'd want to give a specific font family without quotes. These are equivalent, but I don't get why you'd use the former: font-family: Helvetica Neue, Helvetica, sans-serif; font-family: 'Helvetica Neue', 'Helvetica', sans-serif;
- mathias 15y agoWhy not? :)