W3C home > Mailing lists > Public > www-style@w3.org > February 2012

[css3-transforms] Why do we need a 'perspective' property?

From: Aryeh Gregor <ayg@aryeh.name>
Date: Mon, 6 Feb 2012 14:44:15 -0500
Message-ID: <CAKA+Ax=AGxw8Zo3xa3NDFxeVyh86MAL3TLVJxTcVBPZfiZ5W7w@mail.gmail.com>
To: Simon Fraser <smfr@me.com>, Dean Jackson <dino@apple.com>, David Hyatt <hyatt@apple.com>, Chris Marrin <cmarrin@apple.com>, "Edward O'Connor" <eoconnor@apple.com>, Vincent Hardy <vhardy@adobe.com>, Dirk Schulze <dschulze@adobe.com>
Cc: www-style@w3.org, Matt Woodrow <mwoodrow@mozilla.com>
We have a perspective() function already for transforms.  Why do we
also need a separate 'perspective' property?  If I want something like

<div style="height:100px;width:100px;perspective:1000px">
<div style="height:100px;width:100px;background:lime;
Some text</div></div>

why can't I just do

<div style="height:100px;width:100px;background:lime;
transform:perspective(1000px) rotatex(45deg)">
Some text</div>

instead?  Handling of 'perspective' seems to complicate 3D transforms
significantly, particularly the way it only applies to children and
not other descendants, and I don't understand the benefit.
Received on Monday, 6 February 2012 19:45:05 UTC

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