tailwindcss-elevation
tailwindcss-elevation copied to clipboard
Dark/light mode should have a color overlay on background to match material elevation
Great plugin.
I would like to suggest a color overlay that more closely match the material design, which is to add an overlay that makes the background brighter or darker as the elevation increases based on the variant.
Seen here: https://m3.material.io/styles/elevation/overview One thing to note is that while it's not listed here, it is my understanding that in material 2 this would result in a lighter overlay for dark modes.
Thank you writing the issue! I'm gonna look into this more in a couple of weeks. Just to be clear, the two issues are:
- Unlike M2, M3 doesn't apply shadows by default to all levels of elevation and instead uses color to achieve the elevation effect.
- Even when using shadows (the M2 way), the plugin needs to support different box shadows when switching between dark and light modes.
Yep, that's correct.
M3 can still apply shadow(although, optional), but it's to differentiate elevations if they have similar color (I believe?).