Skip to content

Commit

Permalink
fix(label): make all ion-labels stacked or floating stretch
Browse files Browse the repository at this point in the history
closes #6134
  • Loading branch information
brandyscarney committed May 19, 2016
1 parent 2b836a9 commit b742e1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/components/input/test/stacked-labels/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
<ion-input value="http://url5.com/" type="url"></ion-input>
</ion-item>

<ion-item>
<ion-label stacked>Stacked Label</ion-label>
<ion-label>Double Label</ion-label>
</ion-item>

<ion-item>
<ion-label stacked>Label 6</ion-label>
<ion-select [(ngModel)]="gender">
Expand Down
11 changes: 7 additions & 4 deletions src/components/label/label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,19 @@ ion-label[fixed] {
max-width: 200px;
}

ion-label[stacked],
ion-label[floating] {
.item-label-stacked ion-label,
.item-label-floating ion-label {
align-self: stretch;

margin-bottom: 0;

width: auto;
max-width: 100%;
}

ion-label[stacked],
ion-label[floating] {
margin-bottom: 0;
}

.item-label-stacked .input-wrapper,
.item-label-floating .input-wrapper {
flex: 1;
Expand Down

0 comments on commit b742e1f

Please sign in to comment.