feat: add glowing effect to active player's pieces
All checks were successful
Deploy c4 / deploy (push) Successful in 42s
All checks were successful
Deploy c4 / deploy (push) Successful in 42s
Pulsing box-shadow on the current turn's placed pieces makes the turn state visible directly on the board rather than only in the status banner.
This commit is contained in:
@@ -53,7 +53,17 @@
|
||||
.cell { width: 48px; height: 48px; border-radius: 50%; background: #556; transition: background 0.2s; }
|
||||
.cell.red { background: #4a2a3a; }
|
||||
.cell.yellow { background: #2a4545; }
|
||||
.cell.red.active-turn { animation: glow-red 1.5s ease-in-out infinite alternate; }
|
||||
.cell.yellow.active-turn { animation: glow-yellow 1.5s ease-in-out infinite alternate; }
|
||||
.cell.winning { animation: pulse 0.5s ease-in-out infinite alternate; }
|
||||
@keyframes glow-red {
|
||||
from { box-shadow: 0 0 4px rgba(74, 42, 58, 0.3); }
|
||||
to { box-shadow: 0 0 12px rgba(74, 42, 58, 0.7); }
|
||||
}
|
||||
@keyframes glow-yellow {
|
||||
from { box-shadow: 0 0 4px rgba(42, 69, 69, 0.3); }
|
||||
to { box-shadow: 0 0 12px rgba(42, 69, 69, 0.7); }
|
||||
}
|
||||
@keyframes pulse {
|
||||
from { transform: scale(1); box-shadow: 0 0 4px rgba(0,0,0,0.15); }
|
||||
to { transform: scale(1.03); box-shadow: 0 0 8px rgba(0,0,0,0.25); }
|
||||
|
||||
@@ -1560,9 +1560,31 @@
|
||||
.cell.yellow {
|
||||
background: #2a4545;
|
||||
}
|
||||
.cell.red.active-turn {
|
||||
animation: glow-red 1.5s ease-in-out infinite alternate;
|
||||
}
|
||||
.cell.yellow.active-turn {
|
||||
animation: glow-yellow 1.5s ease-in-out infinite alternate;
|
||||
}
|
||||
.cell.winning {
|
||||
animation: pulse 0.5s ease-in-out infinite alternate;
|
||||
}
|
||||
@keyframes glow-red {
|
||||
from {
|
||||
box-shadow: 0 0 4px rgba(74, 42, 58, 0.3);
|
||||
}
|
||||
to {
|
||||
box-shadow: 0 0 12px rgba(74, 42, 58, 0.7);
|
||||
}
|
||||
}
|
||||
@keyframes glow-yellow {
|
||||
from {
|
||||
box-shadow: 0 0 4px rgba(42, 69, 69, 0.3);
|
||||
}
|
||||
to {
|
||||
box-shadow: 0 0 12px rgba(42, 69, 69, 0.7);
|
||||
}
|
||||
}
|
||||
@keyframes pulse {
|
||||
from {
|
||||
transform: scale(1);
|
||||
|
||||
Reference in New Issue
Block a user