Skip to content

Commit d90096c

Browse files
committed
feat(Rotate): remove background shadows for improved 3D rotation effect
1 parent ed173f3 commit d90096c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/react-components/react-motion-components-preview/stories/src/Rotate/RotateCardFlip.stories.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const useClasses = makeStyles({
3232
borderRadius: tokens.borderRadiusMedium,
3333
'&:hover': {
3434
transform: 'translateY(-2px)',
35-
backgroundColor: tokens.colorNeutralBackground1,
3635
},
3736
},
3837
patternCard: {
@@ -43,7 +42,14 @@ const useClasses = makeStyles({
4342
justifyContent: 'center',
4443
gap: tokens.spacingVerticalS,
4544
border: `2px solid ${tokens.colorNeutralStroke1}`,
46-
backgroundColor: tokens.colorNeutralBackground1,
45+
// Removing shadows because they are not accurate for 3D rotations
46+
boxShadow: 'none !important', // Force remove shadow with !important
47+
'&::before': {
48+
display: 'none', // Remove any pseudo-element shadows
49+
},
50+
'&::after': {
51+
display: 'none', // Remove any pseudo-element shadows
52+
},
4753
},
4854
patternTitle: {
4955
color: tokens.colorNeutralForeground1,
@@ -173,7 +179,6 @@ export const CardFlip = () => {
173179
<Card
174180
className={classes.patternCard}
175181
onClick={() => togglePattern(pattern.id)}
176-
appearance="outline"
177182
role="button"
178183
tabIndex={0}
179184
aria-label={`Toggle ${pattern.name} rotation`}

0 commit comments

Comments
 (0)