W3C home > Mailing lists > Public > www-style@w3.org > June 2002

RE: Rollover-image Property

From: Manos Batsis <m.batsis@bsnet.gr>
Date: Thu, 20 Jun 2002 17:05:14 +0300
Message-ID: <E657D8576967CF448D6AF22CB42DD2690FF2B6@ermhs.Athens.BrokerSystems.gr>
To: "Stuart Ballard" <sballard@netreach.com>
Cc: <www-style@w3.org>

Hi Stuart,

> From: Stuart Ballard [mailto:sballard@netreach.com] 

> One thing you can't easily do right now is size an element to the 
> natural size of its background image.

That has nothing to do with a hypothetical rollover-image property ;-)
This is interesting; however it steps outside the background module
area.


> Also, some browsers 
> simply don't 
> support background images, so for compatibility you really need to be 
> using an <img> in there somewhere - which will then get displayed *in 
> front* of whatever background image you carefully selected in 
> your CSS.

Yes, as I was saying, what you are talking about is actually DOM content
included by CSS rules...


> (1) Allowing the "content" property to take a url() of an image as an 
> argument, and also allowing it to apply to any element, 
> instead of just 
> the before and after pseudos. Anything in the "content" 
> property would 
> completely replace the regular content of the element; OR

This is already covered by [1] but accessibility issues arise.


> (2) Providing a "replaced-image" property which has an effect only on 
> empty elements. "img" could be declared in the UA css as "img { 
> replaced-image: url(attr(src)) }" or something. Then you could use 
> "a.mylink:hover > img { replaced-image: 
> url("images/mylink-hover.png")}" 
> to get a rollover effect.

It all turns down to where CSS should stop. IMHO this is clearly a DOM
issue so you should implement it with ECMAScript or something.
The only place in CSS I would like that to be is through Behavioral
Extensions.
Others may have other views of course ;-)

[1] http://www.w3.org/TR/REC-CSS2/generate.html#content

Cheers,

Manos
Received on Thursday, 20 June 2002 10:05:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:14 GMT