Skip to content

Commit

Permalink
feat(windows): add label Sass file
Browse files Browse the repository at this point in the history
references #5565
  • Loading branch information
brandyscarney committed Feb 24, 2016
1 parent f8ef960 commit 8a1e450
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 1 deletion.
1 change: 1 addition & 0 deletions ionic/components.wp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"components/content/content.wp",
"components/input/input.wp",
"components/item/item.wp",
"components/label/label.wp",
"components/list/list.wp",
"components/menu/menu.wp",
"components/modal/modal.wp",
Expand Down
66 changes: 66 additions & 0 deletions ionic/components/label/label.wp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
@import "../../globals.wp";
@import "./label";

// Windows Label
// --------------------------------------------------

$label-wp-text-color: #999 !default;
$label-wp-text-color-focused: map-get($colors-wp, primary) !default;


// Windows Default Label
// --------------------------------------------------

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


// Windows Default Label Inside An Input Item
// --------------------------------------------------

.item-input ion-label {
color: $label-wp-text-color;
}


// Windows Stacked & Floating Labels
// --------------------------------------------------

ion-label[stacked] {
font-size: 1.2rem;
}

ion-label[floating] {
transform-origin: left top;
transform: translate3d(8px, 34px, 0);
transition: transform 150ms ease-in-out;
}

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

.input-has-focus ion-label[stacked],
.input-has-focus ion-label[floating] {
color: $label-wp-text-color-focused;
}

.input-has-focus ion-label[floating],
.input-has-value ion-label[floating] {
transform: translate3d(0, 0, 0) scale(0.8);
}


// Generate Windows Label colors
// --------------------------------------------------

@each $color-name, $color-value in $colors-wp {

ion-label[#{$color-name}] {
color: $color-value !important;
}

}
2 changes: 1 addition & 1 deletion ionic/components/select/select.wp.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "../../globals.wp";
@import "./select";

// Material Design Select
// Windows Select
// --------------------------------------------------

$select-wp-padding-top: ($item-wp-padding-top / 2) !default;
Expand Down

0 comments on commit 8a1e450

Please sign in to comment.