From 079e289260bfdf0ac8804f43b09f0c14c5338f5d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 26 Apr 2022 17:31:26 +0300 Subject: improvements and cleanup to input components --- src/components/post_status_form/post_status_form.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index a967d3a3..62613bd1 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -394,7 +394,6 @@ border-radius: var(--tooltipRadius, $fallback--tooltipRadius); padding: 0.5em; margin: 0; - line-height: 1.4em; } .text-format { @@ -503,17 +502,19 @@ display: flex; flex-direction: column; padding: 0.25em 0.5em 0.5em; - line-height: 1.85em; + line-height: 1.85; } .form-post-body { - box-sizing: content-box; + // TODO: make a resizable textarea component? + box-sizing: content-box; // needed for easier computation of dynamic size overflow: hidden; transition: min-height 200ms 100ms; - padding-bottom: calc(var(--padding) + 1.2em); - // Because we changed box-sizing original height values are no longer correct - height: 1.2em; - min-height: 1.2em; + // stock padding + 1 line of text (for counter) + padding-bottom: calc(var(--_padding) + var(--post-line-height) * 1em); + // two lines of text + height: calc(var(--post-line-height) * 1em); + min-height: calc(var(--post-line-height) * 1em); resize: none; &.scrollable-form { -- cgit v1.2.3-70-g09d2