Skip to content

Commit 417c219

Browse files
committed
Changing the paddings
1 parent 99a8725 commit 417c219

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

core/src/components/textarea/textarea.ionic.scss

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,24 @@
102102
}
103103

104104
.textarea-wrapper-inner {
105-
@include globals.padding(var(--padding-top), var(--padding-end), var(--padding-bottom), var(--padding-start));
105+
@include globals.padding(0, var(--padding-end), 0, var(--padding-start));
106+
}
107+
108+
/**
109+
* Top and bottom padding are on the textarea so that when scrolling,
110+
* text can scroll behind the outline borders. When at rest at top or bottom,
111+
* the text is not glued to the outline lines.
112+
*/
113+
.textarea-wrapper-inner .native-textarea {
114+
padding-top: var(--padding-top);
115+
padding-bottom: var(--padding-bottom);
106116
}
107117

108118
// Textarea Auto Grow
109119
// ----------------------------------------------------------------
110120

111-
// In the Ionic theme, padding is on textarea-wrapper-inner, not on the textarea.
112-
// The ::after padding from common.scss duplicates this and causes ~3 extra lines
113-
// of blank space. Remove it so the auto-grow height matches the content.
114-
:host([auto-grow]:not([auto-grow="false"])) .native-wrapper::after {
115-
margin-top: 0;
116-
padding-top: 0;
117-
padding-bottom: 0;
118-
}
121+
// In the Ionic theme, padding is on the textarea. The ::after in common.scss
122+
// has matching padding so the auto-grow height calculation is correct.
119123

120124
// The height should be auto only when auto-grow is enabled.
121125
// If rows is not set, the height should be auto.

0 commit comments

Comments
 (0)