fix: scale textarea line-height and add CSS variable default

Address review feedback on the FE-799 fix:

- WidgetTextarea now adds leading-normal so the textarea's line-height
  scales (unitless 1.5) with the configured font-size. Without it the
  inherited text-sm line-height of 1.25rem clipped multiline text at
  the larger end of the 8-24px range.
- Initialize --comfy-textarea-font-size to its default 10px on :root in
  the design-system stylesheet so isolated renders (Storybook, etc.)
  that do not run GraphView's watchEffect still get the documented
  default instead of an unset variable.
This commit is contained in:
Glary-Bot
2026-05-20 20:02:11 +00:00
parent 4295f16da1
commit 7887084dd2
2 changed files with 2 additions and 1 deletions

View File

@@ -120,6 +120,7 @@
--comfy-topbar-height: 2.5rem;
--workflow-tabs-height: 2.375rem;
--comfy-input-bg: #222;
--comfy-textarea-font-size: 10px;
--input-text: #ddd;
--descrip-text: #999;
--drag-text: #ccc;

View File

@@ -22,7 +22,7 @@
:class="
cn(
WidgetInputBaseClass,
'size-full resize-none text-(length:--comfy-textarea-font-size)',
'size-full resize-none text-(length:--comfy-textarea-font-size) leading-normal',
!hideLayoutField && 'pt-5',
// Avoid overflow-auto when idle to prevent per-textarea compositing layers.
'overflow-hidden hover:overflow-auto focus:overflow-auto'