Skip to content
Advertisement

SweetAlert2 crappy text

I have a question about SweetAlert2. As you can see in this picture that’s how my swal2 looks, but on the official site or others the text is smoother, how should I fix this? Maybe I’ve forgot one CSS/JS?

JavaScript

Screenshot: http://prntscr.com/jnoula Github / JSFiddle: http://prntscr.com/jnovyf

JavaScript

Advertisement

Answer

SweetAlert2 doesn’t define font-family but inherits it from the document. The reason is that alerts should look consistent with the rest of the page.

Define the font-family for your page and you’ll be fine 🙂

Demo with Ubuntu typeface:

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement