Fallbacks

I really like your proposal [1], though I think it would be even better 
if _every_ single property could have a comma separated fallback.

Lets take 'font' for example. There are quite some designers who "hate" 
'Verdana' for being to big, however, it is also a "nice" font (for 
Windows). If 'font' was extended the way you described:

   font:80% Verdana,100% Arial,sans-serif;

Designers could actually use the font without creating 
accessibility/usability problems. Some properties only apply in "a good 
way" to certain fonts, extending 'font' in such a way would make it 
possible to apply these properties only to that font.

When a browser comes across that would happen to support 'Verdana' it 
will load that font, if a browser doesn't found that font in its font 
database it will go the next "serie" and tries to load the font 
specified there (it will check if it supports all the specified 
properties as well).

(Note that for backwards compatibility reasons it might be better that 
the next "serie" inherit _all_ the values from the previous "serie", 
unless they are overwritten of course.)

Such an extension for every property is also very good for backwards 
compatibility. Lot's of people wanted a '@useragent' or '@support' rule, 
having a comma separated list that isn't really necessary anymore (if it 
was necessary in the first place is a different topic).

Take the 'color' property. If it is extended in newer versions with a 
'change-red-amount()' value and CSS3 introduced the comma separated 
fallback we could have this:

   color:change-red-amount(255),red;

CSS3 parsers would ignore the first value and give the element a red 
color. Future parser may support the first value and will change only 
the amount of red in the color and ignore the last property.

[1] <http://lists.w3.org/Archives/Public/www-style/2004Apr/0113.html>


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>

Received on Tuesday, 13 April 2004 02:13:36 UTC