W3C home > Mailing lists > Public > www-style@w3.org > April 2016

Re: [css-transforms] Value for perspective() function

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 7 Apr 2016 09:35:51 -0700
Message-ID: <CAAWBYDCzMY=yxvLyEjU6AgY0ZeCHzNV4efJJOmybZtAiZNaTtg@mail.gmail.com>
To: Xidorn Quan <quanxunzhen@gmail.com>
Cc: www-style list <www-style@w3.org>
On Wed, Apr 6, 2016 at 8:22 PM, Xidorn Quan <quanxunzhen@gmail.com> wrote:
> No, it doesn't mean it would be ignored. "perspective(infinity)" is
> something that would be ignored. I think "perspective(0)" should effectively
> hide anything with a non-zero Z value. Hmmm, non-zero Z value? Sounds like
> another hole of rounding issues... Then I have no idea.

Right, discontinuous behavior is a bad idea, even if, as in this case,
it's technically warranted.  (You can't see something when you're at
zero distance from it; it gets infinitely warped.)

The right answer is to specify that there's a UA-defined minimum
perspective length, and anything below that length (but not negative)
is clamped to it.  Negative values remain invalid.

> Actually, perspective property has exactly the same issue here.
>
> I don't think treating perspective(0) as perspective(infinity) (a.k.a
> ignoring it) is sensible, anyway.

Yes, that's *even more* discontinuous than going from "super warped"
to "invisible".

~TJ
Received on Thursday, 7 April 2016 16:36:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC