chenjiahan / vodal

A Vue modal with animations.
https://chenjiahan.github.io/vodal/
MIT License
379 stars 58 forks source link

Auto size modal height #15

Open marcodpt opened 6 years ago

marcodpt commented 6 years ago

Is there a way of modal height be computed with the slot html? My main problem is that for my use i cannot pass a fix height for the modal, because vary a lot depend on the form that user will trigger!

zacharytyhacz commented 5 years ago

I agree, I was just having this issue by using a modal to preview a video, though the videos can be different sizes/dimensions.

You can try fiddling around with the class styles as a work-around to try:

.vodal-dialogue {
    /* .... */
}

However, I do agree with you that the size properties should have an auto value to be given to just fit the contents within.

Something like this maybe?

<vodal :show="true" :height="'auto'" :width="'auto'" ... ... ...></vodal>

Another note that I would like to see is a max_width / max_height, however this can be done in CSS, though not programmatically depending on certain conditions if it were to change.

EDIT Having something like this implemented may help out this issue as well that is also a problem I have ran into in the past with using these vodals:

weblabio commented 3 years ago

+1 while the height is static - the plugin cannot be used :(

zacharytyhacz commented 3 years ago

+1 while the height is static - the plugin cannot be used :(

Have you tried overriding with CSS ?

fabionixweb commented 3 years ago

.vodal-dialog { height: max-content !important; }