stefangabos / Zebra_Dialog

A small, compact, mobile-friendly and highly configurable jQuery plugin for creating gorgeous dialog boxes
http://stefangabos.github.io/Zebra_Dialog/flat.html
Other
155 stars 67 forks source link

Responsive #8

Closed DJaeger closed 7 years ago

DJaeger commented 7 years ago

Could you please tell me in which way the modal dialog boxes are responsive as mentioned in the description? Within the css the dimensions are defined with pixel values and there are also no media queries Also when testing it with the demo code on mobile phones it is breaking the viewport.

stefangabos commented 7 years ago

You'll have to use the custom_class property and specify a width in percentages

DJaeger commented 7 years ago

If it needs customizing it shouldn't be declared as responsive in the description. How about modifying the themes to be responsive by default? For example by setting "max-width: 100%" (Just an idea to make it responsive out of my head)?

stefangabos commented 7 years ago

max-width: 100% sounds right. I'll look into it later today. Thanks!

stefangabos commented 7 years ago

Adding

@media (max-width: 574px) {
    width: 100%;
}

to .ZebraDialog seems fine. Note that this uses Twitter Bootstrap's break-point of 574px

DJaeger commented 7 years ago

Sounds great. Why not adding max-width for all screen widths, just to be save?

stefangabos commented 7 years ago

Sounds good, I will add that also

DJaeger commented 7 years ago

:+1:

DJaeger commented 7 years ago

I have also seen, that the calculation of the dialog/modal position seems to calculate negative top positions, if the modal is higher than the viewport.

discotizer commented 7 years ago

I can confirm this. I'm fighting with this issue (dialog height exceeds display height) right now. Will check if the max-height does the trick here too.

stefangabos commented 7 years ago

Will fix this week

On Jul 3, 2017 12:49, "Discotizer" notifications@github.com wrote:

I can confirm this. I'm fighting with this issue (dialog height exceeds display height) right now. Will check if the max-height does the trick here too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stefangabos/Zebra_Dialog/issues/8#issuecomment-312601194, or mute the thread https://github.com/notifications/unsubscribe-auth/AAtPLc1XPMy032ajzwpuuFbo9xTUdGoRks5sKLkcgaJpZM4OHCOE .

stefangabos commented 7 years ago

Guys, is this ok now, can I close it?

DJaeger commented 7 years ago

I will check

discotizer commented 7 years ago

Yes, this works for me! Thanks for the fix.

DJaeger commented 7 years ago

It's still exceeding the viewport height. Could it be, that its because I use the AJAX source?

stefangabos commented 7 years ago

Make sure you are downloading the latest commit and not the release

DJaeger commented 7 years ago

I have tested with the raw dist files, but I will test again and give you feedback