chore(textarea): moving ios+md specific margin to native file#30984
chore(textarea): moving ios+md specific margin to native file#30984rugoncalves merged 10 commits intonextfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR fixes a visual misalignment in the Ionic Textarea component when the label-placement is set to stacked. The textarea.common.scss defines an 8px top margin on the textarea element to prevent it from overlapping the label in the MD/iOS themes. However, the Ionic theme already handles the spacing through other means (the .textarea-wrapper gap), so this margin causes a content misalignment. The fix overrides that margin to 0 exclusively for the Ionic theme's stacked label placement.
Changes:
- Adds a CSS override in
textarea.ionic.scssto remove the inherited8pxtop margin on the textarea and theauto-growpseudo-element mirror when the label placement isstacked. - Updates visual regression snapshot baselines across multiple test suites (
states,size,shape,highlight,fill) to reflect the corrected layout.
Reviewed changes
Copilot reviewed 1 out of 61 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
core/src/components/textarea/textarea.ionic.scss |
Adds margin override for stacked label placement in the Ionic theme |
*.e2e.ts-snapshots/*.png (multiple files) |
Updated visual regression baseline snapshots reflecting the corrected alignment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Rather than overriding the margin here, we should move the rule that sets the margin out of textarea.common.scss and into textarea.native.scss:
ionic-framework/core/src/components/textarea/textarea.common.scss
Lines 509 to 518 in 55c506d
There was a problem hiding this comment.
Thank you for the highlighting a more elegant solution. I've changed the PR title and body.
Issue number: resolves internal
What is the current behavior?
The Ionic Textarea component, has a margin to avoid the textarea element to overlap the label when the label placement is stacked. However, as the ionic theme already has other styles that safeguard the label, this margin, is causing a misalignment of the content:

What is the new behavior?
textarea.native.scssfile that is inherited by both ios and md themes, leaving ionic theme unaffected.Does this introduce a breaking change?
Other information