W3C home > Mailing lists > Public > www-style@w3.org > May 2011

Re: [css3-images] Features Overview

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 06 May 2011 14:32:45 -0400
Message-ID: <4DC43ECD.9090505@mit.edu>
To: www-style@w3.org
On 5/6/11 2:09 PM, fantasai wrote:
> The #xywh thing is a generic extension to URL syntax. It's not a CSS
> thing. (And it is not, in fact, defined by this draft.)

I'm pretty worried about deployment here.

> Yes, that would show the sprite in new UAs. I put examples of this in
> the spec, I don't understand how this is not clear?

It's clear; I was just raising it as a point of concern.

>> The spec draft sounds like this would work for url() too; that seems
>> like it might cause behavior changes in existing pages...
>
> Like what?

Like any page that happens to have a ref on its image urls for whatever 
reason.

Basically, this proposal is taking and existing syntax and giving it a 
new meaning.  This always carries compat risks.

>> And things get really interesting if the image is an SVG, where a ref
>> already means something entirely different.
>
> Presumably such refs match the identifier syntax

Why would we presume that?

Try loading this in your browser:

   <svg xmlns="http://www.w3.org/2000/svg">
   <defs>
     <pattern id="xywh=10,30,60,20" width="1" height="1">
       <rect width="100" height="100" fill="green"/>
     </pattern>
   </defs>
   <rect width="500" height="500" fill="url(#xywh=10,30,60,20)"/>
   </svg>

Works for me in Gecko, WebKit, Presto, IE9.

Basically, I think the media fragments draft is not backwards-compatible 
with current behavior and thus I think that using it should require 
explicit opt-in.

> and therefore there
> is no ambiguity as to which was meant.

See above.

>> It may be worth it to allow the new syntax inside image().
>
> It is already allowed? *confused*

I missed an "only".

-Boris
Received on Friday, 6 May 2011 18:33:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:40 GMT