- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Tue, 18 May 2004 10:49:32 -0700
- To: "Anne van Kesteren (fora)" <fora@annevankesteren.nl>
- Cc: Tantek Çelik <tantek@cs.stanford.edu>, <ernestcline@mindspring.com>, <www-style@w3.org>
"Note that 'calc()' will let you do a lot more and give you more
possibilities."
%% units and calc() are orthogonal in the same meaning as pixel units and
the calc().
%% units introduce concept of "free space" and give physical and strong
formal meaning to the 'auto' value which is, again, exactly 100%% in all
current use cases in the spec.
calc() could use %% units as any other.
calc() (without %%) will not allow you to define layouts like this
.fluid {
margin-left: 25%%;
border-width-left: 4px;
padding-left: 10%%;
width: 50%%;
padding-right: 5%%;
border-width-right: 10px;
margin-right: 20%%;
}
I can see only one really valuable (for me) use case of calc(). Actually not
calc() but if()
min-width: if(width-candidate-value < 10px) then 0px else 10px;
But this will force dynamic formula evaluation. Which is not the case for
the calc().
calc() computes only once - while loading. Am I right?
Andrew Fedoniouk.
http://terrainformatica.com
>
> Andrew Fedoniouk wrote:
>
> > Thanks a lot, Anne,
> >
> > Your explanation makes sense for me.
> >
> > My add-on to motivation set: only this schema really allows to use
standard
> > % length units in boxes with non null paddings and borders (margins are
> > still waiting for a solution).
>
> Well, 'calc()', when introduced, will let you do exactly that. The
> difference is that 'box-sizing' was already widely implemented were
> 'calc()' isn't even "specced" right now. (Note that 'calc()' will let
> you do a lot more and give you more possibilities.)
>
>
> --
> Anne van Kesteren
> <http://annevankesteren.nl/>
>
Received on Tuesday, 18 May 2004 13:49:40 UTC