Skip to content

Add fading to overflowing callouts to indicate scrolling#13334

Merged
polypixeldev merged 1 commit intomainfrom
polypixeldev/callout-overflow-fade
Mar 31, 2026
Merged

Add fading to overflowing callouts to indicate scrolling#13334
polypixeldev merged 1 commit intomainfrom
polypixeldev/callout-overflow-fade

Conversation

@polypixeldev
Copy link
Copy Markdown
Member

Summary of the problem

Currently, we use an overflowing callout on the contract FAQ since there's a lot of items. However, if the browser automatically hides the scroll bar, it can be unclear that it is a scrollable container.

Closes #13240

Describe your changes

Adds fading (credit to stackoverflow) to overflowing callouts to indicate scrolling.

Screencast.From.2026-03-30.22-05-42.mp4

@polypixeldev polypixeldev requested a review from a team March 31, 2026 02:06
Copy link
Copy Markdown
Contributor

@YodaLightsabr YodaLightsabr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

.scroll-fade.is-top-overflowing {
--top-mask-size: 48px !important;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory !important isn't required here, but it doesn't make a difference either way

@polypixeldev polypixeldev added this pull request to the merge queue Mar 31, 2026
Merged via the queue into main with commit 4ccda28 Mar 31, 2026
18 checks passed
@polypixeldev polypixeldev deleted the polypixeldev/callout-overflow-fade branch March 31, 2026 14:50
github-merge-queue bot pushed a commit that referenced this pull request Apr 8, 2026
## Summary of the problem
<!-- Why are these changes being made? What problem does it solve? Link
any related issues to provide more details. -->
#13334 added fading to overflowing contracts to indicate scrolling.
However, it didn't attach event listeners on Turbo load, applied fading
when it shouldn't have, and removed padding on non-overflowing callouts.

## Describe your changes
<!-- Explain your thought process to the solution and provide a quick
summary of the changes. -->
Attach listeners on turbo load, add check for if an element scrolls, and
fixes the padding.

<!-- If there are any visual changes, please attach images, videos, or
gifs. -->

---------

Co-authored-by: yodalightsabr <yoda@yodacode.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contracts] Fade out the FAQ section so it's more obvious you can scroll.

2 participants