picocss / pico

Minimal CSS Framework for semantic HTML
https://picocss.com
MIT License
13.82k stars 406 forks source link

Fix loading spinner sizing #474

Closed FireIsGood closed 8 months ago

FireIsGood commented 8 months ago

Fixes #469

Previously, the spinner would not resize to match its width and height. This was due to the wrong unit being used for the background image.

Comparison

(Outlines added on these images for clarity, but not actually in the changes)

Before:

image

After:

image

Info for CSS nerds

This is a single character change to make 1rem into 1em. The difference is that rem does not scale with the element's font size compared to em. The width and height of the element are set with em, so changing this makes it scale to fit the box correctly.

FireIsGood commented 8 months ago

You may have to undo the build steps to merge multiple pull requests, so feel free to do that on the provided branch.