Skip to content

[material-ui][Fab] Fix default variant text color when using CSS vars #45714

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

aarongarciah
Copy link
Member

@aarongarciah aarongarciah commented Mar 27, 2025

Fixes #45712

before after
Screenshot 2025-03-27 at 15 20 24 Screenshot 2025-03-27 at 15 21 38
Screenshot 2025-03-27 at 15 20 16 Screenshot 2025-03-27 at 15 21 44

@aarongarciah aarongarciah added component: Fab The React component. package: material-ui Specific to @mui/material labels Mar 27, 2025
@aarongarciah aarongarciah changed the title [Fab] Fix default variant text color when using CSS vars [material-ui][Fab] Fix default variant text color when using CSS vars Mar 27, 2025
@mui-bot
Copy link

mui-bot commented Mar 27, 2025

Netlify deploy preview

https://deploy-preview-45714--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 6c7245c

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the incorrect text color for Fabs when CSS variables are used by replacing the color reference from theme.vars.palette.text.primary to theme.vars.palette.grey[900].

  • Update color computation in Fab to address contrast issues with the default variant.
  • Aligns the color definition with the intended design for CSS variable usage.
Comments suppressed due to low confidence (1)

packages/mui-material/src/Fab/Fab.js:69

theme.vars.palette.grey[900]

@aarongarciah aarongarciah marked this pull request as ready for review March 27, 2025 14:19
@aarongarciah aarongarciah requested a review from DiegoAndai March 27, 2025 14:19
@aarongarciah aarongarciah merged commit a5426e6 into mui:master Mar 27, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Fab The React component. package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fab] Wrong colors in dark mode for default variant
3 participants