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

[css-transforms] editing issue with 0 value for 'perspective'

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Tue, 5 Jan 2016 17:27:41 +0100
To: www-style@w3.org
Message-ID: <4fec8a8e-8957-51b6-4572-39aade8c5f4a@disruptive-innovations.com>
I do have an interoperability - and spec clarification - issue about the
'perspective' property. [1] says all length values must be positive.
I think a former version of the document was saying that 0 values were
similar to "no perspective". If we made a decision about making 0-based
values invalid, sorry, I missed it and in that case I suggest to revert
that decision.

I did test the three browsers I have here on OS X:

- Gecko treats 'perspective: 0px' as a CSS error (46.0a1 (2016-01-04))
- Blink does the same (47.0.2526.106 (64-bit))
- WebKit does NOT treat it as an error.

WebKit's behaviour is in my opinion the more reasonable one.
This is an issue to me for BlueGriffon because all our positive valid
value spaces are in the [somevalue, +∞[ form. This property introduces
a ]somevalue, +∞[ interval and it's painful to have to write more
validating code for a single property. It's also very convenient to
offer an initial '0px'  value (meaning 'none') when the user wants to
apply a perspective and let him/her increase it freely. This is
impossible if '0px' is invalid.

I recommend then a clarification of the specification making 0-based
length values valid for 'perspective' and meaning the same as "none".
If this is accepted, Gecko and Blink would have to fix their current
behaviour.

[1] https://drafts.csswg.org/css-transforms/#perspective-property

</Daniel>
Received on Tuesday, 5 January 2016 16:28:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC