flekschas / svelte-simple-modal

A simple, small, and content-agnostic modal for Svelte v3 and v4
https://svelte.dev/repl/b95ce66b0ef34064a34afc5c0249f313
MIT License
422 stars 30 forks source link

Undesirable body styling #85

Closed abhijit-hota closed 2 years ago

abhijit-hota commented 2 years ago

Hello, thanks for the library!

I noticed that the body is given certain inline style which messes my app's whole layout when the modal is open. Can I know how can I disable/override those styles within an option/prop ? I'm overriding the styles by using extra CSS.

To be precise I don't want a position: fixed on the body.

flekschas commented 2 years ago

Unfortunately, I don't know how to prevent the page in the background from scrolling and not using position: fixed. If you know a way how to do that I am more than happy to update the modal.

For context see https://github.com/flekschas/svelte-simple-modal/issues/28

abhijit-hota commented 2 years ago

I see, thanks for the info. Right now, I'll just use position: relative !important on the body. It doesn't seem to break anything for me.

Thanks again.