Diff
diff --git a/cstyle/transformers/scrollbar/main.go b/cstyle/transformers/scrollbar/main.go
index 701f057..ee72403 100644
--- a/cstyle/transformers/scrollbar/main.go
+++ b/cstyle/transformers/scrollbar/main.go
@@ -25 +25 @@ func Init() cstyle.Transformer {
- if n.GetStyle("overflow-y") == "" {
+ if n.Style("overflow-y") == "" {
@@ -30 +30 @@ func Init() cstyle.Transformer {
- n.SetStyle("overflow-y", val)
+ n.Style("overflow-y", val)
@@ -33 +33 @@ func Init() cstyle.Transformer {
- n.SetStyle("overflow-x", overflowProps[0])
+ n.Style("overflow-x", overflowProps[0])
@@ -37 +37 @@ func Init() cstyle.Transformer {
- n.SetStyle("position", "relative")
+ n.Style("position", "relative")
@@ -43 +43 @@ func Init() cstyle.Transformer {
- if n.GetStyle("scrollbar-width") == "thin" {
+ if n.Style("scrollbar-width") == "thin" {
@@ -48 +48 @@ func Init() cstyle.Transformer {
- if n.GetStyle("scrollbar-width") == "none" {
+ if n.Style("scrollbar-width") == "none" {
@@ -54 +54 @@ func Init() cstyle.Transformer {
- splitStr := strings.Split(n.GetStyle("scrollbar-color"), " ")
+ splitStr := strings.Split(n.Style("scrollbar-color"), " ")
@@ -71 +71 @@ func Init() cstyle.Transformer {
- if n.GetStyle("overflow-x") == "scroll" || n.GetStyle("overflow-x") == "auto" {
+ if n.Style("overflow-x") == "scroll" || n.Style("overflow-x") == "auto" {
@@ -74,7 +74,7 @@ func Init() cstyle.Transformer {
- scrollbar.SetStyle("position", "absolute")
- scrollbar.SetStyle("bottom", "0px")
- scrollbar.SetStyle("left", "0")
- scrollbar.SetStyle("width", "100%")
- scrollbar.SetStyle("height", trackWidth)
- scrollbar.SetStyle("background", backgroundColor)
- scrollbar.SetStyle("z-index", "99999")
+ scrollbar.Style("position", "absolute")
+ scrollbar.Style("bottom", "0px")
+ scrollbar.Style("left", "0")
+ scrollbar.Style("width", "100%")
+ scrollbar.Style("height", trackWidth)
+ scrollbar.Style("background", backgroundColor)
+ scrollbar.Style("z-index", "99999")
@@ -84,9 +84,9 @@ func Init() cstyle.Transformer {
- thumb.SetStyle("position", "absolute")
- thumb.SetStyle("left", strconv.Itoa(n.ScrollLeft)+"px")
- thumb.SetStyle("top", thumbMargin)
- thumb.SetStyle("height", thumbWidth)
- thumb.SetStyle("width", "20px")
- thumb.SetStyle("background", thumbColor)
- thumb.SetStyle("cursor", "pointer")
- thumb.SetStyle("border-radius", "10px")
- thumb.SetStyle("z-index", "99999")
+ 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")
+ thumb.Style("z-index", "99999")
@@ -95,2 +95,2 @@ func Init() cstyle.Transformer {
- scrollbar.SetStyle(k, v)
- thumb.SetStyle(k, v)
+ scrollbar.Style(k, v)
+ thumb.Style(k, v)
@@ -100 +100 @@ func Init() cstyle.Transformer {
- scrollbar.SetStyle(k, v)
+ scrollbar.Style(k, v)
@@ -104 +104 @@ func Init() cstyle.Transformer {
- thumb.SetStyle(k, v)
+ thumb.Style(k, v)
@@ -114 +114 @@ func Init() cstyle.Transformer {
- if n.GetStyle("overflow-y") == "scroll" || n.GetStyle("overflow-y") == "auto" {
+ if n.Style("overflow-y") == "scroll" || n.Style("overflow-y") == "auto" {
@@ -117,7 +117,7 @@ func Init() cstyle.Transformer {
- scrollbar.SetStyle("position", "absolute")
- scrollbar.SetStyle("top", "0")
- scrollbar.SetStyle("right", "0")
- scrollbar.SetStyle("width", trackWidth)
- scrollbar.SetStyle("height", "100%")
- scrollbar.SetStyle("background", backgroundColor)
- scrollbar.SetStyle("z-index", "99999")
+ scrollbar.Style("position", "absolute")
+ scrollbar.Style("top", "0")
+ scrollbar.Style("right", "0")
+ scrollbar.Style("width", trackWidth)
+ scrollbar.Style("height", "100%")
+ scrollbar.Style("background", backgroundColor)
+ scrollbar.Style("z-index", "99999")
@@ -128,2 +128,2 @@ func Init() cstyle.Transformer {
- thumb.SetStyle("position", "absolute")
- thumb.SetStyle("top", strconv.Itoa(n.ScrollTop)+"px")
+ thumb.Style("position", "absolute")
+ thumb.Style("top", strconv.Itoa(n.ScrollTop)+"px")
@@ -131,8 +131,8 @@ func Init() cstyle.Transformer {
- thumb.SetStyle("right", "3px")
- thumb.SetStyle("width", thumbWidth)
- thumb.SetStyle("height", "20px")
- thumb.SetStyle("background", thumbColor)
- thumb.SetStyle("cursor", "pointer")
- thumb.SetStyle("margin-left", thumbMargin)
- thumb.SetStyle("border-radius", "10px")
- thumb.SetStyle("z-index", "99999")
+ thumb.Style("right", "3px")
+ 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")
+ thumb.Style("z-index", "99999")
@@ -141,2 +141,2 @@ func Init() cstyle.Transformer {
- scrollbar.SetStyle(k, v)
- thumb.SetStyle(k, v)
+ scrollbar.Style(k, v)
+ thumb.Style(k, v)
@@ -146 +146 @@ func Init() cstyle.Transformer {
- scrollbar.SetStyle(k, v)
+ scrollbar.Style(k, v)
@@ -150 +150 @@ func Init() cstyle.Transformer {
- thumb.SetStyle(k, v)
+ thumb.Style(k, v)
@@ -157 +157 @@ func Init() cstyle.Transformer {
- n.SetStyle("width", "calc("+style["width"]+"-"+trackWidth+")")
+ n.Style("width", "calc("+style["width"]+"-"+trackWidth+")")
@@ -160 +160 @@ func Init() cstyle.Transformer {
- pr := n.GetStyle("padding-right")
+ pr := n.Style("padding-right")
@@ -162,5 +162,5 @@ func Init() cstyle.Transformer {
- if pr == "" && n.GetStyle("padding") != "" {
- n.SetStyle("padding-right", "calc("+n.StyleSheets.Styles["padding"]+" + "+trackWidth+")")
- } else if n.GetStyle("padding") != "" {
- _, r, _, _ := utils.ConvertMarginToIndividualProperties(n.GetStyle("padding"))
- n.SetStyle("padding-right", "calc("+r+" + "+trackWidth+")")
+ if pr == "" && n.Style("padding") != "" {
+ n.Style("padding-right", "calc("+n.StyleSheets.Styles["padding"]+" + "+trackWidth+")")
+ } else if n.Style("padding") != "" {
+ _,r,_,_ := utils.ConvertMarginToIndividualProperties(n.Style("padding"))
+ n.Style("padding-right", "calc("+r+" + "+trackWidth+")")
@@ -168 +168 @@ func Init() cstyle.Transformer {
- n.SetStyle("padding-right", trackWidth)
+ n.Style("padding-right", trackWidth)