Add scroll fade indicators to Modal content area.#1811
Open
bendansby wants to merge 1 commit into
Open
Conversation
Use the four-layer scroll-shadow background trick (two local-attached white covers at top and bottom that scroll with the content, plus two fixed dark gradients) so a soft fade is visible above and below the scrollable region only when there is content out of view in that direction. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Context
When the Modal's content overflows the visible area, there was no visual indication that more content existed beyond the top or bottom edge. This adds a soft fade above/below the scrollable region that appears only when there's content scrolled out of view in that direction.
🔧 What changes
background-attachment: localwhite "covers" at top and bottom that scroll with the content. They sit over the static shadows when you're at the edge, hiding them.background-attachment: scrolldark gradients that stay fixed to the viewport. As soon as content scrolls past an edge, the cover moves out of the way and the shadow is revealed.Component completion checklist
Notes for reviewers
background-attachment: localvsscrollto detect overflow direction.