Re: [css-color] Feedback on the image-orientation CSS property

> On Apr 16, 2014, at 4:45 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
> 
>> On Wed, Apr 16, 2014 at 12:21 PM, Justin Novosad <junov@google.com> wrote:
>> Hi,
>> 
>> In this discussion thread, concerns were raised regarding whether
>> image-orientation should be a CSS property:
>> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2014-April/254148.html
>> 
>> tl;dr:
>> 
>> * Property should be move to markup: it is more semantic than stylistic. Image
>> orientation affects the content.
>> 
>> * It would be desirable to take image orientation into account when drawing an
>> image to 2D canvas or WebGL. If orientation is expressed by a CSS property,
>> that would imply making canvas draws dependent on style computation.
> 
> I've got no problem with it also existing in HTML.  It's a CSS
> property because that's where the issue was raised, and it didn't seem
> inappropriate to be done there, and because if you want to use this
> property at all, you probably want to apply it to all the images in
> your document, which is simple to do with CSS.

Why would you want to apply it to all images in your document? Or site, since CSS files are typically written for the whole site or some section of it. How is the CSS author going to have enough knowledge of each picture in the site to know which way to turn them all?

>> On Wed, Apr 16, 2014 at 12:45 PM, L. David Baron <dbaron@dbaron.org> wrote:
>> It seems reasonable to me to have an attribute that says that the
>> EXIF orientation should be honored be part of the content.  I don't
>> know if the rest of what's in image-orientation is needed (either in
>> markup or in CSS); I'd be happy to drop it from Gecko with such a
>> replacement, assuming that it's not going to lead to a huge amount
>> of churn (since image-orientation is already something we're
>> shipping and depend on internally, and I'd rather not have to redo
>> it multiple times).
> 
> I wouldn't be opposed to dropping all values but "from-image" and
> "0deg".  

That's starting to make a little more sense. "0deg" should be changed to "none" though. It doesn't need a unit, if only measurement in that unit applies, and it is zero.

From the thread it sounded like there is a performance problem doing this in CSS instead of markup. Is there a strong reason to have this in CSS once it is part of HTML?

> The explicit values all came first, when I inherited this
> spec; I added "from-image" later.  I don't think the explicit values
> are at all useful, honestly.

Neither do I. It assumes the CSS author knows about entire classes of images in the content that will all need the same correction, and will be able to select just those, which seems pretty dubious to me. I'm not even entirely convinced yet that the CSS author would typically be able to select which ones should get orientation from the image data, though maybe there are cases for that. 

Received on Thursday, 17 April 2014 06:04:45 UTC