Skip to content

Modal not centering correctly when moving from small to large breakpoint. #55

@swthate

Description

@swthate

Howdy.

First of all, thanks for the great plugin. Now on to the issue...

On large screens the modal has a fixed width. At a certain breakpoint (called $large right now -- yeah, I'm going to be updating this project's naming conventions soon!) I switched its width to 100%, left and margin-left to 0, so that on smaller screens the modal screen snaps to the edges.

Everything works great so far.

Now, if I click open the modal window while my browser screen is small (so that the modal with 100% wide), and then stretch my browser screen to a large size, then the modal window has trouble centering itself. Rather than being nice and centered, it sits off to the right a bit.

Any ideas would be much appreciated.

Thanks!

P.S. Forgot to mention a gist with my markup and modal styles: https://gist.github.com/swthate/b94c5c15715d04606692

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions