W3C home > Mailing lists > Public > www-style@w3.org > May 2004

Re: CSS: %% length unit. Proposal. Some clarifications.

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Sun, 9 May 2004 23:59:26 -0700
Message-ID: <005501c4365c$55861c00$0301a8c0@ATHLON>
To: "L. David Baron" <dbaron@dbaron.org>, <www-style@w3.org>

David, let me repeat what I wrote in one of the previous messages

What I am saying here:
<P>from:<INPUT ... style="width:100%%" /></P>

set width of INPUT equal to 100% of  <container width minus space occupied
by all 'solid' elements in current line>
'solid' elements here means all elements having horizontal dimensions in
units other than %%.
'space occupied' means all width+padding+margin+border having values other
than %%.

Is this formal enough?

to be short: "Percentage from free space along axis"

Layout alghorithm has complexity O(n).
It is slightly modified implementation of <P style=text-align:justify>
Vertical implementation is similar.

These units will not change any existing breaking rules and any others rules
of CSS.

This is already implemented in my experimental renderer. It works. I can
demonstrate it alive. I can port this part into Mozilla, Opera, Safari, IE.
If this will help.

Andrew Fedoniouk.
http://terrainformatica.com



----------------------------------------------------------
L. David Baron wrote:

I am also against it.  It is an attempt to mix into inline layout things
that are conceptually unrelated to inline layout.  If you want a bunch
of things to share the horizontal space across a region, you should
describe that rather than using a line-breaking model and then saying
that one element takes x% of the rest of the available space in the
line.

Implementing this would significantly complicate line breaking.
Currently implementations can assume that elements don't change size
when moved from one line to another, except for pieces that appear (soft
hyphens) or disappear (trailing spaces) *at break points*.  This would
violate that assumption and add significant complexity to something
that's already complex enough.

The realistic use cases I've seen mentioned for this %% proposal would
be handled by a flexible box model (like XUL's box model).
Received on Monday, 10 May 2004 03:00:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:29 GMT