Open the hero at the edges so the animation reads as its art - #387
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
The hero's dark overlay was the wrong way round. It was lightest in the middle, right behind the copy, and near black everywhere else, so the canvas animation (the one thing the hero exists to show) only appeared as a faint glow under the words. The reference does the opposite: art at the sides, dark behind the centred text.
This flips it. The overlay is now 90% dark behind the copy and opens to 15% at the edges, the canvas runs at full opacity, and a short fade at the bottom hands over to the deploy strip.
Measured
Same production build before and after, in headless Chrome. For contrast, the hero text is hidden, the backdrop behind each line is sampled across four animation frames, and the brightest sample is kept. For edge brightness, the mean luma of the outer thirds of the hero, brightest frame.
So the art got brighter where it is meant to show, and the copy got more contrast, not less. The paragraph on a phone was the tightest line on the page at 4.78:1 and now has real margin. The microcopy dips slightly because it sits lower, where the overlay starts to open, and stays well clear of 4.5:1.
The existing hero tests still hold: the animation is the section's full-bleed backdrop, and nothing veils it with a fade from the page background.
Suite 485 passing.
tsc --noEmitclean,eslintclean, production build clean.Note, added later. A contrast probe used in later work turned out to average the whole screenshot instead of the pixels behind the text: in sharp 0.34,
extract().stats()ignores the crop. The script behind the figures above no longer exists, so I cannot tell whether it had the same fault, and the figures should be treated as unverified. The surface measured here has since been redesigned. Current figures, measured correctly, are in the corrections on #399 and #400.