Re: "display: image;" for CSS styling of images embedded in XML documents?

Ian Hickson / 2003-07-04 14:52:

> On Thu, 3 Jul 2003, James Craig wrote:
>>However, a :broken pseudo-class would be useful in styling an element
>>different ways depending on whether or not the generated content is
>>displayed. For example, I may want a width or border specified on the
>>actual image, but not on it's text equivalent.
> This requirement was originally on my list, but I had to drop it because I
> couldn't work out any sane way to do it.
> You can't use a pseudo-class, because that makes the cascade dependent on
> the layout, which is a definite no-no.

I don't really understand the problem with :broken pseudo-class. 
How's that harder to implement than :hover? I think it could be 
possible to partially[1] emulate <object> behaviour with just 
:broken pseudo-class and the content property.

Something along the lines:
object { content: url(attr(data)); }
object:broken { content: normal; }

> You could use comma separated values for some properties, e.g. width,
> height, overflow, margin:

All the issues that I can think of with the pseudo-class method are 
minor compared to problems that could arise from such lists.

[1] Obviously one cannot support child <param> elements correctly 
with CSS only emulation.


Received on Monday, 7 July 2003 05:17:44 UTC