*WOW* there is a lot of discussion on this, too much to follow. Hopefully I won’t be repeating anything.
A couple of thoughts:
1) Someone mentioned that HTML+CSS doesn’t compete with Flash, SVG does. Since SVG uses CSS, its worth thinking about still.
2) Would it be useful to be able to specify an image to use for a border, perhaps with images for corners as well
3) If you are going to stretch backgrounds, you want to make sure that you can maintain aspect ratio. That means you want to control which edge is used to set the dimensions. I’m pretty sure SVG has some language to describe this.
4) An idea for handling multiple backgrounds and gradients might be to make colors and images the “same thing”, tileable, stretchable, positionable things. In the case of colors, its not meaningful but it might be easy to work with:
background-image:
color(#ffaa3344),
linear-gradient(#ff00ffff, #ff00ff00, 0px 0px, 65px 100%),
url(“foo.png”, keep-aspect);
I changed the fonts from RGB to RGBA to make alpha gradients work. I made up the linear gradient definition (you’ll need one for each type of gradient) as start RGBA, end RGBA, start X start Y, end X end Y.
I also added an argument to url(). In this case, we want to constrain the image to maintain its aspect ratio. This way you can allow the image to scale to the height and the width will maintain its aspect, either clipping or tiling, or what not.
At any rate, it seems that treating color, images and gradients as “all the same thing” might simplfy a lot of things… like borders as it would allow you to define images for borders, or gradients or what ever.