From 657b3c04c5fe5b5806d1133752d55e4289419617 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Tue, 2 Dec 2025 15:19:16 -0600 Subject: [PATCH] Account for input padding on autoresize pseudo-element --- app/assets/stylesheets/autoresize.css | 3 ++- app/assets/stylesheets/cards.css | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/autoresize.css b/app/assets/stylesheets/autoresize.css index ac16e04a4..b3d2323ed 100644 --- a/app/assets/stylesheets/autoresize.css +++ b/app/assets/stylesheets/autoresize.css @@ -3,7 +3,7 @@ .autoresize__wrapper { display: grid !important; position: relative; - + > *, &::after { grid-area: 1 / 1 / 2 / 2; } @@ -12,6 +12,7 @@ content: attr(data-autoresize-clone-value) " "; font: inherit; line-height: inherit; + padding-block: var(--autosize-block-padding, 0); visibility: hidden; white-space: pre-wrap; } diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index df9edbf86..9fe9c6601 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -143,6 +143,7 @@ } .card__title { + --autosize-block-padding: 0 0.5ch; --input-border-radius: 0; --input-color: var(--card-content-color); --lines: 3; @@ -155,7 +156,7 @@ .card-field__title { overflow: hidden; /* prevent scrolling on windows */ - padding-block-end: 0.5ch; + padding-block: var(--autosize-block-padding); &:is(textarea)::placeholder { color: inherit;