Skip to content

Commit

Permalink
Improve css
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelroth committed Aug 18, 2021
1 parent eeb7c0d commit d903223
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions views/components/ScrollContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,14 @@
/>
<img
class="q-scroll-graphic-image"
class:image--horizontal-fit={imageHeight <= windowHeight - top}
class:image--vertical-fit={imageHeight > windowHeight - top}
class:image--hidden={[index - 1, index + 1].includes(id)}
class:q-scroll-graphic-image--horizontal-fit={imageHeight <=
windowHeight - top}
class:q-scroll-graphic-image--vertical-fit={imageHeight >
windowHeight - top}
class:q-scroll-graphic-image--hidden={[
index - 1,
index + 1,
].includes(id)}
src={image.png1x}
alt=""
transition:fade={{ duration: 50 }}
Expand Down Expand Up @@ -139,17 +144,17 @@
background: currentColor;
}
.image--horizontal-fit {
.q-scroll-graphic-image--horizontal-fit {
width: 100%;
}
.image--vertical-fit {
.q-scroll-graphic-image--vertical-fit {
height: 100%;
left: 50%;
transform: translate(-50%, 0);
}
.image--hidden {
.q-scroll-graphic-image--hidden {
display: none;
}
</style>

0 comments on commit d903223

Please sign in to comment.