From 009f4cea188cd8c7a6d4f7f65ce445462ffa5e2d Mon Sep 17 00:00:00 2001
From: Chris Eppstein <chris@eppsteins.net>
Date: Thu, 18 Nov 2010 09:32:15 -0800
Subject: [PATCH] Mixin for the background property to support gradients,
 multiple bgs, etc.

---
 .../stylesheets/compass/css3/_images.scss     | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/frameworks/compass/stylesheets/compass/css3/_images.scss b/frameworks/compass/stylesheets/compass/css3/_images.scss
index f91f79f5..adc35ead 100644
--- a/frameworks/compass/stylesheets/compass/css3/_images.scss
+++ b/frameworks/compass/stylesheets/compass/css3/_images.scss
@@ -21,6 +21,27 @@
                                                                          background-image:         $images;
 }
 
+@mixin background(
+  $background-1,
+  $background-2: false,
+  $background-3: false,
+  $background-4: false,
+  $background-5: false,
+  $background-6: false,
+  $background-7: false,
+  $background-8: false,
+  $background-9: false,
+  $background-10: false
+) {
+  $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
+                        $background-6, $background-7, $background-8, $background-9, $background-10);
+
+  @if $experimental-support-for-svg     and prefixed(-svg,    $backgrounds) {       background:    -svg($backgrounds); }
+  @if $experimental-support-for-webkit  and prefixed(-webkit, $backgrounds) {       background: -webkit($backgrounds); }
+  @if $experimental-support-for-mozilla and prefixed(-moz,    $backgrounds) {       background:    -moz($backgrounds); }
+                                                                                    background:         $backgrounds;
+}
+
 @mixin border-image($value) {
   @if $experimental-support-for-mozilla {    -moz-border-image:    -moz(-compass-list($value)); }
   @if $experimental-support-for-webkit  { -webkit-border-image: -webkit(-compass-list($value)); }