Re: [css3-images] Features Overview

On 05/06/2011 11:32 AM, Boris Zbarsky wrote:
>
>>> 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.

We would presume that because SVG requires an identifier for id attributes.
Your example doesn't validate.

> 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.

Your argument assumes that there are enough authors who *hand-write* their
SVG identifiers *such that* they are invalid in a way that matches #xywh
syntax, that this is a problem.

I'm skeptical.

(Not that I don't think there are issues with this feature. I just don't
think this is one of them.)

~fantasai

Received on Friday, 6 May 2011 20:52:44 UTC