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

Re: CSS: %% length unit. Proposal.

From: Max Romantschuk <max@provico.fi>
Date: Fri, 07 May 2004 09:48:28 +0300
Message-ID: <409B313C.1000104@provico.fi>
To: www-style@w3.org

Boris Zbarsky wrote:
> Yes, but _when_ the calculation happens is key.  Also, conversion to px 
> is lossy in many cases, leading to rounding issues.
> 
> I'm not sure what I think of the %% proposal yet, but calc() has some 
> issues that would need to be ironed out....

My experience with doing CSS-based bar graphs showed that calculating 
pixels as floating point values and rounding them to integers at the 
last possible moment worked best. If you use integers to do complex 
calculations you are sure to end up with aliasing problems.

I would imagine many renderers work like this already, as we would 
probably end up with overlapping and/or gaps in fluid layouts otherwise.

-- 
Max Romantschuk
http://max.nma.fi/
Received on Friday, 7 May 2004 02:48:49 GMT

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