Tomáš Hubálek
11/04/2021, 2:33 PM.css
file into StyleSheet()
. Most of the stuff works, but I don't know how to correctly convert rules like this
.classA.classB {
}
which means element that has both .classA
and .classB
assigned.
I looked into https://github.com/JetBrains/compose-jb/blob/master/tutorials/Web/Style_Dsl/README.md but it looks like it can only be achieved in init{}
section using string names of the classes.
Any clue? Thankshfhbd
11/04/2021, 2:45 PMTomáš Hubálek
11/04/2021, 2:54 PMTomáš Hubálek
11/04/2021, 3:04 PMTomáš Hubálek
11/04/2021, 3:10 PMobject MyStyleSheet : StyleSheet() {
val classA by style {}
val classB by style {}
init {
classA + classB {
property("x", "y")
}
}
}
So maybe it will be that simple.Akif Abasov [JB]
11/05/2021, 7:51 AMobject MyStyleSheet : StyleSheet() {
init {
".classA.classB" {
property("x", "y")
}
}
}
or
object MyStyleSheet : StyleSheet() {
val classA by style {}
val classB by style {
classA + self {
property("x", "y")
}
}
}
Akif Abasov [JB]
11/05/2021, 7:53 AMself
keyword for nested rules