Skip to content

Commit a2058d2

Browse files
committed
feat: highlight new optimized items with background color tint animation
1 parent f3bc6e6 commit a2058d2

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

assets/css/style.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,7 @@ body:not(.subpage--output):not(.subpage--settings) .image-options-container {
10061006
}
10071007

10081008
.image-output__item {
1009+
position: relative;
10091010
display: flex;
10101011
justify-content: flex-end;
10111012
align-items: center;
@@ -1018,6 +1019,18 @@ body:not(.subpage--output):not(.subpage--settings) .image-options-container {
10181019
overflow: hidden;
10191020
}
10201021

1022+
.image-output__item-tint {
1023+
position: absolute;
1024+
top: 0;
1025+
left: 0;
1026+
z-index: -1;
1027+
width: 100%;
1028+
height: 100%;
1029+
pointer-events: none;
1030+
background-color: var(--color-primary);
1031+
opacity: 0;
1032+
}
1033+
10211034
.image-output__item-thumbnail {
10221035
width: 70px;
10231036
height: 70px;
@@ -1606,6 +1619,18 @@ body:not(.compressing--is-active) .drop-zone.drop-zone--is-dragging .drop-zone__
16061619
}
16071620
}
16081621

1622+
@keyframes fade-tint-in-out {
1623+
0% {
1624+
opacity: 0;
1625+
}
1626+
50% {
1627+
opacity: 0.25;
1628+
}
1629+
100% {
1630+
opacity: 0;
1631+
}
1632+
}
1633+
16091634

16101635
/****************************************************
16111636
* Media queries
@@ -2283,6 +2308,10 @@ body:not(.compressing--is-active) .drop-zone.drop-zone--is-dragging .drop-zone__
22832308
animation: fade-out-shrink var(--duration-600) ease-in-out forwards;
22842309
}
22852310

2311+
.fade-tint-in-out {
2312+
animation: fade-tint-in-out var(--duration-1400) ease-in-out forwards;
2313+
}
2314+
22862315
.mask-b {
22872316
mask-repeat: no-repeat;
22882317
mask-image: linear-gradient(#fff, #0000);

assets/js/helpers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function buildOutputItemHTML({
2121
const itemId = Math.random().toString(36).substring(2, 6).toUpperCase();
2222
return `
2323
<div id="output_item__${itemId}" class="image-output__item file-format--${outputFileExtension} fade-in-up" data-elevation="3">
24+
<div class="image-output__item-tint fade-tint-in-out"></div>
2425
<img src="${thumbnailDataURL}" class="image-output__item-thumbnail" loading="lazy">
2526
<div class="image-output__item-text">
2627
<div class="image-output__item-filename">

0 commit comments

Comments
 (0)