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

proto.io generated html is wrong #4

Closed
linakis opened this issue Oct 30, 2014 · 2 comments
Closed

proto.io generated html is wrong #4

linakis opened this issue Oct 30, 2014 · 2 comments

Comments

@linakis
Copy link

linakis commented Oct 30, 2014

The generated html from http://proto.io/freebies/onoff/ is providing the following snippet:

<div class="onoffswitch">
    <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch">
    <label class="onoffswitch-label" for="myonoffswitch">
        <span class="onoffswitch-inner"></span>
        <span class="onoffswitch-switch"></span>
    </label>
</div>

where the correct one (also mentioned in your README) is:

<div class="onoffswitch">
  <input type="checkbox" class="onoffswitch-checkbox" id="myonoffswitch" />
  <label class="onoffswitch-label" for="myonoffswitch">
    <div class="onoffswitch-inner"></div>
    <div class="onoffswitch-switch"></div>
  </label>
</div>

The difference is the div instead of span inside the label that prevented the plugin to properly figure out how to render itself.

@timmywil
Copy link
Owner

Thanks, I think proto.io actually has it right. Technically, labels can only have phrasing content as descendants (which includes span but not div). I can fix this easily enough.

@linakis
Copy link
Author

linakis commented Oct 30, 2014

hmm strange... I didin't spend much time on it, I just made it work and stayed there.

👍 for the fix

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

2 participants