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

fade function should be called withOpacity #20921

Closed
msafi opened this issue May 5, 2020 · 1 comment
Closed

fade function should be called withOpacity #20921

msafi opened this issue May 5, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@msafi
Copy link

msafi commented May 5, 2020

When I do fade(primary, 0.3), I expect the primary color to fade by 30% but it actually fades by 70%. Maybe if we rename fade to withOpacity it will make more sense.

withOpacity(primary, 0.3) is more clear because it tells me the primary color will be only 30% opaque, which I would know is very low.

We could introduce another method called fadeBy that will work as it reads. So fadeBy(primary, 0.3) === withOpacity(primary, 0.7)

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label May 5, 2020
@oliviertassinari
Copy link
Member

We already have a thread running on this topic in #13039 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants