[thelist] CSS Font Sizes, was one more thing about...

Calum I Mac Leod calum at ciml.co.uk
Sat Feb 24 15:19:47 CST 2001


Charles F. Johnson:
> Calum I Mac Leod <calum at ciml.co.uk> typed:
>
> thanks for the post, calum. you're correct about the screen  resolution
> differences -- that's the main cause of font size discrepancies. although
> (pardon my pedantry) "dots per inch" is really print terminology. "pixels
> per inch" is a better way to say it.

Fair enough, but I half expected to get picked up on my use of the word
'resolution' (in one of its several meanings).

> things would be a lot easier for web designers today if Bill Gates et al
had
> followed the Mac's early adoption of "1 pixel=1 point".

That would make it much easier for Web designers to get it wrong.  :-)

At least with the current state of affairs, people who use pt for general
Web use have a good chance of realising that they've made a mistake (even if
they don't know what it is).  If pt "worked" the same in Win and Mac then
far fewer of us would have realised why it's such a bad thing to use (in
this context).

<snip>
> > px is slightly better for screen use (mainly because a CSS px does *not*
> > always equal a pixel) but doesn't take into account user preferences.
>
> with mac ie5 and mozilla/n6 user preferences aren't an issue, since font
> size can easily be adjusted even if specified in pixels.

The ease with which some users can adjust their default font size is a very
good reason for us to leave it alone, IMO.

I'm not suggesting that WWW authors shouldn't make font-size suggestions,
just that "body,td,li { font-size = whatever; }" causes many documents to be
pretty sub-optimal for many users.  Far better for us to tweak our own
browsers.  Of course most print designers, (and their friends) like small
text.  That's not a representative sample (for almost all sites), so they
make their pages worse than if they did nothing.

The following, on the other hand, can help to style a page and allow some
graphic communication.  However, suggestions like these work _with_ the
user.

.navbar { font-size: 90%; font-weight: bold; font-family: Verdana, Arial,
Helvetica, sans-serif; }
.copyright { font-size: 70%; }
.important { font-size: 120%; }

Unfortunately we need to tread on eggshells to keep Nav4 from doing anything
too crazy, but it's not _that_ hard.

Let's face it, css.nu/pointers/bugs.html and
webreview.com/style/css1/charts/mastergrid.shtml are essential reading about
CSS, after we've familiarised with w3.org/TR/REC-CSS1

<snip>
> zeldman eloquently and thoroughly makes the case for using pixels here:
>
> http://www.alistapart.com/stories/fear4/
<snip>

Zeldman wrote:

  "In some older browsers, 12px type gets printed as 12 pixels, and those
pixels
   are computed against the printer's resolution. Got a 1200 ppi printer?
Your
   12px type could be .01 inches tall."

In the future, some older browsers (like today's) will render 12px type as
12 pixels on the screen.  Got a 1200 dpi screen? Your 12px type could be .01
inches tall.

Anyway, Zeldman's stated reason for shying away from % for fonts is that IE3
bases the size on the default (not the parent, as it should) and that some
(read: "rare") versions of WinNav4 print the text too large.  Odd, IMO, from
the author of "To Hell With Bad Browsers".

> another approach, if you're *really* concerned about not violating user
> preferences, is to eschew font specifications entirely. use nothing at
all.
> another good article on A List Apart:
>
> http://www.alistapart.com/stories/dao/index.html

A nice article.  While I agree with 80% of Zeldman's current direction,
Allsopp has, IMO, been ahead of the game for some time:

http://www.westciv.com.au/style_master/house/good_oil/

> but i think most people surfing the web actually *like* diversity in their
> displays, and probably don't override a page's fonts very often unless
it's
> simply unreadable. (like some of cnet's pages are on a mac...)

Mostly people won't go to any trouble to view a Web site, they'll just go
look somewhere else.

The main argument to ditch CSS px is simple: Why should the author set the
default font size, when the user can pick their optimum and let us base our
sized on that?  Also, some people need what most of us think of as large
text (and in some rare conditions people need small text).  The latter
argument seems most often made, but to me it's the lesser of the two (people
with visual needs are the most likely to have worked out how to override
font sizes).  To me it has more to do with good 'Web design' - we all
believe in liquid layout these days, why not liquid fonts?  (Analogy stolen
from Andrew Clover).

The other, medium term reason is that current browsers and windowing
environments do not scale px as they should for media=screen.  I'm not aware
of any browser that tries to adjust px to subtend roughly 0.0227 degrees

Most browsers can cope with high resolution printers, but what about
monitors with a fine dot pitch?  If we end up having to adjust our logical
resolution to trick the GUI into making px bigger, then we'll prevent other
applications, such as real WYSIWYG applications, from rendering lengths
correctly.  I want Microsoft Word to show an inch as an inch, exactly.  With
'doze set to 82dpi it does, but some people seem to think that I want to
view nine point text on screen.  I don't.

Choosing between pt and px for CSS is a loose-loose situation, and I don't
like those.

Calum
--






More information about the thelist mailing list