reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
20.42k stars 1.18k forks source link

Let top level theming for class_name work. #4423

Open hjpr opened 2 days ago

hjpr commented 2 days ago

When doing top level styling at the rx.App level, passing class_name to a component as part of a style library doesn't work. I enjoy the coloring and theming of tailwind so I'd like to be able to say

style = {
    rx.flex: {
        "class_name": "bg-white dark:bg-zinc-700"
    },
    rx.text: {
        "class_name": "text-zinc-700 dark:text-zinc-50"
    }
}

app = rx.App(style=style)

Don't have the reflex know-how to understand where the css interpretation is happening and create a conditional for tailwind prop. Thanks!

linear[bot] commented 2 days ago

ENG-4136 Let top level theming for class_name work.

hjpr commented 2 hours ago

Attempted to tackle this but feel like I'm missing something...