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

Custom checkbox/radio with NO label is misaligned #27598

Closed
natcohen opened this issue Nov 4, 2018 · 4 comments
Closed

Custom checkbox/radio with NO label is misaligned #27598

natcohen opened this issue Nov 4, 2018 · 4 comments

Comments

@natcohen
Copy link

natcohen commented Nov 4, 2018

No label in a custom checkbox/radio makes the checkbox/radio misaligned

In this example:

<div class="custom-control custom-checkbox">
  <input type="checkbox" class="custom-control-input" id="customCheck1">
  <label class="custom-control-label" for="customCheck1"></label>
</div>

http://plnkr.co/edit/lYHpjKpKR2T8b9ncpUqg?p=preview

There should not be any margin between the box and the top of the page like this:

<div class="custom-control custom-checkbox">
  <input type="checkbox" class="custom-control-input" id="customCheck1">
  <label class="custom-control-label" for="customCheck1">Test</label>
</div>

http://plnkr.co/edit/AF03rpE4YltjeyjiluYn?p=preview

Also there is no such example in the documentation (there is one for non-custom checkboxes).

@florianlacreuse
Copy link
Contributor

See this hack to fix it: https://stackoverflow.com/a/50798065

@ysds
Copy link
Member

ysds commented Nov 5, 2018

Fixed in #27566 :)

@Johann-S
Copy link
Member

Johann-S commented Nov 5, 2018

Closed because will be fixed in our next release 👍 thanks @ysds 👍

@Johann-S Johann-S closed this as completed Nov 5, 2018
@natcohen
Copy link
Author

natcohen commented Nov 5, 2018

@Johann-S & @ysds Thanks for the fix and sorry for the duplicate... I still think we should add it in the documentation exactly like the non-custom one

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

4 participants