Skip to content

Commit

Permalink
Clarify docs for custom form structure
Browse files Browse the repository at this point in the history
Fixes #25440
  • Loading branch information
mdo authored and XhmikosR committed Sep 18, 2018
1 parent 787441d commit 7c88c46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion site/docs/4.1/components/forms.md
Expand Up @@ -1105,7 +1105,7 @@ For even more customization and cross browser consistency, use our completely cu

### Checkboxes and radios

Each checkbox and radio is wrapped in a `<div>` with a sibling `<span>` to create our custom control and a `<label>` for the accompanying text. Structurally, this is the same approach as our default `.form-check`.
Each checkbox and radio `<input>` and `<label>` pairing is wrapped in a `<div>` to create our custom control. Structurally, this is the same approach as our default `.form-check`.

We use the sibling selector (`~`) for all our `<input>` states—like `:checked`—to properly style our custom form indicator. When combined with the `.custom-control-label` class, we can also style the text for each item based on the `<input>`'s state.

Expand Down

0 comments on commit 7c88c46

Please sign in to comment.