It seems like I am not the first, who asks about `...
# compose-web
a
It seems like I am not the first, who asks about
before
block. I am writing the following code in a stylesheet:
Copy code
public val treeCaretDown: String by style {
        before {
            content("\u25B6")
            color(Color.black)
            display(DisplayStyle.InlineBlock)
            marginRight(6.px)
            transform { rotate(90.deg) }
        }
    }
But
before
block is missing in the final CSS. Am I doing something wrong?
a
Try it like this:
Copy code
(self + hover)  {
        //....

    (self + before) {
        //....
    }
}
thank you color 1
a
Now it works
It looks like a bug for me.
before
is a CssSelector and it has invoke method, but it is invoked in a wrong scope
a
Looks like just an unintuitive API design. It should work like your first example i agree