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 with hidden label is not square #5461

Closed
3 tasks done
lee-chase opened this issue Feb 27, 2020 · 2 comments · Fixed by #5463
Closed
3 tasks done

Checkbox with hidden label is not square #5461

lee-chase opened this issue Feb 27, 2020 · 2 comments · Fixed by #5463
Assignees

Comments

@lee-chase
Copy link
Member

What package(s) are you using?

  • carbon-components
  • carbon-components-react
  • carbon-components-vue

Detailed description

Describe in detail the issue you're having.
When hiding the label of the Checkbox component the component does not become square making it harder to align it horizontally.

Is this issue related to a specific component?

Checkbox

What did you expect to happen? What happened instead? What would you like to
see changed?

Checkbox should be square with the visual elements centred.

What browser are you working in?
Chrome

What version of the Carbon Design System are you using?
10.9

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?

Carbon-Components-Vue adding the hideLabel feature when shape of Checkbox was noticed carbon-design-system/carbon-components-vue#835

Steps to reproduce the issue

  1. Go here https://react.carbondesignsystem.com/?path=/story/checkbox--checked
  2. Hide the checkbox

E.g. https://codesandbox.io/s/peaceful-dawn-k9dpj

Additional information

image

@tw15egan
Copy link
Member

Since we're using some pseudo-elements to create the checkbox, it's not going to take up any space, but I created a PR to move the padding to the label so it doesn't have any arbitrary padding when a label does not exist. Let me know if that works 👍

@lee-chase
Copy link
Member Author

Made alternative suggestion in PR to keep space reserved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants