Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

fix: move data attribute to light theme variables #631

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

georgewrmarshall
Copy link
Collaborator

Description

This PR addresses a critical issue where the data-theme="light" attribute was incorrectly applied only to brand variables, resulting in the light mode theme not being activated correctly across all theme variables. The change ensures that the data-theme="light" attribute now correctly influences all relevant theme variables, ensuring a consistent and accurate representation of the light mode across the application.

Reason for Change

The light mode theme was not being applied correctly due to the data-theme="light" attribute being limited to brand variables. This led to inconsistencies in the UI where certain elements did not reflect the intended light mode appearance.

Improvement/Solution

By moving the data-theme="light" attribute to affect all theme variables, we ensure a uniform application of the light mode theme across the application, enhancing the user experience and visual consistency.

Related issues

Fixes: #626

Manual testing steps

Same as here #627

Screenshots/Recordings

Same as #627

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues.
  • I've included manual testing steps.
  • I've included screenshots/recordings if applicable.
  • I’ve included tests if applicable.
  • I’ve documented my code using JSDoc format if applicable.
  • I’ve applied the right labels on the PR.
  • I’ve properly set the pull request status to "ready for review".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g., pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the issue it closes and includes the necessary testing evidence such as recordings and or screenshots.

@georgewrmarshall georgewrmarshall self-assigned this Feb 21, 2024
@georgewrmarshall georgewrmarshall added the team-design-system All issues relating to design system label Feb 21, 2024
@georgewrmarshall georgewrmarshall marked this pull request as ready for review February 21, 2024 18:03
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner February 21, 2024 18:03
@garrettbear garrettbear merged commit 5ac0846 into main Feb 21, 2024
17 checks passed
@garrettbear garrettbear deleted the fix/light-mode-theming branch February 21, 2024 18:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-design-system All issues relating to design system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Flexible Theme Switching with data-theme Attribute for Light and Dark Modes
3 participants