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

QOLDEV-62 make checkbox styling consistent #734

Merged
merged 8 commits into from
Feb 2, 2023

Conversation

ThrawnCA
Copy link
Contributor

@ThrawnCA ThrawnCA commented Jan 25, 2023

Compare to designs on Figma: https://www.figma.com/file/5BrkUy62yKzGbRJnrUcLLM/Form-control-inputs%3A-Radio-and-checkbox?node-id=19%3A1893

  • Use black checkmark on a white background regardless of browser defaults.
  • Apply blue outline on focus.

- default, focus, active, hover, disabled
- use a black tick on a white background with order, regardless of browser defaults
@RossWebsterWork
Copy link

Comparing Chromatic to Figma, the checkboxes seem a little off-centre compared to their labels, the checkbox outline is a little different and the checkmark seems to be rotated, otherwise it looks good.

@ThrawnCA
Copy link
Contributor Author

Comparing Chromatic to Figma, the checkboxes seem a little off-centre compared to their labels, the checkbox outline is a little different and the checkmark seems to be rotated, otherwise it looks good.

Yeah, I wasn't able to perfectly replicate the Figma design. I figured it's still closer than the status quo.

- use a black circle on a white background
- make outline circular
- Tweak polygon definition to use 45-degree angles and thickness equivalent to 16% of the element length
@ThrawnCA
Copy link
Contributor Author

@RossWebsterWork Okay, I've adjusted the polygon definition, so the check mark should be closer to Figma now.

@ThrawnCA
Copy link
Contributor Author

Chromatic shows the radio button outlines being square, but local testing with both Firefox and Chrome shows them as circular.

- Add the '-moz-outline-radius' property for Firefox versions too old to apply 'border-radius' to outlines.
@ThrawnCA
Copy link
Contributor Author

Looks like Chromatic is using older browser versions, see https://www.chromatic.com/docs/infrastructure-release-notes

@ThrawnCA ThrawnCA merged commit f321fcf into release-v4.0.15 Feb 2, 2023
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 this pull request may close these issues.

3 participants