Skip to content

Commit 58158d5

Browse files
authored
refactor(input-group): update drag handle position inside textarea (#14106)
1 parent cfad709 commit 58158d5

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

projects/igniteui-angular/src/lib/core/styles/components/input/_input-group-component.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,14 @@
112112
}
113113
}
114114

115+
@include m(suffixed) {
116+
@extend %suffixed !optional;
117+
}
118+
115119
// Textarea modifier
116120
@include m(textarea-group) {
121+
@extend %textarea-group !optional;
122+
117123
@include e(bundle-main) {
118124
@extend %form-group-textarea-group-bundle-main !optional;
119125
}
@@ -127,6 +133,10 @@
127133
}
128134
}
129135

136+
@include mx(textarea-group, border) {
137+
@extend %textarea-group--outlined !optional;
138+
}
139+
130140
@include mx(textarea-group, focused) {
131141
@include e(label) {
132142
@extend %textarea-group-label--focused !optional;

projects/igniteui-angular/src/lib/core/styles/components/input/_input-group-theme.scss

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,26 @@
979979
will-change: font-size, color, transform;
980980
}
981981

982+
@if $variant == 'material' {
983+
%textarea-group:not(%suffixed) {
984+
%form-group-bundle-main {
985+
grid-area: 1 / 2 / span 1 / span 3;
986+
padding-inline-end: 0;
987+
}
988+
989+
textarea {
990+
padding-inline-end: rem(4px);
991+
width: calc(100% - #{rem(1px)});
992+
}
993+
}
994+
995+
%textarea-group--outlined:not(%suffixed) {
996+
textarea {
997+
width: calc(100% - #{rem(2px)});
998+
}
999+
}
1000+
}
1001+
9821002
%form-group-textarea-group-bundle {
9831003
// 3 lines * 22px + 8px bottom padding + 8px top padding
9841004
--textarea-size: #{sizable(
@@ -1191,6 +1211,7 @@
11911211

11921212
@if $material-theme {
11931213
padding: 0;
1214+
inset-block-start: rem(-3px);
11941215
}
11951216

11961217
// resets typography styles
@@ -1668,8 +1689,9 @@
16681689
}
16691690

16701691
%indigo-textarea {
1671-
padding-block: rem(8px);
1692+
padding-block: rem(10px);
16721693
padding-inline: pad-inline(rem(8px), rem(12px), rem(16px));
1694+
inset-block-end: rem(2px);
16731695
}
16741696

16751697
%fluent-textarea {

src/app/input-group/input-group.sample.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,19 @@
182182
<igx-hint>Textarea hint</igx-hint>
183183
</igx-input-group>
184184

185+
<!-- textarea -->
186+
<igx-input-group [displayDensity]="density" [type]="inputType">
187+
<label igxLabel>Textarea</label>
188+
<textarea
189+
name="inputTextareaTest"
190+
[required]="isRequired"
191+
igxInput
192+
[disabled]="isDisabled"
193+
[(ngModel)]="inputValue"
194+
></textarea>
195+
<igx-hint>Textarea hint</igx-hint>
196+
</igx-input-group>
197+
185198
<!-- required date field -->
186199
<igx-date-picker *ngIf="isRequired" #requiredDatePicker
187200
required

0 commit comments

Comments
 (0)