- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Fri, 19 Aug 2011 14:50:06 -0700
- To: Brian Manthos <brianman@microsoft.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
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 21:51:00 UTC