about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--svg/attributes.go4
-rw-r--r--svg/attributes_test.go13
2 files changed, 11 insertions, 6 deletions
diff --git a/svg/attributes.go b/svg/attributes.go
index 10b7c69..52c9c61 100644
--- a/svg/attributes.go
+++ b/svg/attributes.go
@@ -24,6 +24,10 @@ func Stroke(v string) g.Node {
 	return g.Attr("stroke", v)
 }
 
+func StrokeWidth(v string) g.Node {
+	return g.Attr("stroke-width", v)
+}
+
 func ViewBox(v string) g.Node {
 	return g.Attr("viewBox", v)
 }
diff --git a/svg/attributes_test.go b/svg/attributes_test.go
index c41fb45..7e26548 100644
--- a/svg/attributes_test.go
+++ b/svg/attributes_test.go
@@ -11,12 +11,13 @@ import (
 
 func TestSimpleAttributes(t *testing.T) {
 	cases := map[string]func(string) g.Node{
-		"clip-rule": ClipRule,
-		"d":         D,
-		"fill":      Fill,
-		"fill-rule": FillRule,
-		"stroke":    Stroke,
-		"viewBox":   ViewBox,
+		"clip-rule":    ClipRule,
+		"d":            D,
+		"fill":         Fill,
+		"fill-rule":    FillRule,
+		"stroke":       Stroke,
+		"stroke-width": StrokeWidth,
+		"viewBox":      ViewBox,
 	}
 
 	for name, fn := range cases {