Alternative box-shadow for dark theme. #8475
Open
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.
I've been looking into the recommendations for shadows in dark mode, and the most prominent one is just to remove them like in this article. However, another article suggested a different solution, and after a bit of experimentation, I think I like that we can have the same style for both modes.
Note: while the dark background is not really visible in dark mode, the additional opaque black shadow does create a slight contrast with the opaque white inset. To me it does feel like it has some kind of natural depth.
I am a bit undecided upon the "up" or "down" effect: in this article the "elevation" of an element is connected with the darkness and narrowness of the shadow. So if we want to keep being consistent, we want to have smaller shadow on hover (as well as darker, but that's already done). However, the current pub.dev implementation increases the shadow on hover, so I've kept it for now, but maybe we should rather go with the different direction?