Diff
diff --git a/cstyle/transformers/scrollbar/main.go b/cstyle/transformers/scrollbar/main.go
index ba201fd..c8e1ce6 100644
--- a/cstyle/transformers/scrollbar/main.go
+++ b/cstyle/transformers/scrollbar/main.go
@@ -13 +13 @@ func Init() cstyle.Transformer {
- if n.CStyle["overflow"] != "" || n.CStyle["overflow-x"] != "" || n.CStyle["overflow-y"] != "" {
+ if n.Style["overflow"] != "" || n.Style["overflow-x"] != "" || n.Style["overflow-y"] != "" {
@@ -20,2 +20,2 @@ func Init() cstyle.Transformer {
- overflowProps := strings.Split(n.CStyle["overflow"], " ")
- if n.CStyle["overflow-y"] == "" {
+ overflowProps := strings.Split(n.Style["overflow"], " ")
+ if n.Style["overflow-y"] == "" {
@@ -26 +26 @@ func Init() cstyle.Transformer {
- n.CStyle["overflow-y"] = val
+ n.Style["overflow-y"] = val
@@ -28,2 +28,2 @@ func Init() cstyle.Transformer {
- if n.CStyle["overflow-x"] == "" {
- n.CStyle["overflow-x"] = overflowProps[0]
+ if n.Style["overflow-x"] == "" {
+ n.Style["overflow-x"] = overflowProps[0]
@@ -32,2 +32,2 @@ func Init() cstyle.Transformer {
- if n.CStyle["position"] == "" {
- n.CStyle["position"] = "relative"
+ if n.Style["position"] == "" {
+ n.Style["position"] = "relative"
@@ -39 +39 @@ func Init() cstyle.Transformer {
- if n.CStyle["scrollbar-width"] == "thin" {
+ if n.Style["scrollbar-width"] == "thin" {
@@ -44 +44 @@ func Init() cstyle.Transformer {
- if n.CStyle["scrollbar-width"] == "none" {
+ if n.Style["scrollbar-width"] == "none" {
@@ -48 +48 @@ func Init() cstyle.Transformer {
- splitStr := strings.Split(n.CStyle["scrollbar-color"], " ")
+ splitStr := strings.Split(n.Style["scrollbar-color"], " ")
@@ -67 +67 @@ func Init() cstyle.Transformer {
- if (n.CStyle["overflow-x"] == "scroll" || n.CStyle["overflow-x"] == "auto") && ((n.ScrollWidth > int(c.Width) && n.TagName == "html") || n.ScrollWidth > 0) {
+ if (n.Style["overflow-x"] == "scroll" || n.Style["overflow-x"] == "auto") && ((n.ScrollWidth > int(c.Width) && n.TagName == "html") || n.ScrollWidth > 0) {
@@ -70,6 +70,6 @@ func Init() cstyle.Transformer {
- scrollbar.CStyle["position"] = "absolute"
- scrollbar.CStyle["bottom"] = "0px"
- scrollbar.CStyle["left"] = "0"
- scrollbar.CStyle["width"] = "100%"
- scrollbar.CStyle["height"] = trackWidth
- scrollbar.CStyle["background"] = backgroundColor
+ scrollbar.Style["position"] = "absolute"
+ scrollbar.Style["bottom"] = "0px"
+ scrollbar.Style["left"] = "0"
+ scrollbar.Style["width"] = "100%"
+ scrollbar.Style["height"] = trackWidth
+ scrollbar.Style["background"] = backgroundColor
@@ -79,8 +79,8 @@ func Init() cstyle.Transformer {
- thumb.CStyle["position"] = "absolute"
- thumb.CStyle["left"] = strconv.Itoa(n.ScrollLeft) + "px"
- thumb.CStyle["top"] = thumbMargin
- thumb.CStyle["height"] = thumbWidth
- thumb.CStyle["width"] = "20px"
- thumb.CStyle["background"] = thumbColor
- thumb.CStyle["cursor"] = "pointer"
- thumb.CStyle["border-radius"] = "10px"
+ thumb.Style["position"] = "absolute"
+ thumb.Style["left"] = strconv.Itoa(n.ScrollLeft) + "px"
+ thumb.Style["top"] = thumbMargin
+ thumb.Style["height"] = thumbWidth
+ thumb.Style["width"] = "20px"
+ thumb.Style["background"] = thumbColor
+ thumb.Style["cursor"] = "pointer"
+ thumb.Style["border-radius"] = "10px"
@@ -89,2 +89,2 @@ func Init() cstyle.Transformer {
- scrollbar.CStyle[k] = v
- thumb.CStyle[k] = v
+ scrollbar.Style[k] = v
+ thumb.Style[k] = v
@@ -94 +94 @@ func Init() cstyle.Transformer {
- scrollbar.CStyle[k] = v
+ scrollbar.Style[k] = v
@@ -98 +98 @@ func Init() cstyle.Transformer {
- thumb.CStyle[k] = v
+ thumb.Style[k] = v
@@ -108 +108 @@ func Init() cstyle.Transformer {
- if (n.CStyle["overflow-y"] == "scroll" || n.CStyle["overflow-y"] == "auto") && ((n.ScrollHeight > int(c.Height) && n.TagName == "html") || n.ScrollHeight > 0) {
+ if (n.Style["overflow-y"] == "scroll" || n.Style["overflow-y"] == "auto") && ((n.ScrollHeight > int(c.Height) && n.TagName == "html") || n.ScrollHeight > 0) {
@@ -111,6 +111,6 @@ func Init() cstyle.Transformer {
- scrollbar.CStyle["position"] = "absolute"
- scrollbar.CStyle["top"] = "0"
- scrollbar.CStyle["right"] = "0"
- scrollbar.CStyle["width"] = trackWidth
- scrollbar.CStyle["height"] = "100%"
- scrollbar.CStyle["background"] = backgroundColor
+ scrollbar.Style["position"] = "absolute"
+ scrollbar.Style["top"] = "0"
+ scrollbar.Style["right"] = "0"
+ scrollbar.Style["width"] = trackWidth
+ scrollbar.Style["height"] = "100%"
+ scrollbar.Style["background"] = backgroundColor
@@ -120 +120 @@ func Init() cstyle.Transformer {
- scrollbar.CStyle["height"] = "calc(100% - " + trackWidth + ")"
+ scrollbar.Style["height"] = "calc(100% - " + trackWidth + ")"
@@ -125,9 +125,9 @@ func Init() cstyle.Transformer {
- thumb.CStyle["position"] = "absolute"
- thumb.CStyle["top"] = strconv.Itoa(n.ScrollTop) + "px"
- thumb.CStyle["left"] = "0"
- thumb.CStyle["width"] = thumbWidth
- thumb.CStyle["height"] = "20px"
- thumb.CStyle["background"] = thumbColor
- thumb.CStyle["cursor"] = "pointer"
- thumb.CStyle["margin-left"] = thumbMargin
- thumb.CStyle["border-radius"] = "10px"
+ thumb.Style["position"] = "absolute"
+ thumb.Style["top"] = strconv.Itoa(n.ScrollTop) + "px"
+ thumb.Style["left"] = "0"
+ thumb.Style["width"] = thumbWidth
+ thumb.Style["height"] = "20px"
+ thumb.Style["background"] = thumbColor
+ thumb.Style["cursor"] = "pointer"
+ thumb.Style["margin-left"] = thumbMargin
+ thumb.Style["border-radius"] = "10px"
@@ -136,2 +136,2 @@ func Init() cstyle.Transformer {
- scrollbar.CStyle[k] = v
- thumb.CStyle[k] = v
+ scrollbar.Style[k] = v
+ thumb.Style[k] = v
@@ -141 +141 @@ func Init() cstyle.Transformer {
- scrollbar.CStyle[k] = v
+ scrollbar.Style[k] = v
@@ -145 +145 @@ func Init() cstyle.Transformer {
- thumb.CStyle[k] = v
+ thumb.Style[k] = v
@@ -150,2 +150,2 @@ func Init() cstyle.Transformer {
- n.CStyle["width"] = "calc(" + n.CStyle["width"] + "-" + trackWidth + ")"
- pr := n.CStyle["padding-right"]
+ n.Style["width"] = "calc(" + n.Style["width"] + "-" + trackWidth + ")"
+ pr := n.Style["padding-right"]
@@ -153,2 +153,2 @@ func Init() cstyle.Transformer {
- if n.CStyle["padding"] != "" {
- pr = n.CStyle["padding"]
+ if n.Style["padding"] != "" {
+ pr = n.Style["padding"]
@@ -159 +159 @@ func Init() cstyle.Transformer {
- n.CStyle["padding-right"] = "calc(" + pr + "+" + trackWidth + ")"
+ n.Style["padding-right"] = "calc(" + pr + "+" + trackWidth + ")"
@@ -161 +161 @@ func Init() cstyle.Transformer {
- n.CStyle["padding-right"] = trackWidth
+ n.Style["padding-right"] = trackWidth