Re: [css-transforms] Why doesn't perspective-origin just use <position>?

> On Jun 17, 2015, at 12:10 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Jun 17, 2015 9:42 AM, "Simon Fraser" <smfr@me.com <mailto:smfr@me.com>> wrote:
> >>
> >> On Jun 12, 2015, at 11:54 PM, Dirk Schulze <dschulze@adobe.com <mailto:dschulze@adobe.com>> wrote:
> >>
> >>> On Apr 8, 2015, at 4:37 PM, Tab Atkins Jr. <jackalmage@gmail.com <mailto:jackalmage@gmail.com>> wrote:
> >>>
> >>> The 'perspective-origin' property specifies a point in a 2d box.  Why
> >>> isn't its grammar just using the <position> production?  It looks like
> >>> it's reusing the 'transform-origin' grammar, but without the 3rd
> >>> coordinate.
> >>>
> >>> <position> is complicated enough that it's annoying to parse a grammar
> >>> near it to figure out what's different/excluded.
> >>
> >>
> >> I don’t know of a specific reason why we don’t use <position> on perspective-origin.
> >>
> >> It looks like Gecko parses it the same way as transform-origin but without the z coordinate.
> >> WebKit and Blink use a special function just for perspective-origin. Both can probably use <position>.
> >>
> >> Would implementations be willing to change?
> >
> >
> > I forget if we’ve talked about this in the past, but we did have discussion around transform-origin and background-position here:
> > <https://lists.w3.org/Archives/Public/www-style/2012Oct/0306.html <https://lists.w3.org/Archives/Public/www-style/2012Oct/0306.html>>
> Yeah, transform-origin (unfortunately) can't just use <position>. (Damn that 3-value syntax form!) But perspective-origin is 2d, so doesn't have the same problem.
> 


I updated the draft to use <position> for the perspective-origin grammar:

https://drafts.csswg.org/css-transforms/#perspective-origin-property <https://drafts.csswg.org/css-transforms/#perspective-origin-property>

Please check to see if it looks OK.

This does mean that UAs might need to update their parsing to support the “left 20px top 20px” delta-from-edges form, butI think that’s OK.

Simon

Received on Thursday, 20 August 2015 18:35:10 UTC