Skip to content

Commit

Permalink
Use pseudo-class too for disabled check/radio (twbs#29740)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelebleu authored and olsza committed Oct 3, 2020
1 parent e257aee commit fe5f5a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 6 additions & 3 deletions scss/forms/_form-check.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,16 @@
border-color: $form-check-input-indeterminate-border-color;
}

// Use disabled attribute instead of :disabled pseudo-class
// Workaround for: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11295231
&[disabled] {
&:disabled {
pointer-events: none;
filter: none;
opacity: .5;
}

// Use disabled attribute in addition of :disabled pseudo-class
// See: https://github.com/twbs/bootstrap/issues/28247
&[disabled],
&:disabled {
~ .form-check-label {
opacity: .5;
}
Expand Down
7 changes: 4 additions & 3 deletions scss/forms/_form-file.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@
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 {
// Use disabled attribute in addition of :disabled pseudo-class
// See: https://github.com/twbs/bootstrap/issues/28247
&[disabled] ~ .form-file-label .form-file-text,
&:disabled ~ .form-file-label .form-file-text {
background-color: $form-file-disabled-bg;
border-color: $form-file-disabled-border-color;
}
Expand Down

0 comments on commit fe5f5a9

Please sign in to comment.