- From: Andrew Fedoniouk <news@terrainformatica.com>
- Date: Fri, 7 Sep 2007 12:35:40 -0700
- To: <www-style@w3.org>, "Eric A. Meyer" <eric@meyerweb.com>
----- Original Message ----- From: "Eric A. Meyer" <eric@meyerweb.com> To: <www-style@w3.org> Sent: Friday, September 07, 2007 12:07 PM Subject: Re: [CSS3] foreground-image > > At 11:56 AM -0700 9/7/07, Andrew Fedoniouk wrote: > >>To be able to define in CSS rendering of <img> element I propose: >>1) to add set of attributes that are similar to background-*** attributes >>but named foreground-***: foreground-image, foreground-position, etc. >> >>Having this standard <img> rendering can be defined in CSS as >>img { foreground-image:url(attr("src")); >> foreground-stretch: 100%; >>} > > I may be confused, but how would this differ from: > > img {content: url(blah);} > > ...or, given a hypothetical extension of the 'url' value: > > img {content: url(attr(src));} > > ? The @content defines only one piece of information - source of image but it does not define how bits are being rendered: stretched, positioned, etc. That is the main problem. In ideal CSS world it should be able to define rendering of all HTML elements by having some "stock style sheet" that can be applied to any abstract DOM tree, html, xhtml or xml - does not matter. Think about <button> with icon for example. button.with-icon { background-image: url(os-theme:button-normal); background-stretch: 100%; foreground-image: url(http://something); foreground-repeat: no-repeat; foreground-position: 3px center; padding-left: 23px; } button.with-icon: hover { background-image: url(os-theme:button-hovered); } etc. Andrew Fedoniouk. http://terrainformatica.com
Received on Friday, 7 September 2007 19:36:32 UTC