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 23:46:17 -0700
Message-ID: <CAAWBYDDuwL7LJ4XVXxhhUt_R6-i_+hBMvtD8BNwAGyqjzimbew@mail.gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>
Cc: www-style@w3.org
On Mon, Aug 8, 2011 at 11:25 PM, fantasai <fantasai.lists@inkedblade.net> 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.

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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:02 UTC