Add backdrop-filter for Overlay and animate

This commit is contained in:
Justin Edmund 2023-01-21 09:42:50 -08:00
parent da1bca2c05
commit 89908777a2
6 changed files with 29 additions and 5 deletions

View file

@ -11,6 +11,8 @@
} }
.Alert { .Alert {
animation: $duration-modal-open cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal none
running openModalDesktop;
background: var(--dialog-bg); background: var(--dialog-bg);
border-radius: $unit; border-radius: $unit;
display: flex; display: flex;

View file

@ -1,6 +1,4 @@
.Dialog { .Dialog {
// animation: 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal none running
// openModalDesktop;
position: fixed; position: fixed;
background: none; background: none;
border: 0; border: 0;
@ -16,9 +14,13 @@
.DialogContent { .DialogContent {
$multiplier: 4; $multiplier: 4;
animation: $duration-modal-open cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal
none running openModalDesktop;
background: var(--dialog-bg); background: var(--dialog-bg);
border-radius: $card-corner; border-radius: $card-corner;
box-sizing: border-box; box-sizing: border-box;
border: 0.5px solid rgba(0, 0, 0, 0.18);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: $unit * $multiplier; gap: $unit * $multiplier;
@ -26,6 +28,7 @@
min-width: $unit * 48; min-width: $unit * 48;
// min-height: $unit-12x; // min-height: $unit-12x;
overflow-y: scroll; overflow-y: scroll;
height: 80vh;
max-height: 80vh; max-height: 80vh;
min-width: 580px; min-width: 580px;
max-width: 42vw; max-width: 42vw;

View file

@ -136,7 +136,7 @@ const JobSection = (props: Props) => {
) : ( ) : (
'' ''
)} )}
<div className="Overlay" /> <div className="Job Overlay" />
</div> </div>
<div className="JobDetails"> <div className="JobDetails">
{props.editable ? ( {props.editable ? (

View file

@ -6,6 +6,14 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
backdrop-filter: blur(5px) saturate(100%) brightness(80%) opacity(0);
animation: 0.24s ease-in fadeInFilter;
animation-fill-mode: forwards;
&.Job {
animation: none;
backdrop-filter: blur(5px) saturate(100%) brightness(80%) opacity(1);
}
&.Visible { &.Visible {
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);

View file

@ -291,12 +291,12 @@ i.tag {
@keyframes openModalDesktop { @keyframes openModalDesktop {
0% { 0% {
opacity: 0; opacity: 0;
transform: translate(-50%, -48%) scale(0.96); transform: scale(0.96);
} }
100% { 100% {
// opacity: 1; // opacity: 1;
transform: translate(-50%, -50%) scale(1); transform: scale(1);
} }
} }
@ -311,3 +311,13 @@ i.tag {
transform: translate(0, 30%); transform: translate(0, 30%);
} }
} }
@keyframes fadeInFilter {
from {
backdrop-filter: blur(5px) saturate(100%) brightness(80%) opacity(0);
}
to {
backdrop-filter: blur(5px) saturate(100%) brightness(80%) opacity(1);
}
}

View file

@ -315,5 +315,6 @@ $hover-stroke: 1px solid rgba(0, 0, 0, 0.1);
$hover-shadow: rgba(0, 0, 0, 0.08) 0px 0px 14px; $hover-shadow: rgba(0, 0, 0, 0.08) 0px 0px 14px;
// Durations // Durations
$duration-modal-open: 0.48s;
$duration-color-fade: 0.24s; $duration-color-fade: 0.24s;
$duration-zoom: 0.18s; $duration-zoom: 0.18s;