feat: Reduce blurriness of container shadows against dark header background in VR#702
Merged
feat: Reduce blurriness of container shadows against dark header background in VR#702
Conversation
Codecov ReportBase: 93.27% // Head: 93.26% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #702 +/- ##
==========================================
- Coverage 93.27% 93.26% -0.01%
==========================================
Files 584 584
Lines 17075 17066 -9
Branches 4704 4699 -5
==========================================
- Hits 15926 15917 -9
Misses 1069 1069
Partials 80 80
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Member
michaeldowseza
left a comment
There was a problem hiding this comment.
Added some comments . A lot of the consts now change to a 0px offset and can probably be removed.
1374b9c to
bfb3395
Compare
michaeldowseza
approved these changes
Feb 7, 2023
…ontexts; use mix-blend-mode multiply
bfb3395 to
85155a9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The main purpose of this commit is to reduce the "blurriness" or "halo" effect when a container shadow overlaps a dark header in VR (AWSUI-19630). See screenshot below for before/after (note: the previous is on the right, the updated is on the left):
The way it accomplishes this is by adding
mix-blend-mode: multiplyto container shadows. In order to ensure themix-blend-modeonly effects the container shadow and not the content inside, the shadow has been moved to a pseudo element (::after) so that it can be treated as it’s own layer.With this change, the container border has also been moved to a separate pseudo element (
::before), so it can receive a different stacking context from the shadow and not blend with the background. This largely removes the need to account for the border in sticky header offset calculations, as well as padding values in selected cards.As a result, this commit also removes some outdated code that was originally needed for IE11 support, as well as some border calculations that are no longer needed.
Lastly, this change slightly increases the contrast of VR shadows in dark mode to make the container perimeter more noticeable, which has also been repeated feedback (AWSUI-16528). The updates have been reviewed and approved by visual design. Note: the previous is on the right, the updated is on the left:
Related links, issue #, if available: AWSUI-19630, AWSUI-16528
How has this been tested?
Ran through the pipeline; checked screenshots in Chrome, Firefox, Safari. Also reviewed with visual designer to approve shadow changes.
See changes in pipeline: AwsUi-v3-jkuelz (approval attempt: 314060285, 314765186)
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.