question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sweetalert css not used

See original GitHub issue

I’m using sweetalert in a vue js app. And i’m using this by importing via typescript import swal from 'sweetalert2'. This works for sweetalert 1, but not sweetalert 2. It’s being replaced by Semantic UI css.

capture

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

16reactions
limontecommented, Oct 11, 2017

We recently released v6.10.0 which contains all-in-one version with JS and CSS in one place.

You can import it this way:

import swal from 'sweetalert2/dist/sweetalert2.all.min.js'

PS. In the next major version (v7.0.0) the combined JS + CSS version sweetalert2.all.min.js will be the default entry point and it will be possible to import it as usual: import swal from 'sweetalert2'

2reactions
toveruxcommented, Nov 2, 2017

That’s strange. I mean, there’s no reason for the styles for not applying as soon as they’re loaded. We don’t use any bizarre technique, just plain CSS. It may be a framework-specific problem (styles encapsulation maybe? But usually frameworks don’t mind about global styles). Would you please send us a plunkr/jsfiddle link so we can actually see what’s going on?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I use Sweetalert with CSS applied? - Stack Overflow
There is nothing wrong with your implementation. SweetAlert2 uses font-family: inherit; , so it will take parent font.
Read more >
Guides - SweetAlert
Using promises. SweetAlert uses promises to keep track of how the user interacts with the alert. If the user clicks the confirm button,...
Read more >
SweetAlert2 - a beautiful, responsive, customizable and ...
A beautiful, responsive, customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes.
Read more >
Sweet Alert - Common Style Inventory
SweetAlert automatically centers itself on the page and looks great no matter if you're using a desktop computer, mobile or tablet.
Read more >
SweetAlert Library Introduction and Installation with the Example
It's a standalone library that has no dependencies, and it's made from a JavaScript file plus a CSS file. Sweet Alert is used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found