[thelist] font accessibility CSS

Randy Pearson randyp at cycla.com
Sun Oct 26 09:15:27 CST 2003


> I just recently read that it is better to use percentages(%) 
> for font sizes instead of pixels (px).  

We try to avoid either percentages or em's (which are similar), except
perhaps at known "leaf" nodes in the DOM. The reason is that these both
suffer from being multiplicative. Say you decide you want your data tables
to be slightly smaller, so you add:

  td {font-size: 90%; /* or 0.9em */}

And all looks good until someone changes a few pages to use an outer table
for layout (remember those <s>). Now the fonts all scale down to 0.9 x 0.9 =
0.81, not what you want. You *can* avoid this through careful design perhaps
using both classes and more complex CSS selectors, but we prefer something
simpler and easier to maintain.

So, we're trying to switch to almost pure keyowrd-based font sizes (small,
medium, etc.). We really like the fact that they seem to scale in all
browsers, but also I like the semantics: it's much easier to judge the
author's intent. We too are using the (CSS cross-browser hack) techniques
mentioned by others here.

-- Randy



More information about the thelist mailing list