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

RaisedButton,Use labelColor property,The button will not trigger the hover state #4841

Closed
likun7981 opened this issue Jul 28, 2016 · 5 comments
Labels
out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future)

Comments

@likun7981
Copy link

Problem description

RaisedButton,Use labelColor property,The button will not trigger the hover state

Versions

  • Material-UI: 0.15.2
  • React: 15.2.1
  • Browser: Chrome 51.0.2704.103 (64-bit) Mac
@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@gyfis
Copy link

gyfis commented Jan 15, 2017

I've just encountered this bug as well, though I need to say that for me, it didn't work when I specified the color by name (e.g. labelColor={'white'}), but when I replaced the color with actual hex code (e.g. label={'#ffffff'}) it started to work again - I think it's because the hover is created by adding alpha to the color and the framework not being able to properly parse RGB from the string color representation - this means that it can be fixed on user end but it might affect more components.

@mbrookes
Copy link
Member

@gyfis That's correct, we don't attempt to map string colours in https://github.com/callemall/material-ui/blob/master/src/utils/colorManipulator.js.

Given the move to jss styling in the next branch I think it's unlikely we'll fix this, so am closing the issue.

@gyfis Thanks for following up.

@mbrookes mbrookes added out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future) Core labels Jan 15, 2017
@gyfis
Copy link

gyfis commented Jan 15, 2017

@mbrookes Thanks for the info! Yeah, it makes sense not to parse colors input in this way. Do you think it would be a good idea to add a general warning about 'adding a non-parseable color to component - this might cause component effects not to work', possibly in the next branch?

@mbrookes
Copy link
Member

We don't have xxxColor props on next, so it will be less of a problem. Throwing a warning in the decomposeColor function in colorManipulator on master mightn't be a bad idea.

Feel free to submit a PR - should only need a couple of lines. Here's an example warning: https://github.com/callemall/material-ui/blob/master/src/DatePicker/dateUtils.js#L11

gyfis added a commit to gyfis/material-ui that referenced this issue Jan 15, 2017
A warning that fires when the color string format is not in one of the expected formats. It doesn't try to stop the code, but at least warns the user that something is off instead of failing silently. Motivated by issue mui#4841.
@gyfis
Copy link

gyfis commented Jan 15, 2017

I submitted the PR: #5939

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
out of scope The problem looks valid but we won't fix it (maybe we will revisit it in the future)
Projects
None yet
Development

No branches or pull requests

3 participants