jeff
05/29/2024, 2:40 PMoverscroll-behavior
on my body
Trying this:
ctx.stylesheet.registerStyleBase("body") {
Modifier.attrsModifier { attr("overscroll-behavior", "none") }
.height(100.vh)
.width(100.vw)
}
Gives this:
IllegalStateException: ComponentStyle declarations cannot contain Modifiers that specify attributes. Please move Modifiers associated with attributes to the ComponentStyle'sBut switching to this:parameter.extraModifiers
ctx.stylesheet.registerStyleBase(
"body",
extraModifiers = Modifier.attrsModifier { attr("overscroll-behavior", "none") },
) {
Modifier.height(100.vh).width(100.vw)
}
isn't applying overscroll-behavior
to body
. Any ideas?David Herman
05/29/2024, 4:54 PM@App
method, something like:val RootStyle = ComponentStyle(extraModifiers = ...) {
...
}
@App
@Composable
fun AppEntry(content: ...) {
SilkApp {
Surface(RootStyle.toModifier()) {
content()
}
}
}
David Herman
05/29/2024, 5:16 PMDavid Herman
05/29/2024, 5:16 PMoverscroll-behavior
is a CSS style, not an HTML attributeDavid Herman
05/29/2024, 5:17 PMctx.stylesheet.registerStyleBase("body") {
Modifier.styleModifier { property("overscroll-behavior", "none") }
.height(100.vh)
.width(100.vw)
}
jeff
05/29/2024, 5:28 PMjeff
05/29/2024, 5:28 PMjeff
05/29/2024, 5:29 PM