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

MoonLoader wobbles when provided a size not evenly divisible by 7 #583

Open
RigoOnRails opened this issue Mar 19, 2024 · 0 comments
Open
Labels

Comments

@RigoOnRails
Copy link

RigoOnRails commented Mar 19, 2024

Package Version
0.13.4

Describe the bug
The MoonLoader component does some math internally to compute the correct border width for the spinner + the overall container size. The magic number here seems to be 7.

const moonSize = value / 7;

When provided a size that is evenly divisible by 7 (Eg. 14, 21, 28, etc.), the component renders perfectly & doesn't wobble, due to the perfect whole numbers in the computed sizes:

Capture d’écran 2024-03-18 à 17 52 40

But when you provide an arbitrary size like 24, you get these very specific sizes that start causing the wobbling, I assume due to the browser engine:

Capture d’écran 2024-03-18 à 17 56 08

To Reproduce
Provide a size not evenly divisible by 7.

Expected behavior
The component should be stable, no matter the size provided.

Additional context
This is tested using Chrome on macOS.

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

No branches or pull requests

2 participants