0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Use :focus-within for .form-file focus state (#29036)

Fixes #26563, closes #26576, closes #29021.
This commit is contained in:
Mark Otto 2019-07-17 06:56:54 -07:00 committed by XhmikosR
parent 4634fd7c1a
commit 99676c7809

View File

@ -14,11 +14,18 @@
margin: 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 {
border-color: $form-file-focus-border-color;
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
// Workaround for: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11295231
&[disabled] ~ .form-file-label .form-file-text {