This PR introduces light and dark class names to CSS variables, associating them with [data-theme="light"] and [data-theme="dark"], respectively. These additions are crucial for enabling the use of CSS variables on mobile platforms and allow theme-specific styling to be applied at the component level. The light class is also necessary to apply a light theme to specific components while the overall theme is set to dark mode, ensuring consistent visual design across different scenarios.
Related issues
Fixes: #728
Manual testing steps
Navigate to a page where theme variables are utilized.
Switch between light and dark themes using the [data-theme] attribute.
Apply the light and dark class names at the component level and verify that the styles are applied correctly.
Confirm that the light class overrides the dark theme for specific components when in dark mode.
Screenshots/Recordings
Before
After
When testing in design-tokens repo you need to add a background default variable so that you can better see the change between light and dark mode. Example below
Video demonstrating data-theme="light", data-theme="dark", .light, and .dark working. Additionally using the class at component level.
[x] I've clearly explained what problem this PR is solving and how it is solved.
[x] I've linked related issues.
[x] I've included manual testing steps.
[ ] I've included screenshots/recordings if applicable.
[x] I’ve included tests if applicable.
[x] I’ve documented my code using JSDoc format if applicable.
[x] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
[ ] I’ve properly set the pull request status:
[ ] In case it's not yet "ready for review", I've set it to "draft".
[ ] In case it's "ready for review", I've changed it from "draft" to "non-draft".
Pre-merge reviewer checklist
[ ] I've manually tested the PR (e.g., pulled and built the branch, run the app, tested the code being changed).
[ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and/or screenshots.
Description
This PR introduces
light
anddark
class names to CSS variables, associating them with[data-theme="light"]
and[data-theme="dark"]
, respectively. These additions are crucial for enabling the use of CSS variables on mobile platforms and allow theme-specific styling to be applied at the component level. Thelight
class is also necessary to apply a light theme to specific components while the overall theme is set to dark mode, ensuring consistent visual design across different scenarios.Related issues
Fixes: #728
Manual testing steps
[data-theme]
attribute.light
anddark
class names at the component level and verify that the styles are applied correctly.light
class overrides the dark theme for specific components when in dark mode.Screenshots/Recordings
Before
After
When testing in design-tokens repo you need to add a background default variable so that you can better see the change between light and dark mode. Example below
Video demonstrating data-theme="light", data-theme="dark", .light, and .dark working. Additionally using the class at component level.
https://github.com/user-attachments/assets/c7c6e48a-f827-4194-8067-6a6179747549
Pre-merge author checklist
Pre-merge reviewer checklist