- From: Brian Manthos <brianman@microsoft.com>
- Date: Tue, 11 May 2010 18:17:39 +0000
- To: Boris Zbarsky <bzbarsky@MIT.EDU>
- CC: "www-style@w3.org" <www-style@w3.org>
Having a limitation is fine. there are a growing number of property that have special behavior "at" zero. Background-size and border-radius with box-shadow are two that have been discussed recently. I would prefer that CSS define "numbers within X of zero should be treated identically to zero". Doing so makes interoperability a likelihood rather than luck. Another example that comes to mind is unit-less. IIRC, <length> values require units except for zero. Given that the "near-zero" region is open to UA-discretion, what does that imply about "0.016" as a <length>? -Brian -----Original Message----- From: Boris Zbarsky [mailto:bzbarsky@MIT.EDU] Sent: Tuesday, May 11, 2010 10:55 AM To: Brian Manthos Cc: www-style@w3.org Subject: Re: [css3-background] background-size and zero length On 5/11/10 1:49 PM, Brian Manthos wrote: > For values below 0.00833333331px, Firefox continues to show no image. Right. Lengths in Gecko are stored as integers in units that are 1/60 of a CSS px. The number above is about 1/120. So things smaller than that would would round to 0. > More fun with near-zero values in the land of interoperable browsing > challenges. It's a general problem. You have similar issues with large values. At some point, either the browser is using an infinite-precision arithmetic package for layout (unlikely given the performance impact) or you get arbitrary limitations on your values. -Boris
Received on Tuesday, 11 May 2010 18:18:17 UTC