Skip to content

How to allow scrolling on modal if window is too small #283

Open
@johnwiseheart

Description

@johnwiseheart

Summary:

Hey, I'm having trouble with some styling of this library. I know its not a bug per-se, but figured it might be good to explore if anyone else has had or solved this issue. By default, the styling of the modal is not responsive, in that if you make the window height less than the modal height, you're not able to scroll the modal. This can be fixed by using a fixed height modal, but using a fixed height modal is restrictive on larger screens.

After some testing, I feel like there is a good solution to this using flexbox, but I haven't managed to find it yet.

TL;DR I'm trying to have a modal fit to its contents, but scroll if the window is too small.

Expected Behaviour

I'm trying to get the modal to function similarly to this codepen: https://codepen.io/anon/pen/Rodxjx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions