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

Overriding styles of the window #43

Closed
DrewRidley opened this issue Jun 9, 2021 · 4 comments
Closed

Overriding styles of the window #43

DrewRidley opened this issue Jun 9, 2021 · 4 comments

Comments

@DrewRidley
Copy link

DrewRidley commented Jun 9, 2021

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.

@flekschas
Copy link
Owner

flekschas commented Jun 9, 2021

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.

@DrewRidley
Copy link
Author

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!

@flekschas
Copy link
Owner

flekschas commented Jun 9, 2021

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)

@flekschas
Copy link
Owner

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

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

No branches or pull requests

2 participants