From ce983cda14122a7b224d9f6b1457b719f0e0a5ac Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Fri, 1 Nov 2024 13:59:50 +0300 Subject: [PATCH] Refactor #6691 - For Skeleton --- .../primevue/src/skeleton/style/SkeletonStyle.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/primevue/src/skeleton/style/SkeletonStyle.js b/packages/primevue/src/skeleton/style/SkeletonStyle.js index 6c6dd8df2..adc4ac582 100644 --- a/packages/primevue/src/skeleton/style/SkeletonStyle.js +++ b/packages/primevue/src/skeleton/style/SkeletonStyle.js @@ -17,7 +17,11 @@ const theme = ({ dt }) => ` top: 0; transform: translateX(-100%); z-index: 1; - background: linear-gradient( 90deg, rgba(255, 255, 255, 0), ${dt('skeleton.animation.background')}, rgba(255, 255, 255, 0) ); + background: linear-gradient(90deg, rgba(255, 255, 255, 0), ${dt('skeleton.animation.background')}, rgba(255, 255, 255, 0)); +} + +[dir='rtl'] .p-skeleton::after { + animation-name: p-skeleton-animation-rtl; } .p-skeleton-circle { @@ -36,6 +40,15 @@ const theme = ({ dt }) => ` transform: translateX(100%); } } + +@keyframes p-skeleton-animation-rtl { + from { + transform: translateX(100%); + } + to { + transform: translateX(-100%); + } +} `; const inlineStyles = {