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

[css-transforms] Value for perspective() function

From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Mon, 4 Apr 2016 11:12:53 +1000
Message-ID: <CAMdq69_54_c3k46rQnynr7k88_aqpRAoH3KcC+zYHac2bYCbYA@mail.gmail.com>
To: www-style list <www-style@w3.org>
Hi,

The spec says, for value inside perspective() function:
> The value for depth must be greater than zero, otherwise the function is
invalid. [1]

However, there there is a statement in the spec saying that perspective(0)
is an netural function [2]. Either this one or the description above should
be changed somehow.

Currently, Gecko treats perspective(0) as invalid per spec, and thus drops
the transform decl, while others treat that as perspective(infinity) (or
probably just ignore it), which becomes a webcompat issue [3], and there is
discussion for the Compatibility Standard [4].

It seems to me treating perspective(0) as perspective(infinity) doesn't
make sense anyway. The spec should probably either change to making it
completely invalid, or treating it as an infinitesimal small non-zero
value, which might benefit animation.


[1] https://drafts.csswg.org/css-transforms/#funcdef-perspective
[2] https://drafts.csswg.org/css-transforms/#neutral-element
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1009150
[4] https://github.com/whatwg/compat/issues/48

- Xidorn
Received on Monday, 4 April 2016 01:14:01 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:58 UTC