Open fpaz opened 3 months ago
True https://mui.com/material-ui/customization/palette/#color-tokens.
Stuff like https://github.com/mui/mui-private/blob/8f4f962d53c6aa5cd8fad3e43c04b6cbb161bd1f/packages/material-ui-sync-figma/src/defaults/theme.ts#L21 looks weird.
primary: {
main: '#2196F3',
dark: '#1E88E5',
light: '#42A5F5',
contrast: '#FFFFFF',
_states: {
hover: 'rgba(33, 150, 243, 0.04)',
selected: 'rgba(33, 150, 243, 0.08)',
focus: 'rgba(33, 150, 243, 0.12)',
focusVisible: 'rgba(33, 150, 243, 0.3)',
outlinedBorder: 'rgba(33, 150, 243, 0.5)',
},
},
packages/material-ui-sync-figma/src/defaults/theme.ts
I can reproduce with the latest version:
I suspect that fixing #393 in the Figma Kit and updating the source in the Figma plugin, like https://github.com/mui/mui-private/blob/8f4f962d53c6aa5cd8fad3e43c04b6cbb161bd1f/packages/material-ui-sync-figma/src/defaults/theme.ts#L21 will fix this.
Steps to reproduce
When extracting the theme using Material UI Sync. The
contrastText
was renamed tocontrast
Current behavior
When viewing the source for the root style. We get two contrast values.
Expected behavior
It should only generate one value for the contrast.
Context
We have to rename
contrast
tocontrastText
from the generated theme for it to work on our application. Is there any documentation around the implementation of contrast?Your environment
Search keywords: contrast contrastText