about summary refs log tree commit diff stats
path: root/svg/attributes_test.go
diff options
context:
space:
mode:
authorMarkus Wüstenberg2024-10-03 10:55:52 +0200
committerGitHub2024-10-03 10:55:52 +0200
commita58043d58789f95046a567d2ad1bde55e352d5f0 (patch)
treeaef3ef6f2c1add6956a714ad338a4528bd8f4c57 /svg/attributes_test.go
parentb7a00582ac0052652bc2857ab57016b9dd4f8b0c (diff)
downloadgomponents-a58043d58789f95046a567d2ad1bde55e352d5f0.tar.lz
gomponents-a58043d58789f95046a567d2ad1bde55e352d5f0.tar.zst
gomponents-a58043d58789f95046a567d2ad1bde55e352d5f0.zip
Remove SVG package (#214)
Because the added value of having this was very small, and I don't want
to confuse people about what's properly supported, I've removed the SVG
package. As #196 showed, there can easily be conflicts between HTML and
SVG, and the rendering isn't really set up for anything else than HTML.

It's still easy to create SVG elements: `html.SVG` exists in this repo,
and the rest is often just a string that can be included using `g.Raw`.

Fixes #206
Diffstat (limited to 'svg/attributes_test.go')
-rw-r--r--svg/attributes_test.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/svg/attributes_test.go b/svg/attributes_test.go
deleted file mode 100644
index 7e26548..0000000
--- a/svg/attributes_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package svg_test
-
-import (
-	"fmt"
-	"testing"
-
-	g "github.com/maragudk/gomponents"
-	"github.com/maragudk/gomponents/internal/assert"
-	. "github.com/maragudk/gomponents/svg"
-)
-
-func TestSimpleAttributes(t *testing.T) {
-	cases := map[string]func(string) g.Node{
-		"clip-rule":    ClipRule,
-		"d":            D,
-		"fill":         Fill,
-		"fill-rule":    FillRule,
-		"stroke":       Stroke,
-		"stroke-width": StrokeWidth,
-		"viewBox":      ViewBox,
-	}
-
-	for name, fn := range cases {
-		t.Run(fmt.Sprintf(`should output %v="hat"`, name), func(t *testing.T) {
-			n := g.El("element", fn("hat"))
-			assert.Equal(t, fmt.Sprintf(`<element %v="hat"></element>`, name), n)
-		})
-	}
-}