Skip to content

Commit 631cea2

Browse files
committed
Adding variable for padding and border
1 parent f205099 commit 631cea2

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@
5454
--padding-start: #{globals.$ion-space-500};
5555
}
5656

57-
// When the rows attribute is set, the conatiner of the textarea should
57+
// When the rows attribute is set, the container of the textarea should
5858
// should increase in height to accommodate the number of rows.
5959
// The min-height should accomodate the number of rows, plus a little extra
60-
// so that the next line is partially visible. The extra 12px is to account for
61-
// bottom padding outside the textarea.
62-
// The --ideal-rows-number is used in the ODC studio, as it misses the ability
63-
// to get the rows number from the attribute, as it is done in runtime.
60+
// so that the next line is partially visible. To that we add the amount of
61+
// the bottom padding and the border width outside the textarea.
62+
// If --host-rows is set, then it will be used, otherwise the data-attr-rows
63+
// attribute will be used.
6464
.textarea-wrapper-inner[data-attr-rows] {
65-
--rows-number: attr(data-attr-rows number);
66-
min-height: calc(var(--ide-rows-number, var(--rows-number)) * 1.2em + 1.5em + 12px);
65+
--number-rows: var(--host-rows, attr(data-attr-rows number));
66+
min-height: calc(var(--number-rows) * 1.2em + 1.5em + var(--padding-bottom, 0px) + var(--border-width, 0px));
6767
}
6868

6969
// Ionic Textarea Shapes

0 commit comments

Comments
 (0)