site: fix immutable tutorial and example on Firefox (#2601)

pull/2765/head
Conduitry 6 years ago
parent fbb6c9fd4e
commit 011b33181e

@ -1,4 +1,5 @@
export default function flash(element) { export default function flash(element) {
requestAnimationFrame(() => {
element.style.transition = 'none'; element.style.transition = 'none';
element.style.color = 'rgba(255,62,0,1)'; element.style.color = 'rgba(255,62,0,1)';
element.style.backgroundColor = 'rgba(255,62,0,0.2)'; element.style.backgroundColor = 'rgba(255,62,0,0.2)';
@ -8,4 +9,5 @@ export default function flash(element) {
element.style.color = ''; element.style.color = '';
element.style.backgroundColor = ''; element.style.backgroundColor = '';
}); });
});
} }

@ -1,4 +1,5 @@
export default function flash(element) { export default function flash(element) {
requestAnimationFrame(() => {
element.style.transition = 'none'; element.style.transition = 'none';
element.style.color = 'rgba(255,62,0,1)'; element.style.color = 'rgba(255,62,0,1)';
element.style.backgroundColor = 'rgba(255,62,0,0.2)'; element.style.backgroundColor = 'rgba(255,62,0,0.2)';
@ -8,4 +9,5 @@ export default function flash(element) {
element.style.color = ''; element.style.color = '';
element.style.backgroundColor = ''; element.style.backgroundColor = '';
}); });
});
} }

@ -1,4 +1,5 @@
export default function flash(element) { export default function flash(element) {
requestAnimationFrame(() => {
element.style.transition = 'none'; element.style.transition = 'none';
element.style.color = 'rgba(255,62,0,1)'; element.style.color = 'rgba(255,62,0,1)';
element.style.backgroundColor = 'rgba(255,62,0,0.2)'; element.style.backgroundColor = 'rgba(255,62,0,0.2)';
@ -8,4 +9,5 @@ export default function flash(element) {
element.style.color = ''; element.style.color = '';
element.style.backgroundColor = ''; element.style.backgroundColor = '';
}); });
});
} }
Loading…
Cancel
Save