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

Re: [css3-images] Element() corner-cases

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 8 Aug 2011 17:32:13 -0700
Message-ID: <CAAWBYDBXVoNuCx-3OA+UJ=_8n3847d2vq-qLtS4rnFqZ=6SHvw@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
On Mon, Aug 8, 2011 at 5:22 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
> On 08/08/2011 03:40 PM, Tab Atkins Jr. wrote:
>>>> * defined a general notion of "paint source" which SVG and HTML can
>>>> use for elements that don't need to be rendered to be used as an image
>>>> (<linearGradient>,<img>, etc.)
>>>
>>> I'm not sure that<img>  etc. from HTML should be considered "paint
>>> sources"
>>> rather than just handled as regular elements... why do you want to do
>>> this?
>>
>> -moz-element() allows some elements (limited, I believe, to
>> <img>/<video>/<canvas>) to be used in the function without being
>> inserted into the document (you create them in script, then associate
>> them with a virtual id).  By default, if they're not in the document,
>> they're not rendered, and so wouldn't be usable.  SVG's paint servers
>> suffer from the same problem (they're not rendered directly, but they
>> have an intrinsic notion of size and appearance), so it seemed elegant
>> to just unify the concepts.
>
> I think the SVG concept is not really the same thing.
>
> If you insert an <img>/<video>/<canvas> into the document, it will render.
> But it might render with, for example, borders and padding. Or it might
> render as alt text / fallback content rather than as a replaced element.
> This is different from the way SVG paint servers behave. So I don't think
> unifying the concepts the way you did makes sense.

Yes, it renders with its intrinsic appearance, without borders or
padding or resizing.  It also only represents a paint source when it's
loaded with a valid image.  (This is tracked in the HTML bug I've
filed to have HTML define the right terms.)

The only difference is that the SVG1.1 paint-server elements don't
render at all, ever.  This isn't necessarily going to be true forever.
 At the last f2f we discussed a coons patch mesh gradient that plays
double-duty as a geometry object (when in the normal document) and a
paint server (when in <defs>).  This is basically identical to how
HTML's paint sources act.

~TJ
Received on Tuesday, 9 August 2011 00:33:05 GMT

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