[RFC][CssVarsProvider] Ability to change shadow color on each color scheme
Open
@siriwatknp is already working on this.
Since Sep 25, 2023.
customization: theme
RFC
scope: system
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
What's the problem? 🤔
Current experimental_extendTheme will accpet Partial<Record<SupportedColorScheme, ColorSystemOptions>> which is:
export interface ColorSystem {
palette: Palette & CssVarsPalette;
opacity: Opacity;
overlays: Overlays;
}
But we need to set each shadow color on each color scheme light and dark (or another).
What are the requirements? ❓
Nothing
What are our options? 💡
Never thought
Proposed solution 🟢
Change type of ColorSystem to:
export interface ColorSystem {
palette: Palette & CssVarsPalette;
opacity: Opacity;
overlays: Overlays;
shadows: Theme['shadows'];
}
And thus we need to make change to generate processes?
Default approach for this was, setting shadows with theme palette mode like:
shadows: mode === 'light' ? lightShadows : darkShadows // Also component's approach is same
But this approach will not work
Resources and benchmarks 🔗
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.