jpillora / notifyjs

Notify.js - A simple, versatile notification library
https://notifyjs.jpillora.com/
MIT License
1.91k stars 741 forks source link

white-space: nowrap makes end of long messages invisible #79

Open akostadinov opened 8 years ago

akostadinov commented 8 years ago

Hello, I'm using position: "top center" and longer messaged happily go off the screen. IMO long messages should be wrapped when they reach screen end. In style I see:

.notifyjs-bootstrap-base {
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

I guess for relative position nowrap may make some sense but for absolute position, I don't see how it would help anybody. I don't know how to solve potential issues with relative position (I never used such positioning and don't know if nowrap is actually needed there). But for absolute positioning it appears to me, white spaces should wrap the notification text.

mokumax commented 6 years ago

It's also the same on responsive mobile. The message goes off the screen. I've had to use \n to start a new line for my messages. Not ideal but it works.