Wikiki / bulma-checkradio

Bulma's extension to display better checkbox and radio imputs
MIT License
71 stars 43 forks source link

Doesn't seem to work if checkbox is nested inside label? #1

Closed ctolkien closed 7 years ago

ctolkien commented 7 years ago

I'm not getting the checkbox to show if a label wraps the checkbox element.

Wikiki commented 7 years ago

Hi,

you're right it's a bug. I'll correct this soonly.

Thanks

Wikiki commented 7 years ago

Hi again,

sorry, but I had a look and unfortunately I can't design the label based on the input status (checked / unchecked) with the default Bulma structure. CSS doesn't have selector for parentNode. If we want to do it we have to use JavaScript.

So I have to use the following structure in order to have it working:

<div class="field">
  <input class="is-checkbox" id="exampleCheckbox" type="checkbox" name="exampleCheckbox">
  <label for="exampleCheckbox">Check me</label>
</div>
ctolkien commented 7 years ago

Thanks for the update.

michaelhamor commented 5 years ago

I may be mistaken, but using the current documentation I ran into the same problem. Tried this solution and it worked.

Does the bulma.io documentation need updating?

Aadv1k commented 1 year ago

It seems this issue still prevails! I am just leaving this comment here to get it noticed