Skip to content

Commit

Permalink
fix(Popover): opacity transition was not happening (#33421)
Browse files Browse the repository at this point in the history
Co-authored-by: Oleksandr Fediashov <olfedias@microsoft.com>
  • Loading branch information
robertpenner and layershifter authored Dec 9, 2024
1 parent cad1393 commit 39feb05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix(Popover): opacity transition was not happening",
"packageName": "@fluentui/react-positioning",
"email": "robertpenner@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export function createSlideStyles(mainAxis: number): GriffelStyle {
const slideDistanceVarY = '--fui-positioning-slide-distance-y';

return {
animationComposition: 'accumulate',
// The fade has absolute values, whereas the slide amount is relative.
animationComposition: 'replace, accumulate',
animationDuration: tokens.durationSlower,
animationTimingFunction: tokens.curveDecelerateMid,
[slideDistanceVarX]: `0px`,
Expand Down Expand Up @@ -54,6 +55,7 @@ export function createSlideStyles(mainAxis: number): GriffelStyle {
// Note: at-rules have more specificity in Griffel
'@media(prefers-reduced-motion)': {
[`&[${DATA_POSITIONING_PLACEMENT}]`]: {
animationComposition: 'replace',
animationDuration: '1ms',
animationName: fadeIn,
},
Expand All @@ -62,6 +64,7 @@ export function createSlideStyles(mainAxis: number): GriffelStyle {
// Tested in Firefox 79
'@supports not (animation-composition: accumulate)': {
[`&[${DATA_POSITIONING_PLACEMENT}]`]: {
animationComposition: 'replace',
animationName: fadeIn,
},
},
Expand Down

0 comments on commit 39feb05

Please sign in to comment.