Skip to content

Commit 16d6b2c

Browse files
authored
Merge pull request #7754 from IgniteUI/simeonoff/fix-7752-10.0.x
fix(input-group): textarea has incorrect line-height
2 parents 7535a21 + 87ee4f1 commit 16d6b2c

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -961,12 +961,22 @@
961961
}
962962

963963
%form-group-textarea {
964-
min-height: rem(82px, map-get($base-scale-size, 'comfortable')); /* 3 lines * 22px + 8px bottom padding + 8px top padding */
965-
margin-#{$right}: -#{rem(16px, map-get($base-scale-size, 'comfortable'))}; /* this fixes resizing in chrome !?!? */
966-
line-height: normal !important; /* resets typography styles */
964+
// 3 lines * 22px + 8px bottom padding + 8px top padding
965+
min-height: rem(82px, map-get($base-scale-size, 'comfortable'));
966+
967+
// this fixes resizing in chrome !?!?
968+
margin-#{$right}: -#{rem(16px, map-get($base-scale-size, 'comfortable'))};
969+
967970
height: auto;
968971
resize: vertical;
969972
overflow: hidden;
973+
974+
// resets typography styles
975+
line-height: normal !important;
976+
977+
&:not([type='*']) {
978+
line-height: normal !important; /* resets typography styles */
979+
}
970980
}
971981

972982
%form-group-textarea--cosy {

src/app/input/input.sample.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ <h4 class="form-title igx-typography__overline">Personal Info</h4>
1919
<label igxLabel for="lastName">Last Name</label>
2020
</igx-input-group>
2121

22+
<igx-input-group>
23+
<input igxInput name="dateOfBirth" type="date" [(ngModel)]="user.dateOfBirth" required />
24+
<label igxLabel for="dateOfBirth">Date of Birth</label>
25+
</igx-input-group>
26+
2227
<igx-input-group>
2328
<input igxInput name="password" type="password" placeholder="{{placeholder}}" [(ngModel)]="user.password" required/>
2429
<label igxLabel for="password">Password</label>

src/app/input/input.sample.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export class InputSampleComponent {
1515
lastName: 'Doe',
1616
password: '1337s3cr3t',
1717
registered: false,
18-
subscribed: false
18+
subscribed: false,
19+
dateOfBirth: new Date('07 July, 1987')
1920
};
2021

2122
user2 = {
@@ -25,9 +26,11 @@ export class InputSampleComponent {
2526
lastName: 'Doe',
2627
password: '1337s3cr3t',
2728
registered: true,
28-
subscribed: false
29+
subscribed: false,
30+
dateOfBirth: new Date('01 July, 1954')
2931
};
3032

33+
3134
settings = [{
3235
name: 'WiFi',
3336
icon: 'wifi',

0 commit comments

Comments
 (0)