Re: [css3-images] Features Overview

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 UTC