Compare commits

...

2 Commits

Author SHA1 Message Date
faf71e5ed7
only flash wrong row when word not valid 2023-08-30 13:15:07 +01:00
4405d97daf
fix animation colours 2023-08-30 13:10:26 +01:00
2 changed files with 11 additions and 9 deletions

View File

@ -43,8 +43,10 @@ function checkGridRow() {
console.log(rowWord) console.log(rowWord)
if (!wordlist.valid_inputs.includes(rowWord)) { if (!wordlist.valid_inputs.includes(rowWord)) {
body.classList.add("incorrect") getGridRow(row).items.forEach(item => {
setTimeout( () => body.classList.remove("incorrect"), 500) item.HTMLItem.classList.add("incorrect")
setTimeout( () => item.HTMLItem.classList.remove("incorrect"), 500)
})
return return
} }

View File

@ -84,37 +84,37 @@ body {
@keyframes correct { @keyframes correct {
0% { 0% {
background: var(--default-bg); background: var(--bg);
} }
50% { 50% {
background: var(--green); background: var(--green);
} }
100% { 100% {
background: var(--default-bg); background: var(--bg);
} }
} }
@keyframes incorrect { @keyframes incorrect {
0% { 0% {
background: var(--default-bg); background: var(--bg);
} }
50% { 50% {
background: var(--red); background: var(--red);
} }
100% { 100% {
background: var(--default-bg); background: var(--bg);
} }
} }
@keyframes clicked { @keyframes clicked {
0% { 0% {
background: var(--default-bg); background: var(--bg);
} }
50% { 50% {
background: var(--dark-bg); background: var(--bg-lc);
} }
100% { 100% {
background: var(--default-bg); background: var(--bg);
} }
} }