Comments (2)
Hello @Massi-X and sorry for the late reply. I'm not quite sure what you mean. Could you provide some code examples of the cases that aren't working as expected?
from sweetalert2.github.io.
Sure here you go. This is the code I'm using right now and it works fine. The thing that wasn't obvious to me is that you need to actually use an animation (keyframes) and not a simple transition like I used before. I think it is important to point out that in the docs, do you agree?
CSS:
Swal.fire({
title: details.title,
html: details.html,
showConfirmButton: details.showConfirmButton,
returnFocus: false,
showClass: {
backdrop: 'fadein',
popup: 'somethingelse'
},
hideClass: {
backdrop: 'fadeout',
popup: 'somethingelse'
}
});
CSS:
.swal2-container.fadein {
animation: .25s swal-fadein linear;
}
.swal2-container.fadeout {
animation: .25s swal-fadeout linear;
}
@keyframes swal-fadein {
0% {
background: transparent;
}
10% {
background: transparent;
}
100% {
background: rgba(0, 0, 0, var(--cc-overlay-opacity));
}
}
@keyframes swal-fadeout {
0% {
background: rgba(0, 0, 0, var(--cc-overlay-opacity));
}
100% {
background: transparent;
}
}
from sweetalert2.github.io.
Related Issues (20)
- Add Google Maps recipe
- Improve login form recipe to submit itself with Enter
- Add the custom icon (html + position) recipe
- Add Bootstrap 4 + SweetAlert2 recipe HOT 1
- Add flatpickr recipe HOT 1
- Add DnD recipe
- Add pdf viewer example with fullscreen support
- Document new hooks, deprecate old ones HOT 1
- Add the right-side drawer recipe HOT 2
- Unexpected gap in the "long content" example in iOS HOT 1
- Document returnInputValueOnDeny HOT 1
- Add docs for declarative templates (the `template` param) HOT 1
- Rtl support HOT 1
- Low contrast issues HOT 2
- add getPopup() method
- Dependency Dashboard
- The script for installing Sweetalert is not working
- Sidebar fails after a few clicks HOT 2
- Content-Security-Policy and inline styles HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sweetalert2.github.io.