Skip to content

Commit 3f14d17

Browse files
authored
fix(input-group): transition label only when not filled (#14809)
* fix(input-group): transition label only when not filled * chore(input-group): remove commented out line
1 parent c5b0528 commit 3f14d17

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@
158158
}
159159

160160
@include mx(textarea-group, placeholder) {
161+
@extend %form-group-placeholder !optional;
162+
161163
@include e(notch) {
162164
@extend %textarea-group-notch--focused !optional;
163165
}
@@ -178,6 +180,8 @@
178180
}
179181

180182
@include mx(textarea-group, placeholder, border) {
183+
@extend %form-group-placeholder !optional;
184+
181185
@include e(notch) {
182186
@extend %textarea-group-notch--focused !optional;
183187
}
@@ -212,6 +216,8 @@
212216
}
213217

214218
@include m(placeholder) {
219+
@extend %form-group-placeholder !optional;
220+
215221
@include e(label) {
216222
@extend %form-group-label--float !optional;
217223
@extend %form-group-label--fixed !optional;
@@ -381,6 +387,8 @@
381387
}
382388

383389
@include mx(box, textarea-group, placeholder) {
390+
@extend %form-group-placeholder !optional;
391+
384392
@include e(notch) {
385393
@extend %form-group-notch--box-textarea !optional;
386394
}
@@ -460,6 +468,7 @@
460468

461469
@include mx(border, placeholder) {
462470
@extend %form-group-label--placeholder-border !optional;
471+
@extend %form-group-placeholder !optional;
463472

464473
@include e(label) {
465474
@extend %form-group-label--float-border !optional;
@@ -580,6 +589,8 @@
580589
}
581590

582591
@include mx(fluent, placeholder) {
592+
@extend %form-group-placeholder !optional;
593+
583594
@include e(label) {
584595
@extend %fluent-placeholder-label !optional;
585596
}

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,18 @@
462462
}
463463
}
464464

465+
%form-group-placeholder {
466+
%form-group-label {
467+
transition: none !important;
468+
}
469+
}
470+
471+
%form-group-display:not(%form-group-display--filled) {
472+
%form-group-label {
473+
transition: all $transition-timing;
474+
}
475+
}
476+
465477
%form-group-display--no-margin {
466478
margin-block-start: 0;
467479
}
@@ -883,7 +895,6 @@
883895
backface-visibility: hidden;
884896
will-change: transform;
885897
transform-origin: top left;
886-
transition: all $transition-timing;
887898
margin-inline-start: pad-inline(0, rem(-2px), rem(-4px));
888899
}
889900

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class InputGroupSampleComponent implements OnInit, AfterViewInit {
4848
public alignment: ButtonGroupAlignment = ButtonGroupAlignment.vertical;
4949

5050
public displayDensities: Selection[];
51-
public inputType: IgxInputGroupType = null;
51+
public inputType: IgxInputGroupType = 'box';
5252
public inputTypes: Selection[];
5353
public items: string[] = ['Orange', 'Apple', 'Banana', 'Mango'];
5454

0 commit comments

Comments
 (0)