https://kotlinlang.org logo
Title
m

Marko Novakovic

05/13/2021, 3:14 PM
how does theming work in
compose-web
?
c

Casey Brooks

05/13/2021, 3:19 PM
Compose Web currently works with the normal browser DOM, so…. CSS. You use regular CSS as normal, and/or apply dynamic styling using the
@Composable
style { }
builder
m

Marko Novakovic

05/13/2021, 3:20 PM
@Casey Brooks thanks!
c

Chris Sinco [G]

05/13/2021, 7:28 PM
It’s nice since you can use existing CSS libraries for theming and layout, like Bootstrap and Foundation
This is what I did to reuse Foundation but make it so I had a nice authoring experience in Kotlin: https://github.com/c5inco/portfolio-compose/blob/main/src/jsMain/kotlin/com/c5inco/portfolio/styles/ExternalStyles.kt
Then you just call it in the list of classes
m

Marko Novakovic

05/13/2021, 7:35 PM
this will be really helpful
👍 1
b

Big Chungus

05/23/2021, 6:38 PM
Somewhat related, but how do you change css values/varables from button click handler? I'm thinking how to implement light/dark theme switch