Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: Scale pulse animation with percentages and flip wave animation's direction.",
"packageName": "@fluentui/react-skeleton",
"email": "ololubek@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const skeletonItemClassNames: SlotClassNames<SkeletonItemSlots> = {
root: 'fui-SkeletonItem',
};

const skeletonWaveAnimationRTL = {
const skeletonWaveAnimation = {
Comment thread
sopranopillow marked this conversation as resolved.
from: {
backgroundPositionX: '300% /* @noflip */',
},
Expand All @@ -17,7 +17,7 @@ const skeletonWaveAnimationRTL = {
},
};

const skeletonWaveAnimation = {
const skeletonWaveAnimationRTL = {
from: {
backgroundPositionX: '0% /* @noflip */',
},
Expand All @@ -27,12 +27,15 @@ const skeletonWaveAnimation = {
};

const skeletonPulseAnimation = {
from: {
'0%': {
opacity: '1',
},
to: {
'50%': {
opacity: '0.4',
},
'100%': {
opacity: '1',
},
};

/**
Expand Down Expand Up @@ -63,9 +66,18 @@ const useStyles = makeStyles({
},
waveRtl: {
animationName: skeletonWaveAnimationRTL,
backgroundImage: `linear-gradient(
to right,
${tokens.colorNeutralStencil1} 0%,
${tokens.colorNeutralStencil2} 50%,
${tokens.colorNeutralStencil1} 100%)`,
'@media screen and (forced-colors: active)': {
backgroundColor: 'WindowText',
},
},
pulse: {
animationName: skeletonPulseAnimation,
animationDuration: '1s',
backgroundColor: tokens.colorNeutralStencil1,
},
translucent: {
Expand Down