W3C home > Mailing lists > Public > www-style@w3.org > February 2003

Re: Length unit relative to media width

From: David Woolley <david@djwhome.demon.co.uk>
Date: Thu, 20 Feb 2003 07:52:34 +0000 (GMT)
Message-Id: <200302200752.h1K7qYx07208@djwhome.demon.co.uk>
To: www-style@w3.org

> Well, only if your intention is that the webpage should scale according =
> to=20
> the viewport. This might make the content too small to read, and it =
> might=20

This is a general problem with your proposal, as the screen may be too
small for your design.  Moreover, I would point out that screen widths
have never been the basis of default widths in CSS, only ever viewport
(by which I really mean window) widths.  (Note that on X, windows can be
larger than the screen.  That would also be sensible for PDAs.)

You should note that, whilst it might appear to be relative, from the
point of view of the Web Content Accessibility guidelines, fonts 
described in terms of your unit should be considered to be absolutely
sized, and therefore require the provision of alternate means of 
access, under many legislative regimes (and moral codes).

Using sizes relative to the containing block means that the design better
tolerates style overrides and failures to take, because the relative
sizing is corrected to fit its immediate container's actual size, not
that of the whole document.  There is a catch though, in that there 
are contexts where the size of the container is defined by the size of
the content, so one would need to make sure that there were good
disambiguating rules.

> be better to have the user to choose between useing full size or =
> scrolling.

Most users who don't work full screen would prefer not to have the
designer force them into such a choice.

> Actually not a good Idea.=20
> One point is that the web-designer should be able to use the pixel sizes =

Design in pixels sizes is normally a sign of bad web design.  It means one is
designing to particular technologies, and without regard to possible vision
defects in the user, rather than designing to communicate in a medium that
was intended to be universal.

However, given that even your proposal requires fallback CSS rules to 
be coded in older units (so you still need to calculate using decimal
fractions of em's etc.), I would suggest that a better approach would
be to extend the definition of numbers in CSS to include rational numbers,
so that you can code something like 10/1440.

On the other hand, it's probably really a job for authoring software, and
you can always write a fairly simple preprocessor that can convert to 
standard number forms.

> in the design that corresponds to the screen resolution he actually is =
> useing.=20

As I said, designing in pixels is wrong.
Received on Thursday, 20 February 2003 02:52:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:06 UTC