how can we set the color for when the user overscr...
# kobweb
c
how can we set the color for when the user overscrolls? I thought this was just the html backgound color - however the silk init from the demo/default app seems to not affect the overscroll areas
Copy code
@InitSilk
fun initTheme(ctx: InitSilkContext) {
    ctx.theme.palettes.light.background = Colors.Blue
}
s
no, the html element is also just an element spanning the full size of your page, not infinitely. you can either disable overscroll-behaviour or add an element underneath <html> with your desired color. but for these kind of questions, search the internet how that's solved with pure css/js first and then port that to kobweb and j/js
d
Also, I'm not sure exactly what effect you're going for. Do you have a video of it? Or have you ever visited another HTML page that had the effect you're trying to accomplish?
s
it's only happening on mobile browsers when you scroll a page beyond it's content. https://camlittle.com/posts/2020-05-15-css-overscroll-styling/
👍 1
d
Nice post! Gives me the impression that in general this isn't supported well unfortunately.
c
Thanks for the link - I was mistaken thinking it was widely supported in css