Skip to content

Commit

Permalink
fix(@clayui/css): Form Validation use clay-form-control-variant to …
Browse files Browse the repository at this point in the history
…style Danger, Warning, Success readonly inputs instead of `clay-button-variant`

fix(@clayui/css): Atlas Form Validation readonly inputs should use newer Sass map keys
  • Loading branch information
pat270 committed Sep 23, 2021
1 parent c23c8f5 commit 23ed8cb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
18 changes: 12 additions & 6 deletions packages/clay-css/src/scss/atlas/variables/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,15 @@ $input-danger: map-deep-merge(
$input-danger-readonly: () !default;
$input-danger-readonly: map-deep-merge(
(
bg:
background-color:
setter(
map-get($input-readonly, bg),
map-get($input-readonly, background-color)
),
border-color: map-get($input-readonly, border-color),
focus-border-color: $input-focus-border-color,
focus: (
border-color: $input-focus-border-color,
),
),
$input-danger-readonly
);
Expand Down Expand Up @@ -254,13 +256,15 @@ $input-warning: map-deep-merge(
$input-warning-readonly: () !default;
$input-warning-readonly: map-deep-merge(
(
bg:
background-color:
setter(
map-get($input-readonly, bg),
map-get($input-readonly, background-color)
),
border-color: map-get($input-readonly, border-color),
focus-border-color: $input-focus-border-color,
focus: (
border-color: $input-focus-border-color,
),
),
$input-warning-readonly
);
Expand Down Expand Up @@ -312,13 +316,15 @@ $input-success: map-deep-merge(
$input-success-readonly: () !default;
$input-success-readonly: map-deep-merge(
(
bg:
background-color:
setter(
map-get($input-readonly, bg),
map-get($input-readonly, background-color)
),
border-color: map-get($input-readonly, border-color),
focus-border-color: $input-focus-border-color,
focus: (
border-color: $input-focus-border-color,
),
),
$input-success-readonly
);
Expand Down
6 changes: 3 additions & 3 deletions packages/clay-css/src/scss/components/_form-validation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
}

.form-control[readonly] {
@include clay-button-variant($input-danger-readonly);
@include clay-form-control-variant($input-danger-readonly);
}

.form-feedback-item {
Expand Down Expand Up @@ -180,7 +180,7 @@
}

.form-control[readonly] {
@include clay-button-variant($input-warning-readonly);
@include clay-form-control-variant($input-warning-readonly);
}

.form-feedback-item {
Expand Down Expand Up @@ -257,7 +257,7 @@
}

.form-control[readonly] {
@include clay-button-variant($input-success-readonly);
@include clay-form-control-variant($input-success-readonly);
}

.form-feedback-item {
Expand Down
2 changes: 2 additions & 0 deletions packages/clay-css/src/scss/variables/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ $input-danger: map-deep-merge(
$input-danger
);

// .has-error .form-control[readonly]

$input-danger-readonly: () !default;

$input-danger-checkbox-label-color: $form-feedback-invalid-color !default;
Expand Down

0 comments on commit 23ed8cb

Please sign in to comment.