fix: overlay now renders above animation canvas for proper text contrast#93
Open
DennisGaida wants to merge 1 commit into
Open
fix: overlay now renders above animation canvas for proper text contrast#93DennisGaida wants to merge 1 commit into
DennisGaida wants to merge 1 commit into
Conversation
The ::before overlay pseudo-element was at z-index 0 with no explicit z-index on .canvas-container, causing the canvas to paint on top of the overlay in DOM order. Setting canvas-container to z-index 0, overlay to z-index 1, and content to z-index 2 ensures the dark overlay sits between the animation and the text, making overlay_opacity actually affect text readability.
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 overlay_opacity config option had no visible effect on the weather animation. Setting it to 1.0 would darken the background gradient but leave the animated canvas completely unaffected, making text just as hard to read as without any overlay.
Description
The dark overlay is implemented as a ::before pseudo-element on .weather-card. It was assigned z-index: 0, but .canvas-container (the animation canvas) had no explicit z-index set hence having both at the same level and pretty much no overlay. Overlay was actually behind the animation.
Adjusted the stacking order so the overlay sits between the animation canvas and the text content.
Type of Change
Related Issues
Fixes #
Checklist
bun run lintpassedbun run typecheckpassedbun run buildsuccessful