W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: image-orientation feature set and grammar tweaks

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 8 Aug 2013 17:02:57 -0700
Message-ID: <CAAWBYDAUbaL2nDEu7MXF5t_zZq0+PRUFErkc1M0vWUWvfpd+iw@mail.gmail.com>
To: Seth Fowler <seth@mozilla.com>
Cc: "www-style@w3.org" <www-style@w3.org>
On Thu, Aug 8, 2013 at 4:47 PM, Seth Fowler <seth@mozilla.com> wrote:
> Hi all,
>
> I'm working on implementing the 'image-orientation' property at Mozilla, for inclusion in some future version of Firefox. The initial implementation is nearly done at this point. What I've implemented so far is the CSS Level 4 version of 'image-orientation', plus the 'flip' feature that Tab Atkins describes in this email:
>
> http://lists.w3.org/Archives/Public/www-style/2011Dec/0003.html
>
> I felt that it made sense to support this since 'from-image' requires that we be able to display any EXIF orientation anyway.
>
> The grammar in that email is as follows:
>
>> image-orientation: from-image | [ <angle>? flip? ]
>
> The grammar I've used in the implementation is this:
>
>> image-orientation: from-image | flip | <angle> flip?

Just to make sure, those two grammars are intended to be identical,
except that the first (mine) has the unfortunate property that you can
just omit everything, right?  Yet another case where we need "one or
more, but in this order" as a grammar operator!

> The meaning is that 'flip' on its own is equivalent to '0deg flip'. I require the angle to always appear before the 'flip' since the rotation always happens before the flip; this makes the syntax nicely mirror the semantics.

Yes, both of these qualities were already present in my original grammar.

> In my implementation, flipping is always done horizontally, rather than in the inline direction. I felt this made more sense; I know there are uses for flipping an image according to the inline direction, but that feels like a different feature to me.

Hm, I thought that images were rotated along with text in vertical
writing modes, but it looks like this isn't true.  At least in Chrome,
images retain their original orientation regardless of writing mode.
In that case, yes, flipping horizontally is the right thing to do.

> I'd love to hear any feedback you may have. Also, are there any other implementations of this in the works so far? From what I can tell this feature was only partially completed in WebKit and was removed from Blink.

There was an implementor in our (Google's) Sydney office doing it, but
I dunno what the status of that is.  I'll investigate.

~TJ
Received on Friday, 9 August 2013 00:03:45 UTC

This archive was generated by hypermail 2.3.1 : Friday, 9 August 2013 00:03:45 UTC