"Works great...until I tried to use gradients as backgrounds"
There is a bigger issue once we start thinking about gradients or any
other css where the browser-prefixes happen *inside* the property
declaration rather than before it. Compass/Sass simply don't have a
good solution to that at this point, although I'd like to put some
time into solving it.
Maybe we need gradient functions that work as such:
... background-image: front.png, middle.png, linear-
gradient(color_stops(#dddddd, #aaaaaa), left, moz)
Which would put out the browser-specific version needed. In that case
you would have to repeat for each browser:
.multiple {
background-image: front.png, middle.png, linear-
gradient(color_stops(#dddddd, #aaaaaa), left, moz)
background-image: front.png, middle.png, linear-
gradient(color_stops(#dddddd, #aaaaaa), left, webkit)
background-image: front.png, middle.png, linear-
gradient(color_stops(#dddddd, #aaaaaa), left, official)
}
which gives you the flexibility you need for advanced implementations,
and could still simplify into mixins for common use cases. Nothing at
all would have to change in use of the current gradient mixin, it
would simply loop through this function. Our new multiple background
mixin could then use that to handle those extra lines as well.
@include multiple-bgs(
images(
"front.png" no-repeat scroll,
"middle.png" repeat-x scroll,
"color_stops(#dddddd, #aaaaaa), left" repeat fixed),
"fallback.png" no-repeat scroll
);
I'm not exactly certain of the syntax. I'm sure it needs adjustments
to be implemented. Anyone with Ruby knowledge want to jump in and
correct me?