W3C home > Mailing lists > Public > www-style@w3.org > March 2001

Re: Proposal: dimension expressions

From: Sampo Syreeni <decoy@iki.fi>
Date: Sun, 4 Mar 2001 14:48:31 +0200 (EET)
To: David Eisenberg <david@catcode.com>
cc: <www-style@w3.org>, Bert Bos <Bert.Bos@sophia.inria.fr>
Message-ID: <Pine.SOL.4.30.0103041439130.3565-100000@kruuna.Helsinki.FI>
On Fri, 2 Mar 2001, David Eisenberg wrote:

>Thus allowing you to solve the liquid layout problem by specifying
>  .index-class {width: 25%-22px; margin: 5px; padding: 6px; }
>  .content-class {width: 75%-14px; margin: 3px; padding: 4px; }

This is a very familiar problem to me, and what I've thought is that the
containing box's width and height should be available as units. So instead
of saying width:50%, you could say e.g. width:0.5w; padding:0.25w. The
one for height could be 1h... This would not necessitate much new syntax,
just two new relative units with wider applicability than the one you get
with percentage values. It would also make absolute positioning people
happy, since you could now say height:1w for a rectangular box. Easy, no
arithmetic and looks like existing CSS. Undetermined units could be treated
as 'auto', like in the rest of the spec. And it would solve most of my own
troubles regarding table width calculation, especially when the box-sizing
(or whatever...) attribute you mentioned is implemented as well.

Sampo Syreeni <decoy@iki.fi>, aka decoy, student/math/Helsinki university
Received on Sunday, 4 March 2001 07:48:40 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:57 UTC