Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make boolean input tag generate valid html5 when using nested style
This keeps Rails functionality by adding the required hidden checkbox which will send an "unchecked value" when checkbox is not checked.
- Loading branch information
1 parent
c53398a
commit fb0360d
Showing
4 changed files
with
36 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fb0360d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlosantoniodasilva How did you figure out that having the hidden input right before the checkbox generated invalid HTML? Unfortunately, this change is breaking bootstrap's rule for aligning checkboxes: https://github.com/twitter/bootstrap/blob/v2.0.3/less/forms.less#L185-189
fb0360d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error:
fb0360d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dlee yeah, we're aware of the problem with bootstrap, but it's preferable to have valid markup and sort out some other way of fixing it through css there I think.
@rafaelfranca thanks.