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

fix: fixes the overflow when a toast is displayed on mobile #429

Merged
merged 2 commits into from
Sep 28, 2023
Merged

fix: fixes the overflow when a toast is displayed on mobile #429

merged 2 commits into from
Sep 28, 2023

Conversation

BayBreezy
Copy link
Contributor

On mobile, rendering the toast component would cause an overflow on the x axis.
After inspecting the DOM, I realised that adding a width of 0px and display of inline-block fixed the issue.

Copy link
Member

@zernonia zernonia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zernonia
Copy link
Member

maybe there's something we're missing on mobile.. causing it to renders differently

@zernonia
Copy link
Member

zernonia commented Sep 28, 2023

I just check on mobile.. seems like text-slate12 is not computing the desired css. It should have nothing to do with visuallyHidden tho.. adding your propose solution doesn't work too.

image

@BayBreezy
Copy link
Contributor Author

Hey @zernonia , the element in question is actually the span tag that renders the text from the toast
image

@zernonia
Copy link
Member

zernonia commented Sep 28, 2023

Icic.. could you screenshot what is the UI looks like currently with that element pushing the UI?

@BayBreezy
Copy link
Contributor Author

When I add the proposed styles to that element in the DOM, the toast gets rendered properly
image

But without the styles, I get this overflow
image

@Blinks44
Copy link

Hm, even mobile version on radix-vue.com looks like this after showing a toast.

2023-09-28_13-56-19

@zernonia
Copy link
Member

zernonia commented Sep 28, 2023

thanks guys!!! I realized my stupid mistake lol...

it should be 1px, and not number 1 when we apply styling. @BayBreezy instead of setting 0px, can you help with fixing the height, width and margin by adding the word px? 😁

@BayBreezy
Copy link
Contributor Author

Sure thing. And leave the display as inline-block correct? From what I remember about css, width and won't have an effect on items that are displayed inline

Copy link
Member

@zernonia zernonia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!! I think leaving inline-block should be fine 😁!

Thanks @BayBreezy !

@zernonia zernonia merged commit d24dc6c into radix-vue:main Sep 28, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants