- From: Brian Manthos <brianman@microsoft.com>
- Date: Fri, 19 Aug 2011 22:14:14 +0000
- To: Tab Atkins Jr. <jackalmage@gmail.com>
- CC: "www-style@w3.org" <www-style@w3.org>
Most properties don't do something useful when you map them to infinity. That's why I picked 0. But yah, whatever value the committee comes up with is fine. I'm just saying "don't kill the expression format, kill the edge case". -----Original Message----- From: Tab Atkins Jr. [mailto:jackalmage@gmail.com] Sent: Friday, August 19, 2011 2:50 PM To: Brian Manthos Cc: www-style@w3.org Subject: Re: [CSS3 Values] referencing width or height explicitly On Fri, Aug 19, 2011 at 1:54 PM, Brian Manthos <brianman@microsoft.com> wrote: > That seems like the tail wagging the dog to me. I agree; I was just explaining the reason it was that way. > When the "calc(5px / (10px - 10%) )" resolves to "calc(5px / 0)", mapping that to a known value (like 0) seems reasonable. That doesn't seem sensical. Surely it should map to infinity px? > Let's take another example... > div { > width: calc( > 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002px / 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001); > } > > Should "really precise" applications treat this as valid at parse time with a resolved value of "2px" and "not so precise" applications treat this at parse time as invalid? Yes, that's generally true. Even if there wasn't a prohibition against division by 0, less precise applications would see it as 0px/0, which does not give "2px" as an answer. (It doesn't even have a reasonable-but-invalid answer like "infinity px" - 0/0 is straight-up indeterminate.) ~TJ
Received on Friday, 19 August 2011 22:14:42 UTC