style readonly inputs different than disabled inputs

This commit is contained in:
Mads Rasmussen
2022-05-11 19:36:39 +02:00
parent 95a41afea9
commit de8a5bc855
2 changed files with 18 additions and 6 deletions

View File

@@ -478,16 +478,27 @@ textarea[class*="span"],
// Disabled and read-only inputs
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
textarea[disabled] {
cursor: not-allowed;
background-color: @inputDisabledBackground;
}
// Explicitly reset the colors here
input[type="radio"][readonly],
input[type="checkbox"][readonly] {
background-color: transparent;
}
// READONLY STATE
// --------------
// Disabled and read-only inputs
input[readonly],
select[readonly],
textarea[readonly] {
border-color: @inputReadonlyBorderColor;
}
// Explicitly reset the colors here
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"][readonly],
input[type="checkbox"][readonly] {
background-color: transparent;

View File

@@ -315,6 +315,7 @@
@formActionsBackground: @gray-9;
@inputHeight: (@baseLineHeight + 12px); // base line-height + 8px vertical padding + 2px top/bottom border
@controlRequiredColor: @red;
@inputReadonlyBorderColor: @gray-7;
// Tabs