[css-transforms] Value for perspective() function

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