Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 fill height of parent container scroll area #2865

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flixlix
Copy link

@flixlix flixlix commented Apr 24, 2024

Description

Ran into an issue, where the scroll area wouldn't take up the whole height of the parent container, only then did I notice there was an intermediate div being placed with display table. I get this is to match the height of the children, but this way I can't fill the height of the parent.

Here is an example where I need this:

In case the ScrollArea ViewPort does not overflow, I want a button to be at the bottom of the page, but in case the viewport gets bigger (scrolling gets enabled) I want the button to stay at the bottom of this child.

Before:

ScrollArea Content inherits the size from its children, so the button gets appended immediately after the cards (this would be the expected behaviour if we would've needed scrolling)

Screenshot 2024-04-24 at 19 30 30

After:

ScrollArea Content fills the whole page's height and thus the button can be at the very bottom of the page.

Screenshot 2024-04-24 at 19 16 49

Note

I've tried around with lots of other css styles but ultimately only this ended up working, if anyone has other suggestions, feel free :)

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.

None yet

1 participant