mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-21 18:54:30 +01:00
Docs: add indeterminate disabled checkbox example (#36674)
This commit is contained in:
parent
22c7503c88
commit
6cf72530ed
@ -102,7 +102,9 @@
|
|||||||
// Indeterminate checkbox example in docs and StackBlitz
|
// Indeterminate checkbox example in docs and StackBlitz
|
||||||
document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]')
|
document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]')
|
||||||
.forEach(checkbox => {
|
.forEach(checkbox => {
|
||||||
|
if (checkbox.id.includes('Indeterminate')) {
|
||||||
checkbox.indeterminate = true
|
checkbox.indeterminate = true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
|
@ -49,7 +49,13 @@ Checkboxes can utilize the `:indeterminate` pseudo class when manually set via J
|
|||||||
|
|
||||||
Add the `disabled` attribute and the associated `<label>`s are automatically styled to match with a lighter color to help indicate the input's state.
|
Add the `disabled` attribute and the associated `<label>`s are automatically styled to match with a lighter color to help indicate the input's state.
|
||||||
|
|
||||||
{{< example >}}
|
{{< example class="bd-example-indeterminate" stackblitz_add_js="true" >}}
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" value="" id="flexCheckIndeterminateDisabled" disabled>
|
||||||
|
<label class="form-check-label" for="flexCheckIndeterminateDisabled">
|
||||||
|
Disabled indeterminate checkbox
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" value="" id="flexCheckDisabled" disabled>
|
<input class="form-check-input" type="checkbox" value="" id="flexCheckDisabled" disabled>
|
||||||
<label class="form-check-label" for="flexCheckDisabled">
|
<label class="form-check-label" for="flexCheckDisabled">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user