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

On 08/08/2011 05:32 PM, Tab Atkins Jr. wrote:
> On Mon, Aug 8, 2011 at 5:22 PM, fantasai<>  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.)

So what happens when I use CSS to make the image not load?

object {
   content: contents;

Or use CSS to make some other element behave as a replaced element?

h1 {
   content: url(logo.png);


Received on Tuesday, 9 August 2011 06:27:37 UTC