Skip to content

[BUG] fix: prevent toast notification overflow on mobile #55731

Description

@aparna24bce11388

🐛 What's broken?

Toast notifications with long messages or fixed widths extend beyond the viewport on smaller screens. This causes part of the notification to become hidden, making it difficult for users to read or dismiss.


📋 Steps to Reproduce

  1. Link EaseMotion CSS using the CDN:
    https://cdn.jsdelivr.net/npm/easemotion-css/easemotion.css
  2. Create a toast notification with a long message.
  3. Open the page on a mobile device or reduce the browser width.
  4. Notice that the toast extends outside the viewport.

✅ Expected Behavior

The toast notification should remain fully visible within the viewport, wrapping its content and adjusting its width appropriately on smaller screens.


❌ Actual Behavior

The toast overflows horizontally, causing text and action elements to be partially hidden on mobile devices.


🔗 Reproduction

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easemotion-css/easemotion.css" />
</head>
<body>

<div class="toast">
  This is a very long toast notification message that demonstrates how the component can overflow beyond the screen width on smaller devices instead of wrapping properly.
</div>

</body>
</html>

🌍 Environment

Field Value
EaseMotion CSS version Latest CDN
Browser Chrome 138
OS Windows 11

📸 Screenshot (optional)

On mobile screens, the toast notification extends beyond the viewport, making part of the message inaccessible.


Possible Fix: Apply a responsive width (such as max-width: 100% or calc(100% - 2rem)) along with overflow-wrap: break-word; so the toast remains fully visible and readable on all screen sizes.

Metadata

Metadata

Labels

GSSoC-26Official GSSoC 2026 issuebugSomething isn't workingcomponentNew UI components (buttons, cards, modals, tooltips, badges)good first issueGood for newcomershelp wantedExtra attention neededlevel:intermediateRequires moderate project understanding

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions