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

fix(color): Prevent floating point issue with alpha channel #186

Merged
merged 1 commit into from
May 31, 2017

Conversation

timsnadden
Copy link
Contributor

@timsnadden timsnadden commented May 27, 2017

transparentize(0.9, '#002f6b') results in rgba(0,47,107,0.09999999999999998) and it should be rgba(0,47,107,0.1)

@codecov
Copy link

codecov bot commented May 27, 2017

Codecov Report

Merging #186 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #186   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          64     64           
  Lines         347    347           
  Branches       97     97           
=====================================
  Hits          347    347
Impacted Files Coverage Δ
src/color/transparentize.js 100% <ø> (ø) ⬆️
src/color/opacify.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4dcf555...00bf054. Read the comment docs.

@bhough
Copy link
Contributor

bhough commented May 30, 2017

Thanks for the pr @timsnadden! I will give this a look tonight and see if we can get it out in a release.

@bhough bhough self-requested a review May 30, 2017 17:44
@bhough bhough added the bug label May 30, 2017
@bhough bhough changed the title fix: prevent floating point issue with alpha channel fix(color): Prevent floating point issue with alpha channel May 31, 2017
@bhough bhough merged commit 5d3afc6 into styled-components:master May 31, 2017
@nikgraf
Copy link
Member

nikgraf commented Jun 21, 2017

thanks @timsnadden 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants