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

Re: auto units versus 'auto' value, was Re: vertical-align

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 21 May 2004 14:33:17 -0700
Message-ID: <001f01c43f7b$3badcdf0$1902000a@AFedoniouk>
To: <ernestcline@mindspring.com>
Cc: "W3C Style List" <www-style@w3.org>

>
> "auto" is used in many properties whose actual value
> is not a <length>, so defining <auto> as: <number>%% | auto
> and replacing "auto" in the definitions with <auto> is nonsense.
>
> That is unless you'd care to explain what you would do with:
> {cursor:25%%}

Good example. Thanks, Ernest.

The main idea of %% is exactly to solve "amorphity" of 'auto' in places
where it used as a width of free space.

See, in cursor: it means exactly 'any'.
In <div style="margin:auto"> it means for some reasons 50% from free space
in inner box of container.
In <div style="margin-left:auto"> it means 100% from free space.

Personally I think that instead of 'auto' in widths/heights, margins,
paddings, borders is better (more strict if you wish) to express your
intention this way:

div style="margin:50%%"

or even

div style="margin-left:25%%; margin-right:75%%"

why not?  it is not changing anything in principle!

E.g. default blockquote layout behavior is better to define as:

BLOCKQUOTE {
    padding-left:20px;
    padding-right:20px;
    width:100%%; /* rest of what left from paddings margins etc. */
}

as it strictly defines what is going on. Versus current fuzzy width:auto
definition.


>
> You've effectively defined '%%' as a specialized <length>.

Beg my pardon if I was not clear enough somewhere.

I am positioning %% on the same level as <length> and <precentage>. Not
inside any of them.
As 'auto' does not belongs to <length> nor <percentage>.

<length> | <percentage> | <percentage-from-free-space>


> Why %% doesn't work with 'font-size' I don't know as I haven't
> followed the thread.  (It might produce a computed value
> outside the range allowed for 'font-size', but all that would do
> is require it to be increased until it was within the actual range.
> But if it cannot be made to work with all occurrences of <length>
> it will be necessary to specify explicitly the properties that
> it works with.

By definition %% is percent from containers free space along axis at current
block position.

You cannot say font-size = 120% from container height, no way.
In the same way you cannot use e.g. font-size:120%%.

Is it make sense at all:  x = 5oz + 10meters?

>
> Personally, if such a construct is defined in CSS I would
> prefer that it use a unit of '*' because of the analogy with
> HTML multilengths. and the idea that if the sum of the %%'s
> is always defined to be the greater of 100 or the actual sum
> is a ludicrous idea in my opinion.
>

If this max(100,totalsum) gives you flexibility to say "i wan't this to be
50% from free space and rest I want to be unoccupied" then why not?

I've already published this link here with %% demonstration:

http://terrainformatica.com/w3/p2/scrollbar.htm

And I have a question: is it possible using current or proposed CSS to reach
the same layout?
I am pretty sure - no.

%% units has been implemented in my experimental HTML renderer.
If somebody would like to see %% alive just drop me a message.

Andrew Fedoniouk.
http://terrainformatica.com
Received on Friday, 21 May 2004 17:33:24 GMT

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