Skip to content

Commit

Permalink
fix(uui-textarea): add danger border if the element is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
iOvergaard committed Jul 23, 2024
1 parent db0d78d commit fae88fe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/uui-textarea/lib/uui-textarea.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,19 @@ export class UUITextareaElement extends UUIFormControlMixin(LitElement, '') {
:host {
position: relative;
}
:host([error]) textarea {
border: 1px solid var(--uui-color-danger) !important;
}
:host([error]) textarea,
:host([error]) textarea[disabled] {
border: 1px solid var(--uui-color-danger) !important;
}
:host(:not([pristine]):invalid) textarea,
/* polyfill support */
:host(:not([pristine])[internals-invalid]) textarea {
border-color: var(--uui-color-danger);
}
:host([auto-height]) textarea {
resize: none;
}
.label {
display: inline-block;
margin-bottom: var(--uui-size-1);
Expand Down

0 comments on commit fae88fe

Please sign in to comment.