diff --git a/cstyle/transformers/ul/main.go b/cstyle/transformers/ul/main.go
index 5af91e4..709b123 100644
--- a/cstyle/transformers/ul/main.go
+++ b/cstyle/transformers/ul/main.go
@@ -20,2 +20 @@ func Init() cstyle.Transformer {
- v.AppendChild(&dot)
- // !CHECK: this too
+ dot.Parent = n
@@ -32,0 +32 @@ func Init() cstyle.Transformer {
+ dot.Properties.Id = element.GenerateUniqueId(v, dot.TagName())
package ul
import (
"grim/cstyle"
"grim/element"
)
func Init() cstyle.Transformer {
return cstyle.Transformer{
Selector: func(n *element.Node, c *cstyle.CSS) bool {
return n.TagName() == "ul"
},
Handler: func(n *element.Node, c *cstyle.CSS) *element.Node {
// !TODO: make ul/ol stylable
for i, v := range n.Children {
if v.TagName() != "li" {
continue
}
dot := v.CreateElement("div")
v.AppendChild(&dot)
// !CHECK: this too
element.QuickStyles(&dot)
dot.ComputedStyle["background-color"] = "#000"
dot.ComputedStyle["border-radius"] = "100px"
dot.ComputedStyle["width"] = "5px"
dot.ComputedStyle["height"] = "5px"
dot.ComputedStyle["margin-right"] = "10px"
v.Children = append(v.Children, &dot)
v.ComputedStyle["display"] = "flex"
v.ComputedStyle["align-items"] = "center"
n.Children[i] = v
}
return n
},
}
}