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

Re: CSS: %% / 'calc' length unit

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 07 May 2004 09:59:24 -0500
Message-ID: <409BA44C.60503@mit.edu>
To: "Anne van Kesteren (fora)" <fora@annevankesteren.nl>
Cc: www-style@w3.org

Anne van Kesteren (fora) wrote:
>> foo, bar { display: block; }
>> foo { width: calc(50% - 100px;) }
>> bar { width: inherit; }
>>
>> <foo>
>>   <bar />
>> </foo>
>>
>> What does bar inherit?
> 
> The computed value from FOO? (If I understand the parts about CSS 2.1 
> "computed values" and "inheritance" correctly.)

And that is?  I'm looking for specifics, not generalities. What can I replace 
the "bar { width: inherit; }" rule with that will give the same layout in this 
case without using "inherit"?  That is, what is the computed value?

>> Yes, but _when_ the calculation happens is key.  Also, conversion to 
>> px is lossy in many cases, leading to rounding issues.
> 
> Rounding should obviously be done at the latest moment possible, not?

Yes, but considering that px in CSS can be fairly arbitrarily sized, you could 
get rounding issues immediately at conversion time...

-Boris
Received on Friday, 7 May 2004 11:04:50 GMT

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