Add color-scheme selection component#3825
Merged
amanmahajan7 merged 6 commits intomainfrom Jul 22, 2025
Merged
Conversation
color-scheme)
color-scheme)color-scheme)
color-scheme)color-scheme selection component
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3825 +/- ##
==========================================
- Coverage 98.61% 98.61% -0.01%
==========================================
Files 46 46
Lines 3615 3611 -4
Branches 773 773
==========================================
- Hits 3565 3561 -4
Misses 50 50
🚀 New features to boost your workflow:
|
amanmahajan7
commented
Jul 22, 2025
| --_rdg-color-scheme: var(--rdg-color-scheme); | ||
| } | ||
|
|
||
| &.rdg-dark { |
Collaborator
Author
There was a problem hiding this comment.
Can still force dark mode using this class
amanmahajan7
commented
Jul 22, 2025
| --rdg-row-selected-background-color: light-dark(hsl(207deg 76% 92%), hsl(207deg 76% 42%)); | ||
| --rdg-row-selected-hover-background-color: light-dark(hsl(207deg 76% 88%), hsl(207deg 76% 38%)); | ||
| --rdg-checkbox-focus-color: hsl(207deg 100% 69%); | ||
| --_rdg-color-scheme: var(--rdg-color-scheme, light dark); |
Collaborator
Author
There was a problem hiding this comment.
It is easy to override the default light/dark styles if needed by setting a variable
:root {
--rdg-color-scheme: light;
}
grid is now always rendered in the light mode
nstepien
reviewed
Jul 22, 2025
Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
nstepien
approved these changes
Jul 22, 2025
royue
pushed a commit
to royue/react-data-grid
that referenced
this pull request
Dec 17, 2025
* Add an open to select color-scheme * Add label * Rename * Simplify * Update src/style/core.ts Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com> * Add space --------- Co-authored-by: Nicolas Stepien <567105+nstepien@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/light-dark
System

Dark

Light

Adding

rdg-darkclassname in light modeAdding

rdg-lightclassname in dark mode