flekschas/svelte-simple-modal

Overriding styles of the window

DrewRidley opened this issue · 4 comments

Good evening,

When attempting to use svelte-simple-modal with my project, I tired to use the styleWindow option to specify a width for the modal. Unfortunately it appears that styles in styleWindow which overwrite the default styling are not applied. Perhaps this is my ignorance on how to properly use the library.

Thanks in advance,
Drew.

What exactly have you tried? A code example of what you tried would be really helpful, otherwise it's hard to figure out what went wrong.

Not really sure, but I replaced 20rem with 20em and it appears to have worked. Not sure why. I think I can safely close this issue though. Thanks for your hard work put into this great library!

Mhhh it should have worked either way. If you have an example with the Sevlte repl that'd be helpful (simply clone the demo from https://svelte.dev/repl/033e824fad0a4e34907666e7196caec4)

Just tested the following:

<Modal show={$modal} styleWindow={{ width: '10rem' }}>
	<Content />
</Modal>

And it works as expected.

Feel free to test yourself with https://svelte.dev/repl/033e824fad0a4e34907666e7196caec4