https://kotlinlang.org logo
r

Robert Jaros

08/14/2020, 2:07 PM
I've came up even with such magic (with some css classes):
Copy code
hPanel {
                addCssStyle(style {
                    width = 100.perc
                    style("div:first-child") {
                        width = 20.perc
                        style("div") {
                            width = 100.perc
                        }
                    }
                    style("div:last-child") {
                        width = 80.perc
                        style("div") {
                            width = 100.perc
                        }
                    }
                })
                background = Background(Color.name(Col.BLUE))
                height = 500.px
                vPanel {
                    background = Background(Color.name(Col.BEIGE))
                    height = 500.px
                    span("Left")
                }
                vPanel {
                    background = Background(Color.name(Col.GREEN))
                    height = 500.px
                    span("Right")
                }
            }