-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Themetoggle and Improve Footer Text Visibility #422
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,12 @@ | |
background-color: #004d43; | ||
border-radius: 10px; | ||
} | ||
:root { | ||
--transition-duration: 500ms; | ||
} | ||
Comment on lines
+45
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Remove unused CSS variable --transition-duration The
🔗 Analysis chainVerify the usage of --transition-duration variable. The new CSS variable appears to be intended for theme transition animations, but its usage is not visible in the provided changes. Let's check if the variable is used in any way, even without the var() syntax, and also look for transition properties in general to understand the context better. The previous search showed the variable declaration but we need to verify its usage across both CSS and JavaScript files, as it might be used in component styles or dynamic CSS. Let's do a broader search to ensure we don't miss any usage of this variable, including in JavaScript/TypeScript files where it might be used in template literals or style objects. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for usage of the transition-duration variable
rg "var\(--transition-duration\)"
Length of output: 126 Script: #!/bin/bash
# Search for any transition-related properties in CSS files
rg "transition" --type css
# Also search for the exact variable name without var() wrapper
rg "--transition-duration" --type css
Length of output: 627 Script: #!/bin/bash
# Search for the variable with proper escaping
rg "\-\-transition\-duration" --type css
# Let's also check JavaScript/JSX files for potential usage
rg "transition" --type js --type jsx -A 2
Length of output: 167 Script: #!/bin/bash
# Search in all files (not just css) to catch any potential usage
rg "\-\-transition\-duration"
# Search for transition-related properties in all frontend files
fd . frontend -t f -e js -e jsx -e tsx -e css | xargs rg "transition"
Length of output: 9617 |
||
|
||
/* Enable dark mode */ | ||
html.dark { | ||
background-color: #1a202c; /* Dark slate background */ | ||
color: #f0e7db; /* Light text */ | ||
} | ||
Comment on lines
+49
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add transitions for smooth theme switching. The dark mode colors provide excellent contrast (14:1 ratio) for accessibility. However, consider adding transitions for a smoother theme switch experience. html.dark {
+ transition: background-color var(--transition-duration) ease-in-out,
+ color var(--transition-duration) ease-in-out;
background-color: #1a202c; /* Dark slate background */
color: #f0e7db; /* Light text */
}
+
+html {
+ transition: background-color var(--transition-duration) ease-in-out,
+ color var(--transition-duration) ease-in-out;
+}
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Refactor duplicate icon animation styles.
The sun and moon icons share similar animation logic with hardcoded transition durations. Consider extracting common styles and using the CSS variable.
📝 Committable suggestion