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

Checkbox mis-alignment on mobile views #955

Open
KyleMit opened this issue May 25, 2022 · 1 comment
Open

Checkbox mis-alignment on mobile views #955

KyleMit opened this issue May 25, 2022 · 1 comment

Comments

@KyleMit
Copy link
Collaborator

KyleMit commented May 25, 2022

Describe the bug
Checkbox mis-alignment on mobile views

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://stackoverflow.design/product/components/checkbox
  2. Resize viewport to less than 640px

Expected behavior
Checkboxes to be aligned with their labels

Screenshots

Example Checkboxes on Medium vs Small Screens

Example Checkboxes on Medium vs Small Screens

Zoomed in example of checkboxes with alignment lines

Zoomed in example of checkboxes with alignment lines

Example of checkbox itself being resized on small displays

Example of checkbox itself being resized on small displays

Some important styling rules impacting this currently

Some important styling rules impacting this currently

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 101

Additional context

The culprit looks like it's the fact that we shrink the font to 11px for all screens under 640px

Worth noting that the main site actually has an additional edge case here. The checkbox inherits it's font from its parent, so if it's not nested in something with an explicit font, it'll get downsized 2px as well from 11px to 9px- this doesn't show up on stacks demo page, because the example panels set thefont-size` explicitly.

@ondrejkonec
Copy link

Hi @KyleMit!
I think I found an issue and I would like to suggest possible changes. Is there any real example outside Stacks? I could not find any checkboxes on http://stackoverflow.com/.

That would be helpful. Thanks!

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

No branches or pull requests

2 participants