Toast has different width during appearing
See original GitHub issueDescription
I run Materialize.toast(message, 4000);
, where message is a long string (50 symbols). Toast appears on the screen. For a very short time toast is a little wider then necessary. Then toast width become normal. It is not beautiful, so I expect that toast should have the same width all time.
Repro Steps
http://codepen.io/dima74/pen/MpXwPN In this codepen I print toast width immediately after toast appears, and after one second. I received: 375px and 320px.
Screenshots / Codepen
Please, watch these video in slowmotion mode (speed 0.25): https://youtu.be/SGhrD1fCj9A
Here is screenshots from video. They show, that toasts have different width.
I use Chrome 57 on linux. Thank you for materialize, thank if answer something!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (8 by maintainers)
Top Results From Across the Web
How to adjust toaster popup width - Stack Overflow
I saw that toaster has a parameter 'position-class' to change the position and even the width of the popup, like for example 'toast-top-full-width',...
Read more >Toasts - Lightning Design System
The width of a toast is determined by the length of its content and its inside padding, but at minimum it should be...
Read more >Configuring options in JavaScript Toast control - Syncfusion
Width and height. The dimensions of the toast can be set using the width and height properties. This will individually set all toasts....
Read more >Toasts · Bootstrap v5.0
Toasts are lightweight notifications designed to mimic the push notifications that have been popularized by mobile and desktop operating systems.
Read more >Designing Toast Messages for Accessibility
A toast is a non-modal dialog that appears and disappears in the span of a few seconds. It may also optionally have a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I realized the problem. If I show toast in the beggining of the page loads, when fonts doesn’t load yet, then toast text will have default browser font (DejaVu Sans Light in my case). And DejaVu Sans Light is a little more then Roboto Light (which is default Materialize font), so toast will have a little more width while appearing, until Roboto Light font loads. I think nothing can be done with this. Anyway, thanks for helping!
OK, thank you