Styles: docs and CSS variables #139
andrecasal
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
Also, I'd love to hear your thoughts on styling by HTML tags (h1, h2, h3, h4, h5, h6, input, select, etc) in the |
Beta Was this translation helpful? Give feedback.
1 reply
-
I'm a fan of the suggested solution. I've done it this way before and I liked it. Would you be interested in making a PR for that? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've recently migrated my platform to the Epic Stack's latest version.
Styles keep being a bit of a pain because there are custom styles configured in
tailwind.config.ts
and they are spread throughout the code base.Screenshot of a search for the "-night-" class
It's a bit painful to delete all those 👆 classes.
I'd like to propose two things:
Implement the theme switch by changing CSS Variable's values
Change the CSS Variable's values according to the theme:
tailwind.css
:Use those CSS variables in your semantic styles:
tailwind.config.ts
:This way you can build your entire app with your semantic styles, while still having a single source of truth in your
tailwind.css
file.The only down-side to this is that we lose the ability to see the colors in VS Code and we see the CSS variable instead:
Beta Was this translation helpful? Give feedback.
All reactions