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

On Mon, Aug 8, 2011 at 11:25 PM, fantasai <> wrote:
> So what happens when I use CSS to make the image not load?
> object {
>  content: contents;
> }

You just follow the steps.  (Let's assume it's an <img>, which is
actually a paint source.)  If the element is out-of-document, CSS
can't affect it, and it displays as a paint source.  If the element is
in-document, but not being rendered, it displays as a paint source
(showing the image it represents).  If the element is being rendered,
then it displays like any other element.

> Or use CSS to make some other element behave as a replaced element?
> h1 {
>  content: url(logo.png);
> }

Same.  <h1> is not defined as a paint source by HTML, so it only gets
used if it's being rendered.  If you set 'content' to make it a
replaced element and then set display:none, it falls under the generic
"not being rendered" condition and just displays as a solid
transparent-black image.


Received on Tuesday, 9 August 2011 06:47:07 UTC