shithub: mycel

Download patch

ref: 9b3da20bf6742f96cea453e54bc88a8d2ac0541c
parent: 2c9435dbbc2e084a8b7c62d2c6efb82d1cb0c5c6
author: Philip Silva <philip.silva@protonmail.com>
date: Sun Jul 3 20:32:29 EDT 2022

stop backgroundGradient() from removing backgrounds

--- a/style/experimental.go
+++ b/style/experimental.go
@@ -101,7 +101,7 @@
 	if strings.HasPrefix(v, "linear-gradient(") {
 		v = strings.TrimPrefix(v, "linear-gradient(")
 	} else {
-		return
+		return c, false
 	}
 	v = strings.TrimSuffix(v, ")")
 
--- a/style/experimental_test.go
+++ b/style/experimental_test.go
@@ -72,4 +72,15 @@
 			t.Fail()
 		}
 	}
+	m := Map{
+		Declarations: make(map[string]Declaration),
+	}
+	m.Declarations["background"] = Declaration{
+		Prop: "background",
+		Val:  "#123456",
+	}
+	_, ok := m.backgroundGradient()
+	if ok {
+		t.Fail()
+	}
 }