nimakro
03/08/2017, 3:28 PMaddPseudoClass
methode with a String
instead of addPseudoClass(ApplicationStyle.somePseudoClass)
which works for normal css classes addClass(ApplicationStyle.someStyle)
?
Second question I defined a pseudoClass in my ApplicationStyle
class and add the pseudoclass with addPseudoClass
to a treecell
which should change the background color but nothing happends, this is the code (I shortened it):
// In the init methode do addClass(view)
cellFormat {
when (it) {
is SomeClass -> {
addPseudoClass("hasItem")
text = it.toString()
}
else -> {
removePseudoClass("hasItem")
text = it.toString()
}
}
}
And that's the css
view {
treeCell {
backgroundInsets += box(1.5.px, 0.px, 1.5.px, 0.px)
fontSize = 12.px
}
and(hasItem) {
backgroundColor += c("#F7F7F7")
}
}
Ruckus
03/08/2017, 5:05 PMand(hasItem)
not inside the treeCell
rule?
view {
treeCell {
backgroundInsets += box(1.5.px, 0.px, 1.5.px, 0.px)
fontSize = 12.px
and(hasItem) {
backgroundColor += c("#F7F7F7")
}
}
}
nimakro
03/18/2017, 4:34 PM