Skip to content

Conversation

@Vadank-Ji
Copy link

This pull request improves the dark mode toggle functionality and enhances the user interface by switching from a text-based button to an icon-based button, while maintaining compatibility with both variants. It also refines the dark mode styling for various UI elements.

User interface improvements:

  • The dark mode toggle button in index.html now displays a theme icon (dark_mode_icon.png) instead of text, using an <img> element for better visual clarity. The button retains accessibility via an aria-label.
  • The JavaScript for toggling dark mode (myFunction) is updated to support both icon and text-based toggles, switching the icon and/or the button text as appropriate depending on which is present.

Styling and dark mode enhancements:

  • Added .mode_icon and .dark-mode-icon CSS classes to invert the icon and swap between dark and light mode icons (dark_mode_icon.png and light_mode_icon.png) when toggling themes. [1] [2]
  • Introduced .dark-instructions CSS class to apply dark mode styling to instruction sections.

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