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

CircularProgress animation's midpoint is off when (size / line-height) <= ~10 #11761

Closed
2 tasks done
cubeghost opened this issue Jun 7, 2018 · 4 comments · Fixed by #11781
Closed
2 tasks done

CircularProgress animation's midpoint is off when (size / line-height) <= ~10 #11761

cubeghost opened this issue Jun 7, 2018 · 4 comments · Fixed by #11781
Labels
bug 🐛 Something doesn't work component: CircularProgress The React component component: progress This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@cubeghost
Copy link

  • This is a v1.x issue (v0.x is no longer maintained).
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

<CircularProgress /> always rotates around its own midpoint

Current Behavior

When the container's line-height is greater than 1 and CircularProgress size is small enough, animation's midpoint is incorrect, resulting in this:
kapture 2018-06-07 at 12 24 41

It stops being noticeable around when the size reaches about ~10-11 times the line-height.

Steps to Reproduce (for bugs)

https://codesandbox.io/s/v6rv1880q7

  1. Set the line-height on the container surrounding a CircularProgress to greater than 1, and the size on CircularProgress to less than 12 * lineHeight

Context

My application's global line-height is 1.5, and I use <CircularProgress size={16} /> inside of buttons that are not material-ui's buttons

Your Environment

Tech Version
Material-UI v1.2.0
React 16.4
browser Chrome 67
etc
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work good first issue Great for first contributions. Enable to learn the contribution process. component: CircularProgress The React component labels Jun 7, 2018
@oliviertassinari
Copy link
Member

@cubeghost This is a nice finding!
What do you think of setting line-height: 1 on the root element of the circular progress? Do you want to work on it?

@adeelibr
Copy link
Contributor

adeelibr commented Jun 8, 2018

@cubeghost If you aren't working on this, I was planning to work on this myself.

@cubeghost
Copy link
Author

@adeelibr go for it! I wasn't going to have time to tackle it soon
@oliviertassinari thanks!

@adeelibr
Copy link
Contributor

adeelibr commented Jun 8, 2018

I have a PR for this #11781

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: CircularProgress The React component component: progress This is the name of the generic UI component, not the React module! good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants