Skip to content

馃悶Light/Dark toggle inconsistencies + header banner theming & ScrollToTop UX improvements馃悶#222

Description

@ayushpandey101

Describe the bug

  • Light/Dark toggle does not consistently apply theme to the header banner and global styles.
  • Theme state sometimes resets on refresh/navigation.
  • ScrollToTop button has inconsistent theming/contrast in Dark mode and overlaps footer on small screens.
Image

To Reproduce

  1. Open the app.
  2. Toggle between Light and Dark themes.
  3. Observe header banner colors/contrast and ScrollToTop styling.
  4. Refresh the page and note if the selected theme persists.

Expected behavior

  • Theme applies instantly and consistently across the app (including header banner and ScrollToTop).
  • Selected theme persists across reloads/routes with no flash of incorrect theme.
  • ScrollToTop is themed, accessible, does not overlap content, and provides smooth scroll.

End Result:

Dark Mode:

Image

Light Mode:

Image

Additional context

Affected files: ScrollToTop.jsx, ThemeToggle.css, Header.css, index.css
Proposed updates:

  • Drive theme via data-theme on html and CSS variables in index.css; consume vars in ThemeToggle.css/Header.css.
  • Persist theme (e.g., localStorage) and initialize on load; respect prefers-color-scheme.
  • ScrollToTop.jsx: use CSS vars for colors, add aria-label and focus styles, set visibility threshold, smooth scroll (respect reduced motion), and adjust z-index/position to avoid overlap.

Metadata

Metadata

Labels

GSSOC 25Issues/PRs participating in GirlScript Summer of Code 2025Level 1Easy issue - 3 Points (GSSoC'25)bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions