Skip to content

Commit

Permalink
refactor(label): move label css to the correct scss files
Browse files Browse the repository at this point in the history
references #5651
  • Loading branch information
brandyscarney committed Feb 29, 2016
1 parent 0480fa3 commit 4c93eb0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 41 deletions.
35 changes: 14 additions & 21 deletions ionic/components/card/test/list/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,20 @@
Card List
</ion-list-header>

<ion-item>
<ion-icon name="wifi" item-left></ion-icon>
<ion-label>Wifi</ion-label>
<ion-toggle></ion-toggle>
</ion-item>

<ion-item>
<ion-icon name="heart" item-left></ion-icon>
Affection
<ion-note item-right>
Very Little
</ion-note>
</ion-item>

<ion-item>
<ion-icon name="home" item-left></ion-icon>
Home
<ion-note item-right>
Where the heart is
</ion-note>
</ion-item>
<button ion-item>
<ion-icon name="cart" item-left></ion-icon>
Shopping
</button>

<button ion-item>
<ion-icon name="medical" item-left></ion-icon>
Hospital
</button>

<button ion-item>
<ion-icon name="paw" item-left></ion-icon>
Dog Park
</button>

</ion-list>

Expand Down
5 changes: 0 additions & 5 deletions ionic/components/item/item.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ ion-icon[item-right] {
padding: 0 1px;
}

[text-wrap] ion-label {
font-size: $item-md-body-text-font-size;
line-height: $item-md-body-text-line-height;
}

ion-icon[item-left] + .item-inner,
ion-icon[item-left] + .item-input {
margin-left: $item-md-padding-left + ($item-md-padding-left / 2);
Expand Down
12 changes: 0 additions & 12 deletions ionic/components/item/item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ ion-item-divider {
}
}

ion-label {
margin: 0;
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

[text-wrap] ion-label {
white-space: normal;
}

[vertical-align-top],
ion-input.item {
align-items: flex-start;
Expand Down
3 changes: 2 additions & 1 deletion ionic/components/label/label.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@
// --------------------------------------------------

$label-ios-text-color: #7f7f7f !default;
$label-ios-margin: $item-ios-padding-top ($item-ios-padding-right / 2) $item-ios-padding-bottom 0 !default;


// iOS Default Label
// --------------------------------------------------

ion-label {
margin: $item-ios-padding-top ($item-ios-padding-right / 2) $item-ios-padding-bottom 0;
margin: $label-ios-margin;
}


Expand Down
7 changes: 6 additions & 1 deletion ionic/components/label/label.md.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@

$label-md-text-color: #999 !default;
$label-md-text-color-focused: map-get($colors-md, primary) !default;
$label-md-margin: $item-md-padding-top ($item-md-padding-right / 2) $item-md-padding-bottom 0 !default;


// Material Design Default Label
// --------------------------------------------------

ion-label {
margin: $item-md-padding-top ($item-md-padding-right / 2) $item-md-padding-bottom 0;
margin: $label-md-margin;
}

[text-wrap] ion-label {
font-size: $item-md-body-text-font-size;
line-height: $item-md-body-text-line-height;
}

// Material Design Default Label Inside An Input Item
// --------------------------------------------------
Expand Down
9 changes: 8 additions & 1 deletion ionic/components/label/label.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@ ion-label {
display: block;
font-size: inherit;
white-space: nowrap;
margin: 0;
flex: 1;
text-overflow: ellipsis;
overflow: hidden;
}


.item-input ion-label {
max-width: 200px;
flex: initial;
pointer-events: none;
}

[text-wrap] ion-label {
white-space: normal;
}


// Stacked & Floating Inputs
// --------------------------------------------------
Expand Down

0 comments on commit 4c93eb0

Please sign in to comment.