Skip to content

Commit 9ffc635

Browse files
committed
fix(@clayui/css): Forms fieldset[disabled] .form-control should use values from the $input Sass map and move rule-set closer to the .form-control rule-set
1 parent d00b97b commit 9ffc635

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

packages/clay-css/src/scss/components/_forms.scss

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ fieldset[disabled] label {
126126
}
127127
}
128128

129+
// This adds disabled styles to div.form-control inside a disabled fielset.
130+
131+
fieldset[disabled] .form-control {
132+
$disabled: setter(map-get($input, disabled), ());
133+
134+
@include clay-css($disabled);
135+
}
136+
129137
// Readonly controls as plain text
130138
// Apply class to a readonly input to make it appear like regular plain
131139
// text (without any border, background color, focus indicator)
@@ -404,20 +412,6 @@ textarea.form-control-plaintext,
404412

405413
// Disabled State
406414

407-
.form-control {
408-
fieldset[disabled] &,
409-
&[disabled] {
410-
border-color: $input-disabled-border-color;
411-
color: $input-disabled-color;
412-
cursor: $input-disabled-cursor;
413-
opacity: $input-disabled-opacity;
414-
415-
&::placeholder {
416-
color: $input-placeholder-disabled-color;
417-
}
418-
}
419-
}
420-
421415
.form-control[disabled] > option {
422416
// Webkit only
423417

0 commit comments

Comments
 (0)