Skip to content

Commit

Permalink
Make the box-sizing explicit on the MoonLoader circle (#162)
Browse files Browse the repository at this point in the history
Recent versions of Tailwind CSS force everything to `box-sizing: border-box;`
(see tailwindlabs/tailwindcss#1111 )
Tailwind isn't the only thing out there using that hack, so this is sure to be a wider-ranging problem.
The result of using Tailwind & react-spinners in the same project without this change is that the spinner circle wobbles around.

Co-authored-by: David Hu <davidhu314@gmail.com>
  • Loading branch information
maco and davidhu2000 committed May 2, 2020
1 parent 0efdb7f commit ff28caf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/MoonLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Loader extends React.PureComponent<LoaderSizeProps> {
${this.ballStyle(value)};
border: ${this.moonSize()}px solid ${color};
opacity: 0.1;
box-sizing: content-box;
`;
};

Expand Down

0 comments on commit ff28caf

Please sign in to comment.