Skip to content

Commit

Permalink
font size
Browse files Browse the repository at this point in the history
  • Loading branch information
loivsen committed Oct 4, 2023
1 parent 6575986 commit 16530b3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/uui-textarea/lib/uui-textarea.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
* @cssprop --uui-textarea-min-height - Sets the minimum height of the textarea
* @cssprop --uui-textarea-max-height - Sets the maximum height of the textarea
* @cssprop {color} --uui-textarea-background-color - Sets the background color of the textarea
* @cssprop --uui-textarea-font-size - Overwrites the default font size
*/
@defineElement('uui-textarea')
export class UUITextareaElement extends FormControlMixin(LitElement) {
Expand All @@ -26,6 +27,7 @@ export class UUITextareaElement extends FormControlMixin(LitElement) {
css`
:host {
position: relative;
--textarea-font-size: var(--uui-size-5);
}
:host([error]) textarea {
border: 1px solid var(--uui-color-danger) !important;
Expand Down Expand Up @@ -71,7 +73,7 @@ export class UUITextareaElement extends FormControlMixin(LitElement) {
box-sizing: border-box;
min-width: 100%;
max-width: 100%;
font-size: var(--uui-size-5);
font-size: var(--textarea-font-size);
padding: var(--uui-size-2);
border: 1px solid
var(--uui-textarea-border-color, var(--uui-color-border));
Expand Down Expand Up @@ -319,8 +321,8 @@ export class UUITextareaElement extends FormControlMixin(LitElement) {
return html`
<textarea
id="textarea"
.rows=${this.rows}
.cols=${this.cols}
rows=${ifDefined(this.rows)}
cols=${ifDefined(this.cols)}
.value=${this.value as string}
.name=${this.name}
wrap=${ifDefined(this.wrap)}
Expand Down

0 comments on commit 16530b3

Please sign in to comment.