Skip to content

Commit

Permalink
brief transition for overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Feb 17, 2025
1 parent 0950590 commit 9af726b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions css/reveal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,16 @@ $controlsArrowAngleActive: 36deg;
* OVERLAY FOR LINK PREVIEWS AND HELP
*********************************************/

@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}

@keyframes scale-up {
from { transform: scale( 0.95 ); }
to { transform: scale( 1 ); }
}

.reveal [data-preview-image],
.reveal [data-preview-video] {
cursor: zoom-in;
Expand All @@ -1450,6 +1460,7 @@ $controlsArrowAngleActive: 36deg;
backdrop-filter: blur( 10px );
transition: all 0.3s ease;
color: #fff;
animation: fade-in 0.3s ease;
}

.reveal .overlay-viewport {
Expand Down Expand Up @@ -1516,6 +1527,7 @@ $controlsArrowAngleActive: 36deg;
overflow: hidden;
flex-grow: 1;
background-color: rgba(20, 20, 20, 0.8);
animation: scale-up 0.5s cubic-bezier(0.260, 0.860, 0.440, 0.985);
}

.reveal .overlay-spinner {
Expand Down
2 changes: 1 addition & 1 deletion js/controllers/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export default class Overlay {
}

isOpen() {
return this.dom !== null;
return !!this.dom;
}

/**
Expand Down

0 comments on commit 9af726b

Please sign in to comment.