Valo linebreak in notifications

Hi all,

I have switched today from cameleon theme to the new valo and it was quite easy. Thanks for that.
But one question, I have used html content in notifications like this.

Notification userInfo = new Notification("ACHTUNG</br>", Notification.Type.WARNING_MESSAGE); userInfo.setDelayMsec(2000); userInfo.setHtmlContentAllowed(true); userInfo.setDescription("some important </br> message") in cameleon theme I have a linebreak after the headline and in the description, now in valo theme I get only one linebreak in the description, the other one in the caption is gone (maybe filtered)
How can I get the linebreak back, or is it a bug??

Thanks in advance
Best regards
Dirk

Hi,

This depends on the display setting of the title and description elements in the notification. In Valo they are inline-blocks, and so any line breaks inside them won’t affect the flow of the other.

If you wish to have the title above the description, you can set the style name of the notification to “tray”, which will do just that.

Thanks a lott,
thats exaclty what I’m searching for.

Not sure that I agree with changing the title and description to inline blocks, as it breaks backwards compatibilty. An alternative to changing the style name to “tray”, is to restore the title and description display styles to block like this:

.v-Notification {
  h1, p {
    display: block;
  }
}

.v-Notification h1 ~ p {
  margin-left: 0;
}