I noticed that when my styles are private the gene...
# kobweb
f
I noticed that when my styles are private the generated page is just a white screen but it works fin when it is public
Copy code
val EditorKeyStyle by ComponentStyle {
    base {
        Modifier
            .background(Colors.Transparent)
            .transition(CSSTransition(TransitionProperty.of("background"), duration = <http://300.ms|300.ms>))
    }
    hover {
        Modifier.background(AppColors.Primary.rgb)
    }
}
d
Sure, if you look at the generated code (search for main.kt under your build file) you'll understand. But did you miss the huge warning that showed up when you set the style to private?
f
I think I did, I'll check again.
Seen
d
I've taken a note to add docs to the README soon, about why ComponentStyle has to be public (you're not the first person to ask about this for sure). I'll try to remember to ping here when I do.
🙌 1
OK! Added a brief section to the README about why component styles must be public: https://github.com/varabyte/kobweb#componentstyle
(Applies to component variants and keyframes as well)
If you read that, let me know if it's clear or if anything still doesn't make sense