Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(textarea): zero wrapper padding with longhands so the grip sits flush (#4813)

Ernest077087f68d5e
diff --git a/.changeset/textarea-flush-wrapper-padding.md b/.changeset/textarea-flush-wrapper-padding.md
new file mode 100644
index 0000000000..6564228284
--- /dev/null
+++ b/.changeset/textarea-flush-wrapper-padding.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/core': patch
+---
+
+[fix] TextArea: remove the duplicate wrapper padding so the text and native resize grip sit flush to the edge. The wrapper's `padding: 0` shorthand was being overridden by the shared input-wrapper longhands, leaving the inset applied twice; it now zeroes with matching longhands.
+
+@ernestt
diff --git a/packages/core/src/TextArea/TextArea.tsx b/packages/core/src/TextArea/TextArea.tsx
index 4aadedc5d5..87fdcd5b96 100644
--- a/packages/core/src/TextArea/TextArea.tsx
+++ b/packages/core/src/TextArea/TextArea.tsx
@@ -66,7 +66,14 @@ const styles = stylex.create({
wrapper: {
zIndex: 1,
display: 'block',
- padding: 0,
+ // Zero the shared wrapper inset with matching longhands, not the `padding`
+ // shorthand: StyleX ranks longhands above shorthands regardless of merge
+ // order, so a `padding: 0` shorthand loses to the base's
+ // paddingBlock/paddingInline. The wrapper would keep a duplicate inset that
+ // the <textarea>'s own padding then doubles — insetting the text and
+ // pushing the native resize grip in from the corner.
+ paddingBlock: 0,
+ paddingInline: 0,
// Internal inline padding for the textarea's text. Defined on the wrapper
// so the counter (a sibling overlay) inherits the same value and stays
// aligned with the text edge. Kept as an internal var so it can later be