From 8a1e4502642ac93203f735148cda8a54788b7239 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 24 Feb 2016 12:12:26 -0500 Subject: [PATCH] feat(windows): add label Sass file references #5565 --- ionic/components.wp.scss | 1 + ionic/components/label/label.wp.scss | 66 ++++++++++++++++++++++++++ ionic/components/select/select.wp.scss | 2 +- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 ionic/components/label/label.wp.scss diff --git a/ionic/components.wp.scss b/ionic/components.wp.scss index 198f59b651..da082ec57a 100644 --- a/ionic/components.wp.scss +++ b/ionic/components.wp.scss @@ -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", diff --git a/ionic/components/label/label.wp.scss b/ionic/components/label/label.wp.scss new file mode 100644 index 0000000000..66ef7c055d --- /dev/null +++ b/ionic/components/label/label.wp.scss @@ -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; + } + +} diff --git a/ionic/components/select/select.wp.scss b/ionic/components/select/select.wp.scss index 5c18d40b31..49890ae1a4 100644 --- a/ionic/components/select/select.wp.scss +++ b/ionic/components/select/select.wp.scss @@ -1,7 +1,7 @@ @import "../../globals.wp"; @import "./select"; -// Material Design Select +// Windows Select // -------------------------------------------------- $select-wp-padding-top: ($item-wp-padding-top / 2) !default;