Is there a kotlinjs wrapper that's compatible with...
# kotlinx-html
r
Is there a kotlinjs wrapper that's compatible with kotlinx.html on the frontend for doing css? I've been experimenting with frontend kotlinx.html here: https://github.com/reubenfirmin/kdemo.cc, and so far have been using tailwind only for styling (which is fine as far as it goes). https://jetbrains.github.io/kotlin-wrappers/kotlin-styled-next/index.html seems react centric. https://jetbrains.github.io/kotlin-wrappers/kotlin-css/index.html might work, though I'm unclear about how I'd use it other than giving everything a class (which...maybe)
kotlin-css works reasonably enough. I made this shim:
Copy code
fun CommonAttributeGroupFacade.css(block: CssBuilder.() -> Unit) {
    style = CssBuilder().apply {
        block()
    }.toString().removeSuffix("\n")
}
So now I can use it in dsl like: https://github.com/reubenfirmin/kdemo.cc/blob/main/src/jsMain/kotlin/org/example/pages/home/StyleCard.kt (WIP - I haven't figured out the animation dsl yet)