Repository navigation
Add light/dark color themes and TailwindCSS configuration - #1
Merged
Merged
Conversation
… import into global styles
…lwind.css file and update global imports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a dark mode theme to the application by implementing theme initialization logic, defining light and dark color schemes, and updating styles and component classes to use CSS variables. The changes ensure consistent theming and make it easy to switch between light and dark modes based on user preference or system settings.
Dark mode and theme initialization:
public/theme-init.js) that sets thedarkclass on the root element based onlocalStorageor system preference, and included it inindex.htmlto ensure correct theme is applied before rendering. [1] [2]Theming infrastructure and color variables:
src/styles/themes/light.css,src/styles/themes/dark.css) with custom CSS variables for colors, and imported them in a central theme index (src/styles/themes/index.css). [1] [2] [3]src/styles/tailwind.cssto map theme variables to Tailwind custom properties, enabling consistent color usage throughout the app.Global and component style updates:
src/styles/index.css) to import the new theme and Tailwind files, and defined a customdarkvariant for easier dark mode targeting.src/App.tsx) to use the new CSS variable-based color classes (bg-background,text-primary,text-muted-foreground, etc.) instead of hardcoded Tailwind colors, ensuring components respond to theme changes.