Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Why 'variables' in CSS are harmful


Bert36 - 2:50 pm on Sep 26, 2008 (gmt 0)


And then the rest of your code doesn't need any more font-family.

I agree that 2 types of font is usually all you need. But, and this is a big but. Any substantial site will use these fonts in places where you cannot simply use them the way you depict them. You need things like:


#name > ul > li > p > a {
font-family: Arial, etc;
}

Besides, this is part of the strength of CSS: the cascading.
(Which makes me think that variables and constants should cascade as well...think of the possibilities!)

As far as preprocessing is concerned: I partially agree with you. But the essay also states that macro's and programming in general is too difficult for the average user. (load of rubbish, but that is what the writer suggests and this is what we are discussing here). The essay writer suggests that including variable and equation capabilities to CSS would make creating websites difficult for the majority of website builders. Logic therefore dictates that preprocessing should get the same argument.
Besides. When you start using preprocessing you must test your site on a (test)server. Is that not too difficult for the majority of users?

I would argue that of everything related to programming, variables and constants are the easiest to understand and to be grasped, especially compared to some of the more ambiguous things the CSS standard itself coughs up.


Thread source:: http://www.webmasterworld.com/css/3741923.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com