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

Re: [css3-background] CSS Image Replacement

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 4 Jun 2009 10:22:06 -0700
Cc: www-style@w3.org
Message-Id: <F5A0ACB9-98B8-49BF-9ABC-4B49BBEA978F@gmail.com>
To: Alexis Deveria <adeveria@gmail.com>

On Jun 4, 2009, at 8:53 AM, Alexis Deveria wrote:

>> How about
>> #header {
>>  content: url(header.png), contents;
>> }
>> <h1 id="header">My Pretty Header</h1>
> Ah, didn't realize was possible, cool! That does indeed solve the use
> case in theory. However, without the positioning options the
> background-image property offers, this solution does not allow for
> sprites, which may be an issue for some authors. There may also be
> other benefits of using background-image, so ideally it would still be
> nice to be able to include them.

You can still use a separate image for :hover, etc., if using sprites  
is not a requirement.

It's also worth noting that with font embedding via @font-face, many  
of the needs to do CSS image replacement  go away, especially when you  
can combine that with text-shadow, RGBA colors (for translucency), etc.
Received on Thursday, 4 June 2009 17:22:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:36 UTC