material-components-ios
material-components-ios copied to clipboard
[ShadowElevations] Defined elevation for Card Resting does not match guidelines
According to Material Design guidelines the card resting elevations should be set to 1.
MDCShadowElevationCardResting is defined as 2.
Reproduction steps
Use MDCCardView with default values, then compare to MDCCardView after setting shadow elevation to MDCShadowElevationCardResting. There is visible difference in shadow and shadow elevation values does not match.
Expected behavior
Default elevation for MDCCardView should be the same as MDCShadowElevationCardResting value. And both should match guidelines. Currently only MDCCardView default elevation does match guidelines.
Actual behavior
Using default values for MDCCardView gives different result to setting MDCShadowElevationCardResting manually.
Platform
- Device: any
- OS: any
Additional context
Link to related guidelines: https://material.io/design/environment/elevation.html
This is probably the line that creates this bug ;) https://github.com/material-components/material-components-ios/blob/e479b366e735e55056b93559b6dc5eb29e4af47a/components/ShadowElevations/src/MDCShadowElevations.h#L46