Diff
diff --git a/cstyle/transformers/ol/main.go b/cstyle/transformers/ol/main.go
index 0027c0c..eab80c6 100644
--- a/cstyle/transformers/ol/main.go
+++ b/cstyle/transformers/ol/main.go
@@ -16 +16 @@ func Init() cstyle.Transformer {
- Selector: func(n *element.Node, c *cstyle.CSS) bool {
+ Selector: func(n *element.Node) bool {
@@ -25,2 +24,0 @@ func Init() cstyle.Transformer {
- dot := li.CreateElement("div")
- content := li.CreateElement("div")
@@ -28,5 +26,4 @@ func Init() cstyle.Transformer {
- for k, v := range c.Styles[v.Properties.Id] {
- li.Style(k, v)
- dot.Style(k, v)
- content.Style(k, v)
- }
+ li.CStyle = v.CStyle
+ li.CStyle["display"] = "flex"
+ li.CStyle["align-items"] = "center"
+ li.CStyle = c.QuickStyles(&li)
@@ -34,2 +31,3 @@ func Init() cstyle.Transformer {
- li.Style("display", "flex")
- li.Style("align-items", "center")
+ dot := li.CreateElement("div")
+ dot.CStyle = li.CStyle
+ dot.CStyle["margin-right"] = "6px"
@@ -37,2 +35,2 @@ func Init() cstyle.Transformer {
- dot.Style("margin-right", "6px")
- dot.Style("display", "block")
+ dot.CStyle = c.QuickStyles(&dot)
+ dot.CStyle["display"] = "block"
@@ -42 +40 @@ func Init() cstyle.Transformer {
- if n.Style("font-style") == "italic" {
+ if n.CStyle["font-style"] == "italic" {
@@ -50 +48 @@ func Init() cstyle.Transformer {
- fs := utils.ConvertToPixels(n.Style("font-size"), 16, c.Width)
+ fs := utils.ConvertToPixels(n.CStyle["font-size"], 16, c.Width)
@@ -53 +51 @@ func Init() cstyle.Transformer {
- fid := n.Style("font-family") + fmt.Sprint(em, n.Style("font-weight"), italic)
+ fid := n.CStyle["font-family"] + fmt.Sprint(em, n.CStyle["font-weight"], italic)
@@ -55,5 +53 @@ func Init() cstyle.Transformer {
- f, err := font.LoadFont(n.Style("font-family"), int(em), n.Style("font-weight"), italic, &c.Adapter.FileSystem)
-
- if err != nil {
- panic(err)
- }
+ f, _ := font.LoadFont(n.CStyle["font-family"], int(em), n.CStyle["font-weight"], italic, &c.Adapter.FileSystem)
@@ -70,0 +65 @@ func Init() cstyle.Transformer {
+ content := li.CreateElement("div")
@@ -72 +67,3 @@ func Init() cstyle.Transformer {
- content.Style("display", "block")
+ content.CStyle = li.CStyle
+ content.CStyle = c.QuickStyles(&content)
+ content.CStyle["display"] = "block"
@@ -82 +79 @@ func Init() cstyle.Transformer {
- tN.Children[i].Children[0].Style("margin-left", strconv.Itoa((maxOS-widths[i]))+"px")
+ tN.Children[i].Children[0].CStyle["margin-left"] = strconv.Itoa((maxOS - widths[i])) + "px"