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

I thought this message went to www-style, but it seems I was wrong. Forward
to www-style.

---------- Forwarded message ----------
From: Xidorn Quan <quanxunzhen@gmail.com>
Date: Thu, Apr 7, 2016 at 10:51 AM
Subject: Re: [css-transforms] Value for perspective() function
To: Mike Taylor <miket@mozilla.com>


On Thu, Apr 7, 2016 at 9:40 AM, Mike Taylor <miket@mozilla.com> wrote:

> Hey Xidorn,
>
> On 4/4/16 5:44 PM, Xidorn Quan wrote:
>
>>  > 2. Making 0 invalid for floating-point values violates our rules for
>>  > limited ranges, as it makes valid values an open range; it means that
>>  > whether a *perfectly valid* value might become invalid due to browser
>>  > rounding differently than expected. The spec should instead define a
>>  > minimum perspective and clamp values to that.  Negative values can
>>  > remain invalid.
>>
>> Yeah... I believe Gecko has some bug due to rounding for this transform
>> function.
>>
>> Then I guess we should make it valid. But treating it as
>> "perspective(infinity)" actually has the same rounding issue as marking
>> it invalid. So probably we should, as I suggested above, handle it as
>> infinitesimal, and then the corresponding component in the matrix
>> becomes infinity.
>>
>
> So does this mean that perspective(0) would be "ignored", or rather, valid
> that does nothing? Do we have an open bug to track this, or should we wait
> on spec updates?


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.

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.

- Xidorn

Received on Thursday, 7 April 2016 03:23:49 UTC