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

Slight issue with horizontal forms. #9

Closed
barisbalic opened this issue Oct 5, 2017 · 1 comment
Closed

Slight issue with horizontal forms. #9

barisbalic opened this issue Oct 5, 2017 · 1 comment
Assignees

Comments

@barisbalic
Copy link

barisbalic commented Oct 5, 2017

Thanks very much for adding this extension, really happy to have the added consistency. I've encountered a problem, potentially by design, but I suspect it just wasn't one of your use-cases!

Firstly, if you provide a label before the input, but otherwise use the code as in your examples, no checkbox is rendered at all, an example here...

<div class="field">
  <label class="label" for="member_is_observer_account">Is observer account</label>
  <input class="is-checkbox" id="member_is_observer_account" name="member[is_observer_account]" type="checkbox" value="true">
</div>

One way to cheat is to put an empty label after the input, however when the two elements are no longer siblings, as with horizontal forms, it is no longer possible to click directly on the checkbox as the example below would demonstrate. This example is a combination of your classes with the structure that Bulma dictates for other horizontal fields.

Let me know if any of this doesn't make sense or if you need any help!

@Wikiki
Copy link
Owner

Wikiki commented Oct 10, 2017

Hi,

unfortunately I don't see how to manage a label first structure.
I'm using .is-checkbox + label CSS selector to design label.
So the only way to achieve what you want is to use an empty label after the input but don"t forget to set the id on it instead of on label before.

If you know how to design an element based on the next sibling element in CSS let me know ;-)

Regards

@Wikiki Wikiki self-assigned this Oct 10, 2017
@Wikiki Wikiki closed this as completed Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants