0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Clarify docs for custom form structure

Fixes #25440
This commit is contained in:
Mark Otto 2018-09-17 12:07:31 -07:00 committed by XhmikosR
parent 787441d4bf
commit 7c88c46517

View File

@ -1105,7 +1105,7 @@ For even more customization and cross browser consistency, use our completely cu
### Checkboxes and radios ### 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. 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.