Re: Dreams aloud

> Lachlan Hunt
> > Actually the idea is deeper on second look:
> >
> > width: 100px;
> > width: 50% (min:20px, max:100px);
>    This idea is reasonable, but the syntax is not.  I believe something
> equivelant has been discussed previously.  min() and max() functions,
> which could be introduced when a calc() function is introduced would
> provide much more flexibility.

Traditionally min(something1, something2) means minimum from this values.
So this notation will confuse those who knows e.g. JavaScript where min is
In our case min is not a function but a parameter-constrain.

Min/max constraints is a property of relative unit values like em,ex,%,%%.
Min/max are not independent entities.

font-size: 3em (min:10pt, max:20pt);

Choices are:
width: 50% (min:20px, max:100px)
here 50% is a function name and at the same time its main value.
It calculates as occurs calculation of percentage - in runtime. That is main
with calc() approach - it calculates once.

Also we may consider different brackets like
50% [min:20px, max:100px]
50% {min:20px, max:100px}

For clearnes of formal grammatic/syntax rules "( ... )" is better.

Try to imagine that in document having 5 independent styles applied someone
set e.g.  p{ min-width:50%; max-width:20em } at the very first sheet.


Andrew Fedoniouk.

Received on Tuesday, 29 June 2004 12:19:04 UTC