mirror of https://github.com/sveltejs/svelte
site: fix immutable tutorial and example on Firefox (#2601)
parent
fbb6c9fd4e
commit
011b33181e
@ -1,11 +1,13 @@
|
|||||||
export default function flash(element) {
|
export default function flash(element) {
|
||||||
element.style.transition = 'none';
|
requestAnimationFrame(() => {
|
||||||
element.style.color = 'rgba(255,62,0,1)';
|
element.style.transition = 'none';
|
||||||
element.style.backgroundColor = 'rgba(255,62,0,0.2)';
|
element.style.color = 'rgba(255,62,0,1)';
|
||||||
|
element.style.backgroundColor = 'rgba(255,62,0,0.2)';
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
element.style.transition = 'color 1s, background 1s';
|
element.style.transition = 'color 1s, background 1s';
|
||||||
element.style.color = '';
|
element.style.color = '';
|
||||||
element.style.backgroundColor = '';
|
element.style.backgroundColor = '';
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -1,11 +1,13 @@
|
|||||||
export default function flash(element) {
|
export default function flash(element) {
|
||||||
element.style.transition = 'none';
|
requestAnimationFrame(() => {
|
||||||
element.style.color = 'rgba(255,62,0,1)';
|
element.style.transition = 'none';
|
||||||
element.style.backgroundColor = 'rgba(255,62,0,0.2)';
|
element.style.color = 'rgba(255,62,0,1)';
|
||||||
|
element.style.backgroundColor = 'rgba(255,62,0,0.2)';
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
element.style.transition = 'color 1s, background 1s';
|
element.style.transition = 'color 1s, background 1s';
|
||||||
element.style.color = '';
|
element.style.color = '';
|
||||||
element.style.backgroundColor = '';
|
element.style.backgroundColor = '';
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -1,11 +1,13 @@
|
|||||||
export default function flash(element) {
|
export default function flash(element) {
|
||||||
element.style.transition = 'none';
|
requestAnimationFrame(() => {
|
||||||
element.style.color = 'rgba(255,62,0,1)';
|
element.style.transition = 'none';
|
||||||
element.style.backgroundColor = 'rgba(255,62,0,0.2)';
|
element.style.color = 'rgba(255,62,0,1)';
|
||||||
|
element.style.backgroundColor = 'rgba(255,62,0,0.2)';
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
element.style.transition = 'color 1s, background 1s';
|
element.style.transition = 'color 1s, background 1s';
|
||||||
element.style.color = '';
|
element.style.color = '';
|
||||||
element.style.backgroundColor = '';
|
element.style.backgroundColor = '';
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in new issue