Skip to content

Add dark mode toggle for functionality and styles#5160

Open
Sadrita404 wants to merge 1 commit into
google:masterfrom
Sadrita404:master
Open

Add dark mode toggle for functionality and styles#5160
Sadrita404 wants to merge 1 commit into
google:masterfrom
Sadrita404:master

Conversation

@Sadrita404
Copy link
Copy Markdown

Reference Issue

Overview

Added a day/night toggle switch right inside the 3D model box, letting users change the background and lighting in real time without messing up the rest of the page's styles.

Changes

  • Isolated Theme Scoping: Restricted all background changes strictly to the #demo-container using localized CSS classes, ensuring the left side and other page elements remain completely unaffected.
  • UI Transitions: Added simple CSS transitions to handle the colors, button borders, and icon rotation dynamically for a smooth, glitch-free click interaction.

Before

Before.mp4

After

After.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant