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

> [Original Message]
> From: Andrew Fedoniouk <news@terrainformatica.com>
>
> Hi, Ian,
>
> >
> > The biggest problem I have with your idea is I don't know what you mean
by
> > "free space". *There is no such term in CSS2.1*.
> >
>
> Not exactly.
>
> Indeed, there are now "free space" in CSS expressed clearly.

Oh, and what happens with an elements such as:

<span style="min-width:20%%; width:200px" />
<span style="min-width:20opx; width:20%%" />

Does the width used by this element count against the free
space or not?

> But this principle already implemented in tables where you can
> mix columns with fixed width and columns with percents.
> Percent columns widths calculated based on free space
> concept - space left from all fixed columns.

Then why do we need %%?  CSS table layout is NOT restricted
to just the <table> element.

> %% length units (or whatever they'll be named):
>
> %% units are applicable to margin and dimension attributes (width,
height).
> %% units in margin-top, margin-bottom and height derive their values from
> container height minus heights of all siblings having heights in units
other
> than %%,
> margin-left, margin-right and width derive their values from container
> width, etc. ....

And what about border, padding, and the effect of  that property (I forget
what it's called) that decides between two different ways of calculating
what width and height are supposed to refer to?

> %% units:
>
> 1) are easy to implement. All mechanisms already implemented in browsers.
> 2) allow to reduce need of use of fixed and float positioning.
> 3) allow to reduce need of <table> for layout purposes.

This (3) can already be doe by using the table display properties of CSS 2.
The fact that IE doesn't implement them doesn't eliminate the possibility.

> 4) easy understandable by humans.
> 5) could be strongly specified in specs - will be interpreted in the same
> way in different UAs.

"Could be" and "is" are two different things.

> 6) complexity of layout algorithm is O(n) (worst case).

I'm not prepared to accept this claim without a well defined explanation
of how the %% is to be calculated, which is not something I've seen in
this thread.  In particular I have yet to see you address the issue of
min-width and max-width and they affect (or don't effect) your loosely
defined "free space".

Received on Saturday, 8 May 2004 18:48:39 UTC