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

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.

~fantasai

Received on Tuesday, 9 August 2011 00:23:23 UTC