Implement CSS grid click effect

This commit is contained in:
aronmal 2022-10-24 00:35:28 +02:00
parent b0b118c1b3
commit 63e26e62fa
Signed by: aronmal
GPG key ID: 816B7707426FC612
5 changed files with 231 additions and 115 deletions

View file

@ -0,0 +1,36 @@
@use './mixins/effects' as *;
#tiles {
height: 100vh;
width: 100vw;
display: grid;
grid-template-columns: repeat(var(--columns), 1fr);
grid-template-rows: repeat(var(--rows), 1fr);
.tile {
@include transition(1s);
outline: 1px solid white;
background-color: black;
&.active {
animation: bright .5s forwards;
animation-delay: var(--delay);
}
}
}
@keyframes bright {
0% {
background-color: black;
}
50% {
background-color: white;
}
100% {
background-color: gray;
}
}