FEATURE: 🍬 cool transition when expanding lightbox

This commit is contained in:
Régis Hanol 2014-12-29 18:00:18 +01:00
parent a115b4b7f0
commit 432413d3da
2 changed files with 40 additions and 0 deletions

View File

@ -16,6 +16,8 @@ Discourse.Lightbox = {
$e.magnificPopup({
type: "image",
closeOnContentClick: false,
removalDelay: 300,
mainClass: "mfp-zoom-in",
callbacks: {
open: function() {

View File

@ -647,6 +647,44 @@ button {
}
.mfp-zoom-in {
/* start state */
.mfp-content {
opacity: 0;
transition: all 0.2s ease-in-out;
transform: scale(0.8);
}
&.mfp-bg {
opacity: 0;
transition: all 0.3s ease-out;
}
/* animate in */
&.mfp-ready {
.mfp-content {
opacity: 1;
transform: scale(1);
}
&.mfp-bg {
opacity: 0.8;
}
}
/* animate out */
&.mfp-removing {
.mfp-content {
transform: scale(0.8);
opacity: 0;
}
&.mfp-bg {
opacity: 0;
}
}
}
.mfp-force-scrollbars {
&.mfp-wrap {
overflow-y: auto !important;