varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.51k stars 66 forks source link

Figure out how variables interact with Kobweb / Silk #210

Closed bitspittle closed 10 months ago

bitspittle commented 1 year ago

For example, should I be using variables for styles instead of creating dark / light versions?

Should themed colors be replaced with variables where people can override them that way in some subwindow?

bitspittle commented 1 year ago

Make sure all custom css classes we create inherit from CSSStyleValue or whatever the type is that lets us set things as variables

bitspittle commented 1 year ago

I already added a StyleVariable concept to Silk, but I still need something that needs to be color mode aware.

NOTE: This won't replace palettes but will instead build on top of them.

What I'm thinking....

bitspittle commented 10 months ago

I think we can close this now. The current system is something I'm satisfied with.

Variables are set here: https://github.com/varabyte/kobweb/blob/a6061d7a3b53383e055a94ef4aa430af6647f8b4/frontend/silk-widgets/src/jsMain/kotlin/com/varabyte/kobweb/silk/init/InitSilkWidgets.kt#L309