Skip to content

Commit b742e1f

Browse files
committed
fix(label): make all ion-labels stacked or floating stretch
closes #6134
1 parent 2b836a9 commit b742e1f

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/components/input/test/stacked-labels/main.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
<ion-input value="http://url5.com/" type="url"></ion-input>
3636
</ion-item>
3737

38+
<ion-item>
39+
<ion-label stacked>Stacked Label</ion-label>
40+
<ion-label>Double Label</ion-label>
41+
</ion-item>
42+
3843
<ion-item>
3944
<ion-label stacked>Label 6</ion-label>
4045
<ion-select [(ngModel)]="gender">

src/components/label/label.scss

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,19 @@ ion-label[fixed] {
4040
max-width: 200px;
4141
}
4242

43-
ion-label[stacked],
44-
ion-label[floating] {
43+
.item-label-stacked ion-label,
44+
.item-label-floating ion-label {
4545
align-self: stretch;
4646

47-
margin-bottom: 0;
48-
4947
width: auto;
5048
max-width: 100%;
5149
}
5250

51+
ion-label[stacked],
52+
ion-label[floating] {
53+
margin-bottom: 0;
54+
}
55+
5356
.item-label-stacked .input-wrapper,
5457
.item-label-floating .input-wrapper {
5558
flex: 1;

0 commit comments

Comments
 (0)