Support Shadows overrides
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Summary 💡
Shadows should be configurable and extensible the same way as the colour palette
Examples 🌈
declare module '@mui/material/styles/createShadow' {
interface DepthRange {
0: string,
1: string,
2: string,
3: string,
4: string
}
interface Shadow {
neutral: DepthRange ,
downward: DepthRange ,
upward: DepthRange
}
}
<Box sx={{ boxShadow: 'neutral.0' }}>…
<Box sx={{ boxShadow: 'downward.3' }}>…
<Box sx={{ boxShadow: 'upward.4' }}>…
<Box sx={{ boxShadow: 'neutral.3' }}>…
Motivation 🔦
Make MUI a more customizable extensible UI framework
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
<type> '<typename>' shadows an overridable method in the ...
If you want to override the base method, this method must be declared 'Overrides'. A programming element is declared with the same name...
Read more >'Shadows' vs. 'Overrides' in VB.NET - Stack Overflow
Shadows is a distinct and useful concept. It hides all base class methods with the same name and forces the use of the...
Read more >Overriding Vs Shadowing in C# - C# Corner
This article will help you understand the difference between shadowing (method hiding) and overriding.
Read more >Support Shadows overrides · mui/material-ui@961cb63 · GitHub
It includes Material UI that implement Google's Material Design. - Support Shadows overrides · mui/material-ui@961cb63.
Read more >How to override shadow strength for directional light?
The shadow strength of 1 means 100% shadow, 0% light, so it's physically and logically impossible to exceed 1. The shadow color is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any updates on this issue?
A very simple patch that worked for me was changing the file at
@mui/material/styles/shadows.d.ts
like this:I was then able to augment the interface and extend the theme.
@mnajdova Thanks, me and @danilo-leal will take this into account for the new design system.