Norbi
06/03/2024, 11:25 AMCssStyle
?
object MyStyleSheet : StyleSheet() {
val myComponent by style {
(type("div") + self) style {
display(...)
}
(type("div") + self) child type("div") style {
display(...)
}
}
}
Which results in the following CSS declaration:
div.MyStyleSheet-myComponent {
display: ...;
}
div.MyStyleSheet-myComponent > div {
display: ...;
}
Thanks.David Herman
06/03/2024, 10:54 PMval MyExampleStyle = CssStyle {
base { ... }
cssRule(" > div") {
...
}
}
is what I would do in general
You can also do
@InitSilk
fun initSilk(ctx: InitSilkContext) {
ctx.stylesheet.registerStyle("div.my-example") { ...
}
if including the div is really that important?