nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.14k stars 549 forks source link

UModal gains padding when used on mobile with the fullscreen prop #811

Closed KeoneSomers closed 1 year ago

KeoneSomers commented 1 year ago

Environment

Version

v2.9.0

Reproduction

https://ui.nuxt.com/overlays/modal#fullscreen

You can simple head to the docs for the fullscreen modal, open the modal and resize the browser to a smaller mobile size and the padding will appear around the modal.

Description

When using the UModal component with the "fullscreen" prop and changing the screen size to mobile using the browser dev tools, the modal gains a p-4 class on the backdrop element that is not normally there when fullscreen is enabled.

This effect only seems to occur on mobile screens and when the screen size is increased the padding is lost and the fullscreen modal looks normal again.

I have also been able to reproduce it on a mobile device and had the same effect.

Due to the extra padding, on mobile the screen agains a scrollbar to account for the extra vertical space.

Additional context

image

Logs

No response

benjamincanac commented 1 year ago

Thanks for the report 😊

lisisistemas commented 7 months ago

Hi All, How can I change the width of a UModal component? I´m trying to do this, but no success. Thanks in advance.

BillSamaras commented 6 months ago

@lisisistemas

You can try to add

<UModal :ui="{ width: 'w-full sm:max-w-3xl' }">

at your UModal.

I had the same issue, but I managed to get through based on the documentation here https://ui.nuxt.com/getting-started/theming