Merge pull request #137 from reuters-graphics/scrolly-slide-safari-bug

Fix scroller bug not updating on Safari
This commit is contained in:
Jon McClure 2023-11-07 14:17:35 +00:00 committed by GitHub
commit 77f1f47fec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@
<div
class="step-background step-{i + 1} w-full absolute"
class:visible="{stackBackground ? i <= index : i === index}"
class:hidden="{stackBackground ? i > index : i !== index}"
class:invisible="{stackBackground ? i > index : i !== index}"
>
<svelte:component
this="{step.background}"
@ -26,9 +26,15 @@
<style lang="scss">
.step-background {
opacity: 0;
will-change: opacity;
transition: 0.35s opacity ease;
&.hidden {
&.visible {
opacity: 1;
}
&.invisible {
opacity: 0;
}
}