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

Andrew Fedoniouk wrote:
> 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 %%.

The problem David pointed out is that what elements are in the current line 
would depend on the width of the <input>.  Thus you have a circular dependency. 
  Consider the following markup:

<P style="width: 200px">from:<input style="width:100%%"> more text</p>

All of the following renderings satisfy the conditions you expressed above:

1)

   from: [                 ]
   more text

(input is 200px minus width of "from: " wide).

2)

   from: [            ] more
   text

(input is 200px minus width of "from: " and width of " more" wide).

3)

   from: [       ] more text

(input is 200px minus width of "from: " and width of " more text" wide).


> Is this formal enough?

Apparently not, since there are three renderings which are all valid per the 
description.  Hence the information provided is not enough to create 
interoperable implementations.

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

Sure.  None of the breaking rules need changing in the above examples.

> 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.

I would be more impressed if you could write a description of the algorithm that 
would be implementable by someone _else_ in those browsers.  That's what Ian 
asked you to do and what you have failed to do.

-Boris

Received on Monday, 10 May 2004 03:10:40 UTC