Re: CSS - font-size

On Mon, 2 Apr 2001, Joe Clark wrote:
[snip]
  And anyway, the Zeldman and others have documented that the only size
  settings that work in the real world are none at all or pixels.

  <http://www.alistapart.com/stories/fear4/index.html>
  <http://www.littlegreenfootballs.com/weblog/weblog.php?y=1&amp;x=archives/00000214.htm>

CMN I think I was not clear enough. What I am arguing is that the user should
be left to set their default size. In other words, for default text you don't
set any font-size - you let the user have whatever it was they wanted in the
first place. Specifically, I think it is a bad idea to set a size on the o,
body, li, elements. I know some designers think that it looks cool to have a
fairly smallfont-size for ordinary text, but it does that at the cost of beng
able to read it, so the first thing I will do in any case is increase my font
size, and the design effect is gone.

It is only where you use font-size as one of the formatting characteristics
that distinguish different types of information - headings, emphasis and so
on, that i think you should use font-size at all, and there I think you
should use relative measures - percentages, em or ex units, so that the scale
is relative to what the user is happy with.

In other words, I agree that the best thing is nothing at all, but I disagree
that the next best is pixel sizes - percentages are reliable enough in
CSS-supporting browsers, and when I use iCab it is because I don't care about
the style sheet (that turns out to be pretty often actually - when I want
style I use something that does it properly).

cheers

chaals

  >I think the best technique is to use percentages, or em units. The
  >problem with smaller and larger is that some browsers define them as
  >a LOT smaller - to the point of being hard to read - typical use
  >cases don't go that far. But there is no intrinsic reason not to mix
  >those with percentages / ems.

  Except that you will always force a fraction of the user's preferred
  size. 0.8 em is 80% of the type size. 80% is the same as 0.8 ex, or
  80% of the user's lineheight, which is almost always assigned by the
  browser (and will cause illegibility in Netscape 4 if you set it
  manually).

  So if I specify 17pt type as my default, and you decide that 0.8 em
  is what I really meant after all, I get 17*80% or 14pt type. Did I
  ask for that, exactly?

  And if I try to fix what you did by resetting my default to 20 px, I
  still only get 16! I don't recall anyone giving you that kind of
  power-- to flat-tax my font sizes, knocking off 20% no matter what I
  do.

  And what about old browsers that misinterpret what those settings are
  a percentage *of*?

  Now, obviously, if you set the type size at 13px, that isn't what I
  wanted, either. But it is an absolute measure and will produce
  reliable results on a majority of machines. If you argue that 13px on
  a high-resolution screen is very small, well, so will everything else
  be, except maybe on Mac OS X. And we're talking about low-vision
  users; their screen resolution is effectively enlarged anyway. Even
  for nondisabled users who prefer a bigger font size, what are the
  odds that they're using a high-resolution monitor *and* an old
  browser that doesn't let them resize type?

  Besides, Charles has conceded that <smaller> and <larger> and the
  other five defined sizes don't work in the real world. Why recommend
  something else that doesn't?

  The issue of font sizes is crap all around, and nothing works
  reliably on all browsers and platforms, or even on popular browsers
  and platforms. What works least unreliably are pixels or nothing at
  all. At some point, we have to expect cooperation from low-vision
  people to upgrade to browsers that permit font resizing no matter how
  fonts are specified in the stylesheet. IE 5 on Macintosh; Opera; most
  later Explorers on Windows (with limitations); and iCab (which
  ignores stylesheets altogether) are already there. Apparently so is
  IE 6 on Windows, and Mozilla and Netscape 6 on everything save for
  Macintosh, where a conflict with Adobe Type Reunion or something has
  to be worked out.



-- 
Charles McCathieNevile    http://www.w3.org/People/Charles  phone: +61 409 134 136
W3C Web Accessibility Initiative     http://www.w3.org/WAI    fax: +1 617 258 5999
Location: 21 Mitchell street FOOTSCRAY Vic 3011, Australia
(or W3C INRIA, Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex, France)

Received on Monday, 2 April 2001 02:08:50 UTC