Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions src/components/Carousel.astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ const duration = width / speed + 's';
@apply overflow-hidden mask-x-from-90%;

> div {
@apply flex flex-col items-center gap-5;
writing-mode: vertical-lr;
text-orientation: upright;
@apply flex flex-row items-center gap-5;
animation: move var(--duration) infinite linear;
}

Expand All @@ -64,7 +62,7 @@ const duration = width / speed + 's';
}

picture {
@apply h-auto w-auto;
@apply h-auto w-auto flex-shrink-0;
}

@keyframes move {
Expand All @@ -76,4 +74,19 @@ const duration = width / speed + 's';
transform: translateX(-50%);
}
}

/* RTL support for Arabic and other RTL languages */
:global([dir='rtl']) .carousel > div {
animation: moveRTL var(--duration) infinite linear;
}

@keyframes moveRTL {
0% {
transform: translateX(0);
}

100% {
transform: translateX(50%);
}
}
</style>
Loading