From b7703890111ca6e133e2472ecddda516787c3dcc Mon Sep 17 00:00:00 2001 From: milan Date: Thu, 12 Sep 2024 14:34:21 +0200 Subject: [PATCH] fix styling of et2-tabbox textarea to not cut off its box shadow when selected --- api/js/etemplate/Et2Textarea/Et2Textarea.ts | 38 ++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/api/js/etemplate/Et2Textarea/Et2Textarea.ts b/api/js/etemplate/Et2Textarea/Et2Textarea.ts index 1c4843442a..e7a10e3ac7 100644 --- a/api/js/etemplate/Et2Textarea/Et2Textarea.ts +++ b/api/js/etemplate/Et2Textarea/Et2Textarea.ts @@ -23,24 +23,30 @@ export class Et2Textarea extends Et2InputWidget(SlTextarea) ...shoelace, ...super.styles, css` - :host { - display: flex; - flex-direction: column; - width: 100%; - height: 100%; - } + :host { + display: flex; + flex-direction: column; + width: 100%; + height: 100%; + } - .textarea--resize-vertical { - height: 100%; - } - :host::part(form-control) { - height: 100%; - align-items: stretch !important; - } + .textarea--resize-vertical { + height: 100%; + } - :host::part(form-control-input), :host::part(textarea) { - height: 100%; - } + :host::part(form-control) { + height: 100%; + align-items: stretch !important; + } + + :host::part(form-control-input), :host::part(textarea) { + height: 100%; + } + + .form-control-input .textarea--standard.textarea--focused:not(.textarea--disabled){ + width: calc(100% - (2 * var(--sl-focus-ring-width))); + margin-left: var(--sl-focus-ring-width); + } `, ]; }