Skip to content

Feature: support custom mobile breakpoint #376

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

Open
atsixian opened this issue Mar 20, 2024 · 3 comments
Open

Feature: support custom mobile breakpoint #376

atsixian opened this issue Mar 20, 2024 · 3 comments

Comments

@atsixian
Copy link
Contributor

atsixian commented Mar 20, 2024

Describe the feature 📝:

Sonner has a fixed 600px as the mobile breakpoint, but that's different from our design system(720px). This results in a weird intermediate style that is partially desktop and partially mobile when the size is between 600px and 720px.

Is it possible to make it customizable? Like a prop mobileBreakpoint on Toaster?

sonner/src/styles.css

Lines 351 to 358 in 94cb71e

@media (max-width: 600px) {
[data-sonner-toaster] {
position: fixed;
--mobile-offset: 16px;
right: var(--mobile-offset);
left: var(--mobile-offset);
width: 100%;
}

@atsixian
Copy link
Contributor Author

i guess i'll just go ahead and change it in our fork.

@atsixian atsixian closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2024
@zr00da
Copy link

zr00da commented Nov 13, 2024

This should be a feature, not great having to edit the source or overpower the styling

@franck-boucher
Copy link

This feature is still needed

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

4 participants