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

Spinner not fully visible in the <code> element #469

Closed
MiroslavPetrik opened this issue Feb 24, 2024 · 1 comment · Fixed by #474 or #478
Closed

Spinner not fully visible in the <code> element #469

MiroslavPetrik opened this issue Feb 24, 2024 · 1 comment · Fixed by #474 or #478

Comments

@MiroslavPetrik
Copy link

Describe the issue

Using aria-busy with <code> element cuts the circle-spinner as square in bottom-right corner.

Current Behavior

Spinner is cut partially into square

Expected Behavior

Spinner should be fully visible as circle

Reproduction URL

https://codesandbox.io/p/sandbox/picocss-spinner-in-code-3y979t

Environment

W11 & latest Chrome & Firefox

@FireIsGood
Copy link
Contributor

FireIsGood commented Feb 26, 2024

This seems to be caused by the fact that the spinner has its width and height set as 1rem while the background size is set as 1rem

image

This is an issue because when the font size is changed, the spinner will resize its content box but not the actual background image of the spinner. The <code> element is affected since it modifies the font-size to be 0.875em.

image


One solution would be to change the background-size property from 1rem auto to `1em auto:

image

If this seems correct, I can make a pull request to fix it or it could be simply changed within pico/scss/components/_loading.scss line 18 and rebuilt.

@lucaslarroche lucaslarroche mentioned this issue Mar 3, 2024
@lucaslarroche lucaslarroche linked a pull request Mar 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants