Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .changeset/menu-item-durations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
17 changes: 12 additions & 5 deletions packages/ui/src/mosaic/components/menu/menu.styles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import * as stylex from '@stylexjs/stylex';

import { colorVars, fontFamilyVars, fontWeightVars, radiusVars, space, typeScaleVars } from '../../tokens.stylex';
import {
colorVars,
durationVars,
fontFamilyVars,
fontWeightVars,
radiusVars,
space,
typeScaleVars,
} from '../../tokens.stylex';

export const styles = stylex.create({
// Positioning is applied inline by the headless positioner; this only clears the
Expand Down Expand Up @@ -71,10 +79,9 @@ export const styles = stylex.create({
opacity: { default: 1, ':is([data-disabled])': 0.5 },
position: 'relative',
textAlign: 'start',
transitionDuration: {
default: '150ms',
'@media (prefers-reduced-motion: reduce)': '0.01ms',
},
// Ungated: the only thing moving is a fill, which is not what `prefers-reduced-motion`
// is about. Matches `Button`, whose highlight transitions the same way.
transitionDuration: durationVars['--cl-duration-base'],
transitionProperty: 'background-color',
height: space['7'],
width: '100%',
Expand Down
Loading