WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: CSS Units of Measurement

for

From: Tim Beadle
Date: Feb 19, 2004 3:54AM


On Thu, Feb 19, 2004 at 12:09:46PM +0200, Jukka K. Korpela wrote:
> Including testing on all browsers that you have no access to, perhaps
> because they don't exist yet.

So if a new browser comes out that doesn't render it properly, we change the
CSS. After all, it's just one file for an entire site.

> Why would you hack, instead of solving problems, or not creating them in
> the first place.

OK - it's called a hack, but it's just using a parsing error in a broken
browser to solve *real world problems*. As I said before, have you used this
method? If so, are your clients happy with it? Mine are because, done correctly,
they shouldn't notice anything - the site looks 'right' in their browser (unless
they use NN4). Academic theory is all very well, but in the real world, we have
problems that need solving. Tantek's hack helps us write valid, standards-
compliant sites that are so much lighter in page weight terms than the table-
based equivalent, and accessible too.

> The keyword sizes do _not_ have well-defined meanings. They are defined
> as an ordinal scale only, with varying recommendations (and no actual
> _definition_) of how they could be mapped to physical sizes. And the only
> thing that is reasonably well defined, namely that medium should map to
> the user-chosen size, is seriously violated by IE (except on IE 6 if you
> use the magic spell to please the Great Doctype Sniffer).

So use the Magic Spell. No-one is stopping you. You don't really want to be in
Quirks Mode, anyway!

> > I thought only NN4 did this nesting effect, which I've taken out of the
> > equation by using px in an NN4-only style sheet!
>
> No, of course not. If you set font-size in percentage, it by definition
> means percentage of the parent element's font size. And browsers mostly
> get this right. But authors may not always realize what they are asking
> for.

Fair enough. As Owen Briggs points out (someone else pointed to The Noodle
Incident), if you set a percentage size on the body element, you can then
use ems in a safer way. That's now his preferred method:

"Anyhow, I played about and found you can make a nice ems stylesheet with P
text at 1.0 em, and then downsize the whole thing by selecting size in BODY
with %, like 76%. It's simple, easy to change, and works for everything. Score
1 for late nights and coffee. Enjoy."

http://www.thenoodleincident.com/tutorials/typography/index.html

A lot of this stuff is about compromise. We have much better browser support
than we did three or four years ago. Sometimes a little nudge ("hack") is
required to make IE behave. I see no problem in that.

Regards,

Tim
--
"I can't use tables anymore; it feels dirty." -- tlack


----
To subscribe, unsubscribe, suspend, or view list archives,
visit http://www.webaim.org/discussion/