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

Support <label><input></label> style for checkboxes and radio buttons #184

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mbrowne
Copy link

@mbrowne mbrowne commented May 6, 2014

As posted on the OOCSS forum: https://groups.google.com/forum/#!topic/object-oriented-css/m5m_SbCLoCc
The issue I had was with checkboxes and radio buttons...as long as my HTML was like the examples, it was fine, but sometimes I like to wrap my tag around the checkbox or radio button, e.g.:

<label>
  <input type="checkbox"> Check me
</label>

And if I want to use the style shown in the docs, I just need to add the hanging-indent class:

<input type="checkbox" id="checkbox1">
<label for="checkbox1" class="hangingIndent"> Check me</label>

If anyone has any other ideas I think it would be good to discuss them, but in any case I think both styles of HTML should be supported.

I'm happy to update the documentation file as well if this pull request is accepted. Thank you.

@mbrowne
Copy link
Author

mbrowne commented May 10, 2014

I have now updated the documentation for this as well:
mbrowne@f6775d2
If you're going to accept this pull request, just let me know and I'll create a pull request for that commit.

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

Successfully merging this pull request may close these issues.

1 participant