jpillora / notifyjs

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

How to load styles from external stylesheet, and don't append into the <head> tag? #114

Open skcin7 opened 6 years ago

skcin7 commented 6 years ago

There doesn't seem to be a way currently to tell Notify.js to look for CSS in an external file. Instead, it just appends CSS in <style> tags inside the <head>. This works and is great and all but I can't help feel that it's just cleaner, nicer, and more elegant code to load instead from an external CSS file.

Notify.js does not currently support this, and I think it should. Anybody know the best way to easily support this? I may submit a pull request soon and submit a solution.

In a related topic, Notify.js currently does not support pseudo CSS elements such as :before and :after. If you need those for some reason, you can still get them by manually adding them to an external stylesheet file, but Notify.js should support this.