Re: [Backgrounds/Borders] What to do when a border-image fails to load

2009/3/30 Brad Kemper <brad.kemper@gmail.com>:
>
>> And yet. There are elements already that have foreground-image that
>> can coexist with background image. <img> and <object> in HTML as an
>> example. It is nice to have ability in CSS to define where
>> and how foreground-image is rendered in at least <img>.
>
> I agree. It doesn't have much to do with my proposed changes, and you will
> find the idea controversial from the standpoint of many people considering
> IMG to be content instead of styling, but I agree with you on that.
>
>> Such attributes as 'image-orientation' [1] should go to the
>> foreground-*** attribute set. And the 'fit' [2] is just one
>> more value of
>> foreground-repeat: no-repeat | repeat | fill | meet | slice | etc.
>
> If there was a foreground-image property, I imagine it would share a lot
> with background-image.
>
>> [1] http://www.w3.org/TR/css3-page/#image-orientation
>> [2] http://www.w3.org/TR/css3-page/#fit
>>

Please note that there exists a "foreground-image" property, just it
has been called "content: url();" (and creates replaced element, to
which the fit property applies).
But there is a subtle difference between images (or general replaced
content, including videos or animations) as content and images used
for decorations. The latter are just part of the background (in the
semantic sense, non in the styling sense) of the element.
Therefore, instead of "foreground-everything", I propose
Property: background-stacking
Value: top | bottom [, [top | bottom] ]*
Initial: bottom

Specifies if the background should be drawn below the content (as now) or above.

The fit properties does not apply to these images, because I don't
think that decorative images should be "letter-boxed" like content
images.
On the other side, we cannot extend "fit" because it does not make
sense to repeat content images: do you display a video twice if the
resolution is too high?

Giovanni

Received on Monday, 30 March 2009 15:02:57 UTC