Skip to content

Commit

Permalink
use :read-only css selector instead [readonly] for consistency (#…
Browse files Browse the repository at this point in the history
…33642)

There are 5 places where [readonly] selector is used. I have replaced with :read-only for consistency.

fix for #33101

Co-authored-by: Harish <halodoc@ip-192-168-43-211.ap-southeast-1.compute.internal>
  • Loading branch information
coharishreddy and Harish authored Apr 17, 2021
1 parent 6fc74eb commit 17252bb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scss/forms/_form-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
&[type="file"] {
overflow: hidden; // prevent pseudo element button overlap

&:not(:disabled):not([readonly]) {
&:not(:disabled):not(:read-only) {
cursor: pointer;
}
}
Expand Down Expand Up @@ -65,7 +65,7 @@
// disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway.
&:disabled,
&[readonly] {
&:read-only {
background-color: $input-disabled-bg;
border-color: $input-disabled-border-color;
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
Expand All @@ -88,7 +88,7 @@
@include transition($btn-transition);
}

&:hover:not(:disabled):not([readonly])::file-selector-button {
&:hover:not(:disabled):not(:read-only)::file-selector-button {
background-color: $form-file-button-hover-bg;
}

Expand All @@ -107,7 +107,7 @@
@include transition($btn-transition);
}

&:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
&:hover:not(:disabled):not(:read-only)::-webkit-file-upload-button {
background-color: $form-file-button-hover-bg;
}
}
Expand Down Expand Up @@ -203,7 +203,7 @@ textarea {
height: auto; // Override fixed browser height
padding: $input-padding-y;

&:not(:disabled):not([readonly]) {
&:not(:disabled):not(:read-only) {
cursor: pointer;
}

Expand Down

0 comments on commit 17252bb

Please sign in to comment.