Skip to content

Commit

Permalink
Remove broken CSS that tried to reset the absolute positioning when t…
Browse files Browse the repository at this point in the history
…here was no text
  • Loading branch information
mdo committed Aug 11, 2017
1 parent 3fbdedb commit 006590e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/4.0/components/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,17 @@ Group checkboxes or radios on the same horizontal row by adding `.form-check-inl

### Without labels

Should you have no text within the `<label>`, the input is positioned as you'd expect. **Currently only works on non-inline checkboxes and radios.** Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`).
Add `.position-static` to inputs within `.form-check` that don't have any label text. Remember to still provide some form of label for assistive technologies (for instance, using `aria-label`).

{% example html %}
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" id="blankCheckbox" value="option1" aria-label="...">
<input class="form-check-input position-static" type="checkbox" id="blankCheckbox" value="option1" aria-label="...">
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input class="form-check-input" type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="...">
<input class="form-check-input position-static" type="radio" name="blankRadio" id="blankRadio1" value="option1" aria-label="...">
</label>
</div>
{% endexample %}
Expand Down
4 changes: 0 additions & 4 deletions scss/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ select.form-control-lg {
position: absolute;
margin-top: $form-check-input-margin-y;
margin-left: -$form-check-input-gutter;

&:only-child {
position: static;
}
}

// Radios and checkboxes on same line
Expand Down

0 comments on commit 006590e

Please sign in to comment.