Skip to content
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

[Button] Fix secondary contrastText color #9913

Merged
merged 1 commit into from
Jan 16, 2018
Merged

[Button] Fix secondary contrastText color #9913

merged 1 commit into from
Jan 16, 2018

Conversation

ValentinH
Copy link
Contributor

As discussed in #9908

@oliviertassinari oliviertassinari added the component: button This is the name of the generic UI component, not the React module! label Jan 16, 2018
@oliviertassinari oliviertassinari changed the title Fix button raisedAccent color [Button] Fix button raisedAccent color Jan 16, 2018
@oliviertassinari oliviertassinari changed the title [Button] Fix button raisedAccent color [Button] Fix secondary contrastText color Jan 16, 2018
@oliviertassinari oliviertassinari merged commit 19e6a20 into mui:v1-beta Jan 16, 2018
@oliviertassinari
Copy link
Member

@ValentinH Thank you!

Copy link
Member

@mbrookes mbrookes left a comment

Choose a reason for hiding this comment

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

Please revert.

@@ -119,7 +119,7 @@ export const styles = theme => ({
},
},
raisedAccent: {
color: theme.palette.getContrastText(theme.palette.secondary.light),
color: theme.palette.secondary.contrastText,
Copy link
Member

@mbrookes mbrookes Jan 16, 2018

Choose a reason for hiding this comment

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

This change is applying the contrastText color calculated for the secondary.main color to a light background. If the contrastText color is white, it's going to have a low contrast ratio against secondary.light. It also introduces an inconsistency with other components.

Copy link
Member

@oliviertassinari oliviertassinari Jan 16, 2018

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I was also going to submit an issue about why the default raisedAccent is not the main one and the hover the dark one. Is it what you are talking about @oliviertassinari

@mbrookes
Copy link
Member

mbrookes commented Jan 16, 2018

Sorry, I don't know what I'm supposed to be looking at with those links, or what the "next" topic is.

For this topic, unfortunatety this PR introduces a regression.

@oliviertassinari
Copy link
Member

@mbrookes I'm on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants