W3C home > Mailing lists > Public > www-style@w3.org > October 2005

Re: Syntax for Ranges?

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Sat, 29 Oct 2005 23:43:37 +1000
Message-ID: <43637C89.4050301@lachy.id.au>
To: Anne van Kesteren <fora@annevankesteren.nl>
CC: Kelly Miller <lightsolphoenix@gmail.com>, www-style@w3.org

Anne van Kesteren wrote:
> Quoting Lachlan Hunt <lachlan.hunt@lachy.id.au>:
>>> height: range(18px,30em) - No smaller than 18px, no larger than 30em.
>> So, what height would it be?  Any random height between 18px and 30em?
> I guess the same as what would happen with:
> min-height:18px; max-height:30em

Perhaps, assuming height: auto; as well, in which case the result is 
already well defined.  But there would need to be a 3rd value in the 
range() function, as suggested by Ben Ward, for the cases where it's not 

>> min(), max() and calc() functions have all been suggested previously 
>> and make a lot more sense than this.
> Those are not the same.

They're not the same, but could possibly be used to the same effect.
   height: min(30em, max(18px, 50%) );

That is theoretically equivalent to:
   min-height:18px; max-height:30em; height: 50%;

Lachlan Hunt
Received on Saturday, 29 October 2005 13:43:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:21 UTC