Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Pause auto play on hover v2 - electric boogaloo #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module.exports = function(grunt) {
['rework.keyframes'],
['rework.prefix', 'animation'],
['rework.prefix', 'animation-delay'],
['rework.prefix', 'animation-play-state'],
['rework.prefix', 'transition']
],
vendors: ['-moz-', '-webkit-', '-o-']
Expand Down
104 changes: 58 additions & 46 deletions dist/gallery.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,35 +34,35 @@
}

@keyframes controlAnimation-2 {
0% {
0%,
35.7% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}

14.3%,
50% {
50%,
85.7% {
color: white;
color: rgba(255, 255, 255, 0.8);
}

64.3%,
100% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
}

@keyframes galleryAnimation-2 {
0% {
0%,
35.7% {
opacity: 0;
}

14.3%,
50% {
50%,
85.7% {
opacity: 1;
}

64.3%,
100% {
opacity: 0;
}
Expand All @@ -74,53 +74,56 @@
.items-2.autoplay .item {
animation: galleryAnimation-2 14s infinite;
}
.items-2.autoplay:hover .item {
animation-play-state: paused;
}
.items-2 .control-operator:nth-of-type(1):target ~ .item:nth-of-type(1) {
pointer-events: auto;
opacity: 1;
}
.items-2 .control-button:nth-of-type(1),
.items-2 .item:nth-of-type(1) {
animation-delay: -2s;
animation-delay: -9s;
}
.items-2 .control-operator:nth-of-type(2):target ~ .item:nth-of-type(2) {
pointer-events: auto;
opacity: 1;
}
.items-2 .control-button:nth-of-type(2),
.items-2 .item:nth-of-type(2) {
animation-delay: 5s;
animation-delay: -2s;
}

@keyframes controlAnimation-3 {
0% {
0%,
57.1% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}

9.5%,
33.3% {
66.7%,
90.5% {
color: white;
color: rgba(255, 255, 255, 0.8);
}

42.9%,
100% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
}

@keyframes galleryAnimation-3 {
0% {
0%,
57.1% {
opacity: 0;
}

9.5%,
33.3% {
66.7%,
90.5% {
opacity: 1;
}

42.9%,
100% {
opacity: 0;
}
Expand All @@ -132,61 +135,64 @@
.items-3.autoplay .item {
animation: galleryAnimation-3 21s infinite;
}
.items-3.autoplay:hover .item {
animation-play-state: paused;
}
.items-3 .control-operator:nth-of-type(1):target ~ .item:nth-of-type(1) {
pointer-events: auto;
opacity: 1;
}
.items-3 .control-button:nth-of-type(1),
.items-3 .item:nth-of-type(1) {
animation-delay: -2s;
animation-delay: -16s;
}
.items-3 .control-operator:nth-of-type(2):target ~ .item:nth-of-type(2) {
pointer-events: auto;
opacity: 1;
}
.items-3 .control-button:nth-of-type(2),
.items-3 .item:nth-of-type(2) {
animation-delay: 5s;
animation-delay: -9s;
}
.items-3 .control-operator:nth-of-type(3):target ~ .item:nth-of-type(3) {
pointer-events: auto;
opacity: 1;
}
.items-3 .control-button:nth-of-type(3),
.items-3 .item:nth-of-type(3) {
animation-delay: 12s;
animation-delay: -2s;
}

@keyframes controlAnimation-4 {
0% {
0%,
67.9% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}

7.1%,
25% {
75%,
92.9% {
color: white;
color: rgba(255, 255, 255, 0.8);
}

32.1%,
100% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
}

@keyframes galleryAnimation-4 {
0% {
0%,
67.9% {
opacity: 0;
}

7.1%,
25% {
75%,
92.9% {
opacity: 1;
}

32.1%,
100% {
opacity: 0;
}
Expand All @@ -198,69 +204,72 @@
.items-4.autoplay .item {
animation: galleryAnimation-4 28s infinite;
}
.items-4.autoplay:hover .item {
animation-play-state: paused;
}
.items-4 .control-operator:nth-of-type(1):target ~ .item:nth-of-type(1) {
pointer-events: auto;
opacity: 1;
}
.items-4 .control-button:nth-of-type(1),
.items-4 .item:nth-of-type(1) {
animation-delay: -2s;
animation-delay: -23s;
}
.items-4 .control-operator:nth-of-type(2):target ~ .item:nth-of-type(2) {
pointer-events: auto;
opacity: 1;
}
.items-4 .control-button:nth-of-type(2),
.items-4 .item:nth-of-type(2) {
animation-delay: 5s;
animation-delay: -16s;
}
.items-4 .control-operator:nth-of-type(3):target ~ .item:nth-of-type(3) {
pointer-events: auto;
opacity: 1;
}
.items-4 .control-button:nth-of-type(3),
.items-4 .item:nth-of-type(3) {
animation-delay: 12s;
animation-delay: -9s;
}
.items-4 .control-operator:nth-of-type(4):target ~ .item:nth-of-type(4) {
pointer-events: auto;
opacity: 1;
}
.items-4 .control-button:nth-of-type(4),
.items-4 .item:nth-of-type(4) {
animation-delay: 19s;
animation-delay: -2s;
}

@keyframes controlAnimation-5 {
0% {
0%,
74.3% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}

5.7%,
20% {
80%,
94.3% {
color: white;
color: rgba(255, 255, 255, 0.8);
}

25.7%,
100% {
color: #ccc;
color: rgba(255, 255, 255, 0.4);
}
}

@keyframes galleryAnimation-5 {
0% {
0%,
74.3% {
opacity: 0;
}

5.7%,
20% {
80%,
94.3% {
opacity: 1;
}

25.7%,
100% {
opacity: 0;
}
Expand All @@ -272,43 +281,46 @@
.items-5.autoplay .item {
animation: galleryAnimation-5 35s infinite;
}
.items-5.autoplay:hover .item {
animation-play-state: paused;
}
.items-5 .control-operator:nth-of-type(1):target ~ .item:nth-of-type(1) {
pointer-events: auto;
opacity: 1;
}
.items-5 .control-button:nth-of-type(1),
.items-5 .item:nth-of-type(1) {
animation-delay: -2s;
animation-delay: -30s;
}
.items-5 .control-operator:nth-of-type(2):target ~ .item:nth-of-type(2) {
pointer-events: auto;
opacity: 1;
}
.items-5 .control-button:nth-of-type(2),
.items-5 .item:nth-of-type(2) {
animation-delay: 5s;
animation-delay: -23s;
}
.items-5 .control-operator:nth-of-type(3):target ~ .item:nth-of-type(3) {
pointer-events: auto;
opacity: 1;
}
.items-5 .control-button:nth-of-type(3),
.items-5 .item:nth-of-type(3) {
animation-delay: 12s;
animation-delay: -16s;
}
.items-5 .control-operator:nth-of-type(4):target ~ .item:nth-of-type(4) {
pointer-events: auto;
opacity: 1;
}
.items-5 .control-button:nth-of-type(4),
.items-5 .item:nth-of-type(4) {
animation-delay: 19s;
animation-delay: -9s;
}
.items-5 .control-operator:nth-of-type(5):target ~ .item:nth-of-type(5) {
pointer-events: auto;
opacity: 1;
}
.items-5 .control-button:nth-of-type(5),
.items-5 .item:nth-of-type(5) {
animation-delay: 26s;
animation-delay: -2s;
}
2 changes: 1 addition & 1 deletion dist/gallery.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading