Skip to content

Comments

fix dark mode btn rotation angle on toggling#429

Merged
adityadomle merged 1 commit intoadityadomle:mainfrom
mesumittiwari:dark-mode-btn-fix
Sep 17, 2025
Merged

fix dark mode btn rotation angle on toggling#429
adityadomle merged 1 commit intoadityadomle:mainfrom
mesumittiwari:dark-mode-btn-fix

Conversation

@mesumittiwari
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

The theme toggle button in both desktop and mobile navigation was displaying an inverted/upside-down moon icon in light mode due to a 180-degree rotation being applied. This created a poor visual experience and made the icon appear broken or incorrectly oriented. The fix maintains the smooth rotation animation while ensuring the moon icon displays correctly in its upright position.

What changes are included in this PR?

  • Fixed desktop theme toggle: Changed moon icon rotation from rotate-180 to rotate-[360deg] in ModernNavbar component
  • Fixed mobile theme toggle: Applied the same rotation fix to the mobile menu theme toggle
  • Preserved animation: Maintained the smooth 500ms transition duration for the rotation effect
  • Maintained functionality: No changes to theme switching logic or state management

Are these changes tested?

Screenshot:
image

Manual testing performed:

  • Verified moon icon displays upright in light mode (both desktop & mobile)
  • Verified sun icon displays correctly in dark mode (both desktop & mobile)
  • Confirmed smooth rotation animation still works when switching themes
  • Tested theme persistence across page refreshes
  • Verified no console errors or warnings

Browser compatibility tested:

  • Chrome (desktop & mobile emulator)
  • Firefox

Are there any user-facing changes?

Yes - Visual improvement only:

  • Moon icon now displays correctly (upright) in light mode instead of appearing inverted
  • Maintains the smooth rotation animation users expect when switching themes
  • No functional changes to theme switching behavior
  • No API changes or breaking changes to any components

@vercel
Copy link

vercel bot commented Sep 16, 2025

@mesumittiwari is attempting to deploy a commit to the Aditya Domle's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@vercel
Copy link

vercel bot commented Sep 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
biz-flow Ready Ready Preview Comment Sep 17, 2025 4:29am

Copy link
Owner

@adityadomle adityadomle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great.

@adityadomle adityadomle merged commit 62c1381 into adityadomle:main Sep 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GSSoC25 Gssoc25 Official Open source project. Level 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Inverted Dark Mode Icon

2 participants