Skip to content

Change first-child to first-of-type in btn-group#175

Closed
mermop wants to merge 1 commit intotwbs:masterfrom
mermop:patch-1
Closed

Change first-child to first-of-type in btn-group#175
mermop wants to merge 1 commit intotwbs:masterfrom
mermop:patch-1

Conversation

@mermop
Copy link
Copy Markdown

@mermop mermop commented Jul 8, 2019

Hello friends! Long-time listener, first-time caller 📞

This PR changes the selector for resetting rounded corners of btn elements in btn-groups from first-child to first-of-type to accommodate hidden inputs in sets of checkboxes or radio buttons.

The Rails collection_check_box or Simple Form or Formtastic all add a hidden input either at the beginning or end of a collection of check boxes or radio buttons. This makes implementing groups of checkboxes or radio buttons as per the documentation either painful or slightly ugly.

Hope this is the right place to put this PR!

Markup using Rails collection_check_boxes

Screen Shot 2019-07-08 at 12 30 23 PM

Screenshot using first-child/last-child

Screen Shot 2019-07-08 at 12 30 07 PM

Screenshot using first-of-type/last-of-type

Screen Shot 2019-07-08 at 12 32 42 PM

@mermop
Copy link
Copy Markdown
Author

mermop commented Jul 8, 2019

Realised this is the wrong place to open this PR - I put it in the bootstrap repo instead

@mermop mermop closed this Jul 8, 2019
@mermop mermop deleted the patch-1 branch July 8, 2019 00:51
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