mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-21 20:55:50 +02:00
Use :focus-within for .form-file focus state (#29036)
Fixes #26563, closes #26576, closes #29021.
This commit is contained in:
@@ -14,11 +14,18 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
||||||
|
// Separate rules for :focus and :focus-within as IE doesn't support the latter, and
|
||||||
|
// thus ignores the entire ruleset. See https://github.com/twbs/bootstrap/pull/29036.
|
||||||
&:focus ~ .form-file-label {
|
&:focus ~ .form-file-label {
|
||||||
border-color: $form-file-focus-border-color;
|
border-color: $form-file-focus-border-color;
|
||||||
box-shadow: $form-file-focus-box-shadow;
|
box-shadow: $form-file-focus-box-shadow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:focus-within ~ .form-file-label {
|
||||||
|
border-color: $form-file-focus-border-color;
|
||||||
|
box-shadow: $form-file-focus-box-shadow;
|
||||||
|
}
|
||||||
|
|
||||||
// Use disabled attribute instead of :disabled pseudo-class
|
// Use disabled attribute instead of :disabled pseudo-class
|
||||||
// Workaround for: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11295231
|
// Workaround for: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11295231
|
||||||
&[disabled] ~ .form-file-label .form-file-text {
|
&[disabled] ~ .form-file-label .form-file-text {
|
||||||
|
Reference in New Issue
Block a user