diff --git a/dist/css/ionic-ios7.css b/dist/css/ionic-ios7.css index 5e9217defa..fb004fad8a 100644 --- a/dist/css/ionic-ios7.css +++ b/dist/css/ionic-ios7.css @@ -182,7 +182,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid silver; } + border: 1px solid #c0c0c0; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -1445,49 +1445,67 @@ textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } .item-input { - position: relative; + display: -webkit-box; display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + -moz-align-items: center; + align-items: center; + position: relative; overflow: hidden; padding: 6px 8px 5px; } .item-input input { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; + -webkit-box-flex: 1; + -webkit-flex: 1 0 220px; + -moz-box-flex: 1; + -moz-flex: 1 0 220px; + -ms-flex: 1 0 220px; + flex: 1 0 220px; margin: 0; background-color: transparent; - flex: 1 0 220px; -webkit-appearance: none; } .item-input .input-label { + -webkit-box-flex: 1; + -webkit-flex: 1 0 100px; + -moz-box-flex: 1; + -moz-flex: 1 0 100px; + -ms-flex: 1 0 100px; + flex: 1 0 100px; padding: 7px 10px 7px 3px; max-width: 200px; color: black; - font-weight: bold; - flex: 1 0 100px; } + font-weight: bold; } .item-input [class^="icon-"], .item-input [class*=" icon-"] { + -webkit-box-flex: 0; + -webkit-flex: 0 0 24px; + -moz-box-flex: 0; + -moz-flex: 0 0 24px; + -ms-flex: 0 0 24px; + flex: 0 0 24px; display: inline-block; text-align: center; - font-size: 16px; - flex: 0 0 24px; - align-self: center; } + font-size: 16px; } .item-input .placeholder-icon { color: #999; } -.list.stacked-label, -.list.stacked-label .item-input { +.item-stacked-label { display: block; background-color: transparent; box-shadow: none; } - .list.stacked-label .input-label, .list.stacked-label [class^="icon-"], .list.stacked-label [class*=" icon-"], - .list.stacked-label .item-input .input-label, - .list.stacked-label .item-input [class^="icon-"], - .list.stacked-label .item-input [class*=" icon-"] { + .item-stacked-label .input-label, .item-stacked-label [class^="icon-"], .item-stacked-label [class*=" icon-"] { display: inline-block; padding: 4px 0; vertical-align: middle; } -.list.stacked-label input, -.list.stacked-label textarea { +.item-stacked-label input, +.item-stacked-label textarea { -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; @@ -1497,7 +1515,7 @@ textarea { background-color: white; box-shadow: inset 0 0 1px #666666; } -.list.stacked-label input { +.item-stacked-label input { height: 46px; } select, @@ -1638,7 +1656,7 @@ input[type="checkbox"][readonly] { right: 20px; transition: 0.2s ease; transition-property: left, right; - transition-delay: 0s, 0.05s; } + transition-delay: 0s, .05s; } .toggle :checked + .track { /* When the toggle is "on" */ @@ -1653,7 +1671,7 @@ input[type="checkbox"][readonly] { right: 0; left: 20px; -webkit-transform: none; - transition-delay: 0.05s, 0s; } + transition-delay: .05s, 0s; } .item-radio .item-content { /* give some room to the right for the checkmark icon */ @@ -1923,7 +1941,7 @@ input[type="range"] { .button.button-icon:active, .button.button-icon.active { background: none; box-shadow: none; - text-shadow: 0px 0px 10px white; } + text-shadow: 0px 0px 10px #fff; } .button.block, .button.button-full { margin-top: 10px; margin-bottom: 10px; } @@ -2262,9 +2280,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .icon-loading:before { content: "\e144"; } @@ -2277,9 +2295,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .icon-refreshing:before { content: "\e144"; } diff --git a/dist/css/ionic-scoped.css b/dist/css/ionic-scoped.css index c114073a7b..07cfc60756 100644 --- a/dist/css/ionic-scoped.css +++ b/dist/css/ionic-scoped.css @@ -1027,7 +1027,7 @@ .ionic fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid silver; } + border: 1px solid #c0c0c0; } .ionic legend { padding: 0; /* 2 */ @@ -2118,47 +2118,65 @@ .ionic textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } .ionic .item-input { - position: relative; + display: -webkit-box; display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + -moz-align-items: center; + align-items: center; + position: relative; overflow: hidden; padding: 6px 8px 5px; } .ionic .item-input input { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; + -webkit-box-flex: 1; + -webkit-flex: 1 0 220px; + -moz-box-flex: 1; + -moz-flex: 1 0 220px; + -ms-flex: 1 0 220px; + flex: 1 0 220px; margin: 0; background-color: transparent; - flex: 1 0 220px; -webkit-appearance: none; } .ionic .item-input .input-label { + -webkit-box-flex: 1; + -webkit-flex: 1 0 100px; + -moz-box-flex: 1; + -moz-flex: 1 0 100px; + -ms-flex: 1 0 100px; + flex: 1 0 100px; padding: 7px 10px 7px 3px; max-width: 200px; color: black; - font-weight: bold; - flex: 1 0 100px; } + font-weight: bold; } .ionic .item-input [class^="icon-"], .ionic .item-input [class*=" icon-"] { + -webkit-box-flex: 0; + -webkit-flex: 0 0 24px; + -moz-box-flex: 0; + -moz-flex: 0 0 24px; + -ms-flex: 0 0 24px; + flex: 0 0 24px; display: inline-block; text-align: center; - font-size: 16px; - flex: 0 0 24px; - align-self: center; } + font-size: 16px; } .ionic .item-input .placeholder-icon { color: #999; } - .ionic .list.stacked-label, - .ionic .list.stacked-label .item-input { + .ionic .item-stacked-label { display: block; background-color: transparent; box-shadow: none; } - .ionic .list.stacked-label .input-label, .ionic .list.stacked-label [class^="icon-"], .ionic .list.stacked-label [class*=" icon-"], - .ionic .list.stacked-label .item-input .input-label, - .ionic .list.stacked-label .item-input [class^="icon-"], - .ionic .list.stacked-label .item-input [class*=" icon-"] { + .ionic .item-stacked-label .input-label, .ionic .item-stacked-label [class^="icon-"], .ionic .item-stacked-label [class*=" icon-"] { display: inline-block; padding: 4px 0; vertical-align: middle; } - .ionic .list.stacked-label input, - .ionic .list.stacked-label textarea { + .ionic .item-stacked-label input, + .ionic .item-stacked-label textarea { -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; @@ -2167,7 +2185,7 @@ border: none; background-color: white; box-shadow: inset 0 0 1px #666666; } - .ionic .list.stacked-label input { + .ionic .item-stacked-label input { height: 46px; } .ionic select, .ionic textarea, @@ -2277,7 +2295,7 @@ border-radius: 50%; background: white; content: ' '; - transition: background-color 0.1s ease-in-out; } + transition: background-color .1s ease-in-out; } .ionic .checkbox input:after { position: absolute; top: 34%; @@ -2290,7 +2308,7 @@ border-right: 0; content: ' '; opacity: 0; - transition: opacity 0.05s ease-in-out; + transition: opacity .05s ease-in-out; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); } .ionic .checkbox input:checked:before { @@ -2628,7 +2646,7 @@ .ionic .button.button-icon:active, .ionic .button.button-icon.active { background: none; box-shadow: none; - text-shadow: 0px 0px 10px white; } + text-shadow: 0px 0px 10px #fff; } .ionic .button.block, .ionic .button.button-full { margin-top: 10px; margin-bottom: 10px; } @@ -2877,9 +2895,9 @@ line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .ionic .icon-loading:before { content: "\e144"; } .ionic .icon-refreshing { @@ -2891,9 +2909,9 @@ line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .ionic .icon-refreshing:before { content: "\e144"; } .ionic .hidden, diff --git a/dist/css/ionic.css b/dist/css/ionic.css index 789b348c97..d27f43f4b2 100644 --- a/dist/css/ionic.css +++ b/dist/css/ionic.css @@ -1261,7 +1261,7 @@ sub { fieldset { margin: 0 2px; padding: 0.35em 0.625em 0.75em; - border: 1px solid silver; } + border: 1px solid #c0c0c0; } /** * 1. Correct `color` not being inherited in IE 8/9. @@ -2588,49 +2588,67 @@ textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } .item-input { - position: relative; + display: -webkit-box; display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; display: flex; + -webkit-box-align: center; + -ms-flex-align: center; + -webkit-align-items: center; + -moz-align-items: center; + align-items: center; + position: relative; overflow: hidden; padding: 6px 8px 5px; } .item-input input { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; + -webkit-box-flex: 1; + -webkit-flex: 1 0 220px; + -moz-box-flex: 1; + -moz-flex: 1 0 220px; + -ms-flex: 1 0 220px; + flex: 1 0 220px; margin: 0; background-color: transparent; - flex: 1 0 220px; -webkit-appearance: none; } .item-input .input-label { + -webkit-box-flex: 1; + -webkit-flex: 1 0 100px; + -moz-box-flex: 1; + -moz-flex: 1 0 100px; + -ms-flex: 1 0 100px; + flex: 1 0 100px; padding: 7px 10px 7px 3px; max-width: 200px; color: black; - font-weight: bold; - flex: 1 0 100px; } + font-weight: bold; } .item-input [class^="icon-"], .item-input [class*=" icon-"] { + -webkit-box-flex: 0; + -webkit-flex: 0 0 24px; + -moz-box-flex: 0; + -moz-flex: 0 0 24px; + -ms-flex: 0 0 24px; + flex: 0 0 24px; display: inline-block; text-align: center; - font-size: 16px; - flex: 0 0 24px; - align-self: center; } + font-size: 16px; } .item-input .placeholder-icon { color: #999; } -.list.stacked-label, -.list.stacked-label .item-input { +.item-stacked-label { display: block; background-color: transparent; box-shadow: none; } - .list.stacked-label .input-label, .list.stacked-label [class^="icon-"], .list.stacked-label [class*=" icon-"], - .list.stacked-label .item-input .input-label, - .list.stacked-label .item-input [class^="icon-"], - .list.stacked-label .item-input [class*=" icon-"] { + .item-stacked-label .input-label, .item-stacked-label [class^="icon-"], .item-stacked-label [class*=" icon-"] { display: inline-block; padding: 4px 0; vertical-align: middle; } -.list.stacked-label input, -.list.stacked-label textarea { +.item-stacked-label input, +.item-stacked-label textarea { -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; @@ -2640,7 +2658,7 @@ textarea { background-color: white; box-shadow: inset 0 0 1px #666666; } -.list.stacked-label input { +.item-stacked-label input { height: 46px; } select, @@ -2764,7 +2782,7 @@ input[type="checkbox"][readonly] { border-radius: 50%; background: white; content: ' '; - transition: background-color 0.1s ease-in-out; } + transition: background-color .1s ease-in-out; } /* the checkmark within the box */ .checkbox input:after { @@ -2779,7 +2797,7 @@ input[type="checkbox"][readonly] { border-right: 0; content: ' '; opacity: 0; - transition: opacity 0.05s ease-in-out; + transition: opacity .05s ease-in-out; -webkit-transform: rotate(-45deg); transform: rotate(-45deg); } @@ -3144,7 +3162,7 @@ input[type="range"] { .button.button-icon:active, .button.button-icon.active { background: none; box-shadow: none; - text-shadow: 0px 0px 10px white; } + text-shadow: 0px 0px 10px #fff; } .button.block, .button.button-full { margin-top: 10px; margin-bottom: 10px; } @@ -3534,9 +3552,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .icon-loading:before { content: "\e144"; } @@ -3549,9 +3567,9 @@ a.button { line-height: 1; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - -webkit-animation: spin 0.75s linear infinite; - -moz-animation: spin 0.75s linear infinite; - animation: spin 0.75s linear infinite; } + -webkit-animation: spin .75s linear infinite; + -moz-animation: spin .75s linear infinite; + animation: spin .75s linear infinite; } .icon-refreshing:before { content: "\e144"; } diff --git a/scss/ionic/_form.scss b/scss/ionic/_form.scss index 8280b56808..2c12a5e8fb 100644 --- a/scss/ionic/_form.scss +++ b/scss/ionic/_form.scss @@ -46,41 +46,39 @@ textarea { // ------------------------------- .item-input { + @include display-flex(); + @include align-items(center); position: relative; - display: -webkit-flex; - display: flex; overflow: hidden; padding: 6px 8px 5px; input { @include border-radius(0); + @include flex(1, 0, 220px); margin: 0; background-color: transparent; - flex: 1 0 220px; -webkit-appearance: none; } .input-label { + @include flex(1, 0, 100px); padding: 7px 10px 7px 3px; max-width: 200px; color: $input-label-color; font-weight: bold; - flex: 1 0 100px; } [class^="icon-"], [class*=" icon-"] { + @include flex(0, 0, 24px); display: inline-block; text-align: center; font-size: 16px; - flex: 0 0 24px; - align-self: center; } .placeholder-icon { color: #999; } } -.list.stacked-label, -.list.stacked-label .item-input { +.item-stacked-label { display: block; background-color: transparent; box-shadow: none; @@ -92,8 +90,8 @@ textarea { } } -.list.stacked-label input, -.list.stacked-label textarea +.item-stacked-label input, +.item-stacked-label textarea { @include border-radius(2px); overflow: hidden; @@ -102,7 +100,7 @@ textarea { background-color: $input-bg; box-shadow: $item-box-shadow; } -.list.stacked-label input { +.item-stacked-label input { height: $line-height-computed + $font-size-base + 12px; } diff --git a/scss/ionic/_mixins.scss b/scss/ionic/_mixins.scss index 60306fb3bb..d44348716d 100644 --- a/scss/ionic/_mixins.scss +++ b/scss/ionic/_mixins.scss @@ -438,6 +438,15 @@ flex-wrap: $value; } +@mixin flex($fg: 1, $fs: null, $fb: null) { + -webkit-box-flex: $fg; + -webkit-flex: $fg $fs $fb; + -moz-box-flex: $fg; + -moz-flex: $fg $fs $fb; + -ms-flex: $fg $fs $fb; + flex: $fg $fs $fb; +} + @mixin flex-flow($values: (row nowrap)) { // No Webkit Box fallback. -webkit-flex-flow: $values; diff --git a/test/input-text.html b/test/input-text.html index 34ffd89ee8..0fe1a20275 100644 --- a/test/input-text.html +++ b/test/input-text.html @@ -15,259 +15,250 @@