afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-05-09 07:11 am

[dw-free] Generate_background_css uses improper CSS

[commit: http://hg.dwscoalition.org/dw-free/rev/423e2a13d827]

http://bugs.dwscoalition.org/show_bug.cgi?id=1179

Fix generate_background_css, when no background color is given.

Patch by [personal profile] av8rmike.

Files modified:
  • bin/upgrading/s2layers/core2.s2
--------------------------------------------------------------------------------
diff -r f55c3450d521 -r 423e2a13d827 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2	Sat May 09 06:46:53 2009 +0000
+++ b/bin/upgrading/s2layers/core2.s2	Sat May 09 07:11:08 2009 +0000
@@ -2613,11 +2613,8 @@ function generate_background_css (
 "Take the values for the properties in a background image group and output the appropriate
 line of CSS for inclusion in your stylesheet."
 {
-    if (not defined $background_color) {
-        $background_color = "auto";
-    }
-
-    var string background_css = "background: $background_color";
+    var string color = ($background_color.as_string != "") ? $background_color.as_string : "transparent";
+    var string background_css = "background: $color";
 
     if ($background_image != "") {
         $background_css = $background_css + " url($background_image) $background_image_repeat $background_image_position";
--------------------------------------------------------------------------------