Skip to content

Conversation

@nickclyde
Copy link

Building on #72 by @enumag, I've added selectors for input tags that are inside the label tags, while still retaining support for the other method as well. The one caveat is that the actual label text needs to be inside span tags. I've updated the LESS, SCSS, and CSS files, as well as the README to reflect the new changes.

@enumag
Copy link

enumag commented Mar 11, 2016

@ClydeDroid Awesome! 👍 I'm closing my PR in favor of this one.

@enumag enumag mentioned this pull request Mar 11, 2016
@enumag
Copy link

enumag commented Mar 11, 2016

Actually what is the reason for the necessary span? My PR didn't require that.

@nickclyde
Copy link
Author

The span is necessary so that styles can be applied separately to the input element and the label text, which is contained in the span. If the label text is in the input tags, styles on the input will apply to the label text as well.

@enumag
Copy link

enumag commented Mar 14, 2016

I see now. In that case this is different from my pull request. My problem is that the checkboxes inside labels currently don't work at all. I just wanted to fix their function, not their styles.

@nickclyde
Copy link
Author

Actually, I wanted to correct the function as well; and it seems to work in my case. Do checkboxes still not work for you when using my CSS file?

@enumag
Copy link

enumag commented Mar 14, 2016

Not without the <span> tag.

@siebeclaes
Copy link

siebeclaes commented Oct 14, 2016

Hi, thanks for this updated version. It works great for me in combination with django and bootstrap. The only problem was that the new checkbox is not properly aligned. I fixed it by doing this:

.checkbox label > span { display: inline-block; vertical-align: top; position: relative; padding-left: 0px; }

Note the edited vertical-align and padding-left values

@Oxicode
Copy link

Oxicode commented Oct 14, 2016

+1

@nickclyde nickclyde closed this Sep 8, 2021
@nickclyde nickclyde deleted the master branch September 8, 2021 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants