diff --git a/.scss-lint.yml b/.scss-lint.yml index 8c8e46fe17..3d89107c33 100644 --- a/.scss-lint.yml +++ b/.scss-lint.yml @@ -1,8 +1,13 @@ # Default application configuration that all configurations inherit from. -# See https://github.com/brigade/scss-lint/blob/master/config/default.yml for config +# See config at https://github.com/brigade/scss-lint/blob/master/config/default.yml + +exclude: 'ionic/components/slides/**' linters: + MergeableSelector: + enabled: true + force_nesting: false PropertySortOrder: enabled: true @@ -20,6 +25,7 @@ linters: - left - z-index - display + - overflow - float - clear - @@ -146,7 +152,6 @@ linters: - cursor - empty-cells - opacity - - overflow - quotes - speak - table-layout @@ -166,6 +171,18 @@ linters: - transition-property - transition-timing-function + # This doesn't allow chaining between elements and attributes, ids or classes + # if we turn this on it breaks a lot of components + QualifyingElement: + enabled: false + allow_element_with_attribute: false + allow_element_with_class: false + allow_element_with_id: false + + SelectorFormat: + enabled: false + convention: hyphenated_lowercase # or 'strict_BEM', or 'hyphenated_BEM', or 'snake_case', or 'camel_case', or a regex pattern + StringQuotes: enabled: true style: double_quotes diff --git a/ionic/components/action-sheet/action-sheet.ios.scss b/ionic/components/action-sheet/action-sheet.ios.scss index 06a70e926a..975bda7126 100644 --- a/ionic/components/action-sheet/action-sheet.ios.scss +++ b/ionic/components/action-sheet/action-sheet.ios.scss @@ -54,12 +54,12 @@ ion-action-sheet { .action-sheet-title { padding: $action-sheet-ios-title-padding; - font-size: $action-sheet-ios-title-font-size; - color: $action-sheet-ios-title-color; - font-weight: $action-sheet-ios-title-font-weight; - border-radius: $action-sheet-ios-title-border-radius; - text-align: $action-sheet-ios-text-align; border-bottom: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-border-color; + border-radius: $action-sheet-ios-title-border-radius; + font-size: $action-sheet-ios-title-font-size; + font-weight: $action-sheet-ios-title-font-weight; + text-align: $action-sheet-ios-text-align; + color: $action-sheet-ios-title-color; } .action-sheet-button { @@ -76,9 +76,9 @@ ion-action-sheet { &.activated { margin-top: -$action-sheet-ios-button-border-width; - background: $action-sheet-ios-button-background-activated; - border-bottom-color: $action-sheet-ios-button-background-activated; border-top: $action-sheet-ios-button-border-width $action-sheet-ios-button-border-style $action-sheet-ios-button-background-activated; + border-bottom-color: $action-sheet-ios-button-background-activated; + background: $action-sheet-ios-button-background-activated; } } diff --git a/ionic/components/action-sheet/action-sheet.md.scss b/ionic/components/action-sheet/action-sheet.md.scss index c319695746..e7fe08f57b 100644 --- a/ionic/components/action-sheet/action-sheet.md.scss +++ b/ionic/components/action-sheet/action-sheet.md.scss @@ -29,19 +29,19 @@ $action-sheet-md-icon-margin: 0 28px 0 0 !default; .action-sheet-title { padding: $action-sheet-md-title-padding; font-size: $action-sheet-md-title-font-size; - color: $action-sheet-md-title-color; text-align: $action-sheet-md-text-align; + color: $action-sheet-md-title-color; } .action-sheet-button { position: relative; + overflow: hidden; padding: $action-sheet-md-button-padding; min-height: $action-sheet-md-button-min-height; font-size: $action-sheet-md-button-font-size; + text-align: $action-sheet-md-text-align; color: $action-sheet-md-button-text-color; background: $action-sheet-md-button-background; - text-align: $action-sheet-md-text-align; - overflow: hidden; &.activated { background: $action-sheet-md-button-background-activated; @@ -51,9 +51,9 @@ $action-sheet-md-icon-margin: 0 28px 0 0 !default; .action-sheet-icon { margin: $action-sheet-md-icon-margin; min-width: $action-sheet-md-icon-min-width; + font-size: $action-sheet-md-icon-font-size; text-align: $action-sheet-md-icon-text-align; vertical-align: $action-sheet-md-icon-vertical-align; - font-size: $action-sheet-md-icon-font-size; } .action-sheet-group { diff --git a/ionic/components/action-sheet/action-sheet.scss b/ionic/components/action-sheet/action-sheet.scss index a66fd66ad8..6e9eced96d 100644 --- a/ionic/components/action-sheet/action-sheet.scss +++ b/ionic/components/action-sheet/action-sheet.scss @@ -9,25 +9,24 @@ $action-sheet-max-width: 500px !default; ion-action-sheet { position: absolute; - width: $action-sheet-width; - height: $action-sheet-width; - z-index: $z-index-overlay; top: 0; left: 0; + z-index: $z-index-overlay; display: block; + width: $action-sheet-width; + height: $action-sheet-width; } .action-sheet-wrapper { position: absolute; - width: $action-sheet-width; - max-width: $action-sheet-max-width; - z-index: $z-index-overlay-wrapper; + right: 0; bottom: 0; left: 0; - right: 0; + z-index: $z-index-overlay-wrapper; display: block; margin: auto; - + width: $action-sheet-width; + max-width: $action-sheet-max-width; transform: translate3d(0, 100%, 0); } diff --git a/ionic/components/action-sheet/action-sheet.wp.scss b/ionic/components/action-sheet/action-sheet.wp.scss index a87bed9545..11bfc5f20f 100644 --- a/ionic/components/action-sheet/action-sheet.wp.scss +++ b/ionic/components/action-sheet/action-sheet.wp.scss @@ -5,17 +5,18 @@ // -------------------------------------------------- $action-sheet-wp-text-align: left !default; -$action-sheet-wp-background: #ffffff !default; -$action-sheet-wp-box-shadow: 0px -1px 0px rgba(0,0,0,0.2) !default; +$action-sheet-wp-background: #fff !default; +$action-sheet-wp-box-shadow-color: rgba(0, 0, 0, .2) !default; +$action-sheet-wp-box-shadow: 0 -1px 0 $action-sheet-wp-box-shadow-color !default; $action-sheet-wp-group-margin-bottom: 8px !default; $action-sheet-wp-title-padding: 19px 16px 17px !default; -$action-sheet-wp-title-font-size: 2.0rem !default; -$action-sheet-wp-title-color: #4D4D4D !default; +$action-sheet-wp-title-font-size: 2rem !default; +$action-sheet-wp-title-color: #4d4d4d !default; $action-sheet-wp-title-text-align: $action-sheet-wp-text-align !default; $action-sheet-wp-button-height: 4.8rem !default; -$action-sheet-wp-button-text-color: #4D4D4D !default; +$action-sheet-wp-button-text-color: #4d4d4d !default; $action-sheet-wp-button-font-size: 1.5rem !default; $action-sheet-wp-button-padding: 0 16px !default; $action-sheet-wp-button-text-align: $action-sheet-wp-text-align !default; @@ -36,17 +37,17 @@ $action-sheet-wp-icon-margin: 0 16px 0 0 !default; .action-sheet-title { padding: $action-sheet-wp-title-padding; font-size: $action-sheet-wp-title-font-size; - color: $action-sheet-wp-title-color; text-align: $action-sheet-wp-title-text-align; + color: $action-sheet-wp-title-color; } .action-sheet-button { padding: $action-sheet-wp-button-padding; min-height: $action-sheet-wp-button-height; font-size: $action-sheet-wp-button-font-size; + text-align: $action-sheet-wp-button-text-align; color: $action-sheet-wp-button-text-color; background: $action-sheet-wp-button-background; - text-align: $action-sheet-wp-button-text-align; &.activated { background: $action-sheet-wp-button-background-activated; @@ -56,9 +57,9 @@ $action-sheet-wp-icon-margin: 0 16px 0 0 !default; .action-sheet-icon { margin: $action-sheet-wp-icon-margin; min-width: $action-sheet-wp-icon-min-width; + font-size: $action-sheet-wp-icon-font-size; text-align: $action-sheet-wp-icon-text-align; vertical-align: $action-sheet-wp-icon-vertical-align; - font-size: $action-sheet-wp-icon-font-size; } .action-sheet-group { diff --git a/ionic/components/alert/alert.ios.scss b/ionic/components/alert/alert.ios.scss index d2fd8f6ca5..a6edb48987 100644 --- a/ionic/components/alert/alert.ios.scss +++ b/ionic/components/alert/alert.ios.scss @@ -18,7 +18,7 @@ $alert-ios-title-font-size: 17px !default; $alert-ios-sub-title-font-size: 14px !default; $alert-ios-sub-title-text-color: #666 !default; -$alert-ios-message-padding: 0px 16px 21px !default; +$alert-ios-message-padding: 0 16px 21px !default; $alert-ios-message-text-color: inherit !default; $alert-ios-message-text-align: center !default; $alert-ios-message-font-size: 13px !default; @@ -29,7 +29,8 @@ $alert-ios-content-max-height: 240px !default; $alert-ios-input-padding: 6px !default; $alert-ios-input-margin-top: 10px !default; $alert-ios-input-background-color: #fff !default; -$alert-ios-input-border: 1px solid #ccc !default; +$alert-ios-input-border-color: #ccc !default; +$alert-ios-input-border: 1px solid $alert-ios-input-border-color !default; $alert-ios-input-border-radius: 4px !default; $alert-ios-button-group-flex-wrap: wrap !default; @@ -67,12 +68,12 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; .alert-wrapper { + overflow: hidden; max-width: $alert-ios-max-width; border-radius: $alert-ios-border-radius; background-color: $alert-ios-background; box-shadow: $alert-ios-box-shadow; - overflow: hidden; } @@ -80,14 +81,14 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; // -------------------------------------------------- .alert-head { - text-align: $alert-ios-head-text-align; padding: $alert-ios-head-padding; + text-align: $alert-ios-head-text-align; } .alert-title { margin-top: $alert-ios-title-margin-top; - font-weight: $alert-ios-title-font-weight; font-size: $alert-ios-title-font-size; + font-weight: $alert-ios-title-font-weight; } .alert-sub-title { @@ -103,8 +104,8 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; .alert-input-group { padding: $alert-ios-message-padding; font-size: $alert-ios-message-font-size; - color: $alert-ios-message-text-color; text-align: $alert-ios-message-text-align; + color: $alert-ios-message-text-color; } .alert-message { @@ -134,9 +135,9 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; .alert-radio-group, .alert-checkbox-group { + overflow: scroll; max-height: $alert-ios-content-max-height; border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color; - overflow: scroll; } .alert-tappable { @@ -149,11 +150,11 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; // -------------------------------------------------- .alert-radio-label { + overflow: hidden; flex: 1; order: 0; padding: $alert-ios-radio-label-padding; text-overflow: ellipsis; - overflow: hidden; white-space: nowrap; } @@ -166,18 +167,18 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; .alert-radio[aria-checked=true] { color: $alert-ios-button-text-color; - .alert-radio-icon:after { + .alert-radio-icon::after { position: absolute; - border-width: 2px; - border-style: solid; - border-color: $alert-ios-button-text-color; top: 13px; left: 7px; width: 4px; height: 10px; - border-left: none; - border-top: none; - content: ''; + border-width: 2px; + border-top-width: 0; + border-left-width: 0; + border-style: solid; + border-color: $alert-ios-button-text-color; + content: ""; transform: rotate(45deg); } } @@ -187,42 +188,42 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; // -------------------------------------------------- .alert-checkbox-label { + overflow: hidden; flex: 1; order: 0; padding: 13px; text-align: auto; text-overflow: ellipsis; - overflow: hidden; white-space: nowrap; } .alert-checkbox-icon { - margin: 10px 6px 10px 16px; position: relative; + margin: 10px 6px 10px 16px; width: $alert-ios-checkbox-icon-size; height: $alert-ios-checkbox-icon-size; - border-radius: $alert-ios-checkbox-icon-border-radius; border-width: $alert-ios-checkbox-icon-border-width; border-style: $alert-ios-checkbox-icon-border-style; + border-radius: $alert-ios-checkbox-icon-border-radius; border-color: $alert-ios-checkbox-icon-border-color-off; background-color: $alert-ios-checkbox-background-color-off; } .alert-checkbox[aria-checked=true] .alert-checkbox-icon { - background-color: $alert-ios-checkbox-background-color-on; border-color: $alert-ios-checkbox-icon-border-color-on; + background-color: $alert-ios-checkbox-background-color-on; .alert-checkbox-inner { position: absolute; - border-width: $alert-ios-checkbox-icon-checkmark-width; - border-style: $alert-ios-checkbox-icon-checkmark-style; - border-color: $alert-ios-checkbox-icon-checkmark-color; top: 4px; left: 7px; width: 4px; height: 9px; - border-left: none; - border-top: none; + border-width: $alert-ios-checkbox-icon-checkmark-width; + border-top-width: 0; + border-left-width: 0; + border-style: $alert-ios-checkbox-icon-checkmark-style; + border-color: $alert-ios-checkbox-icon-checkmark-color; transform: rotate(45deg); } } @@ -237,21 +238,21 @@ $alert-ios-checkbox-icon-checkmark-color: $background-ios-color !default; } .alert-button { - margin: $alert-ios-button-margin; + overflow: hidden; flex: $alert-ios-button-flex; + margin: $alert-ios-button-margin; min-width: $alert-ios-button-min-width; - font-size: $alert-ios-button-font-size; height: $alert-ios-button-min-height; - border-radius: $alert-ios-button-border-radius; border-top: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color; border-right: $alert-ios-button-border-width $alert-ios-button-border-style $alert-ios-button-border-color; + border-radius: $alert-ios-button-border-radius; + font-size: $alert-ios-button-font-size; color: $alert-ios-button-text-color; background-color: $alert-ios-button-background-color; - overflow: hidden; &:last-child { - font-weight: $alert-ios-button-main-font-weight; border-right: 0; + font-weight: $alert-ios-button-main-font-weight; } &.activated { diff --git a/ionic/components/alert/alert.md.scss b/ionic/components/alert/alert.md.scss index ea3f5d4c39..ce154a5e60 100644 --- a/ionic/components/alert/alert.md.scss +++ b/ionic/components/alert/alert.md.scss @@ -7,7 +7,8 @@ $alert-md-max-width: 280px !default; $alert-md-border-radius: 2px !default; $alert-md-background-color: #fafafa !default; -$alert-md-box-shadow: 0px 16px 20px rgba(0, 0, 0, 0.4) !default; +$alert-md-box-shadow-color: rgba(0, 0, 0, .4) !default; +$alert-md-box-shadow: 0 16px 20px $alert-md-box-shadow-color !default; $alert-md-head-text-align: left !default; $alert-md-head-padding: 24px 24px 20px 24px !default; @@ -17,7 +18,7 @@ $alert-md-sub-title-font-size: 16px !default; $alert-md-message-font-size: 15px !default; $alert-md-message-padding: 0 24px 24px 24px !default; -$alert-md-message-text-color: rgba(0,0,0,.5) !default; +$alert-md-message-text-color: rgba(0, 0, 0, .5) !default; $alert-md-message-padding-empty: 0 !default; $alert-md-content-max-height: 240px !default; @@ -25,7 +26,7 @@ $alert-md-content-max-height: 240px !default; $alert-md-input-border-width: 1px !default; $alert-md-input-border-style: solid !default; $alert-md-input-border-color: #dedede !default; -$alert-md-input-text-color: #000000 !default; +$alert-md-input-text-color: #000 !default; $alert-md-input-border-width-focused: 2px !default; $alert-md-input-border-style-focused: $alert-md-input-border-style !default; @@ -45,7 +46,7 @@ $alert-md-button-margin: 0 8px 0 0 !default; $alert-md-button-font-weight: 500 !default; $alert-md-button-text-color: map-get($colors-md, primary) !default; $alert-md-button-background-color: transparent !default; -$alert-md-button-background-color-activated: rgba(158, 158, 158, 0.2) !default; +$alert-md-button-background-color-activated: rgba(158, 158, 158, .2) !default; $alert-md-button-border-radius: 2px !default; $alert-md-button-text-transform: uppercase !default; $alert-md-button-text-align: right !default; @@ -63,8 +64,8 @@ $alert-md-button-text-align: right !default; // -------------------------------------------------- .alert-head { - text-align: $alert-md-head-text-align; padding: $alert-md-head-padding; + text-align: $alert-md-head-text-align; } .alert-title { @@ -86,8 +87,8 @@ $alert-md-button-text-align: right !default; } .alert-message { - font-size: $alert-md-message-font-size; max-height: $alert-md-content-max-height; + font-size: $alert-md-message-font-size; &:empty { padding: $alert-md-message-padding-empty; @@ -99,13 +100,13 @@ $alert-md-button-text-align: right !default; // -------------------------------------------------- .alert-input { + margin: $alert-md-input-margin-top $alert-md-input-margin-right $alert-md-input-margin-bottom $alert-md-input-margin-left; border-bottom: $alert-md-input-border-width $alert-md-input-border-style $alert-md-input-border-color; color: $alert-md-input-text-color; - margin: $alert-md-input-margin-top $alert-md-input-margin-right $alert-md-input-margin-bottom $alert-md-input-margin-left; &:focus { - border-bottom: $alert-md-input-border-width-focused $alert-md-input-border-style-focused $alert-md-input-border-color-focused; margin-bottom: $alert-md-input-margin-bottom - 1; + border-bottom: $alert-md-input-border-width-focused $alert-md-input-border-style-focused $alert-md-input-border-color-focused; } } @@ -116,16 +117,16 @@ $alert-md-button-text-align: right !default; .alert-radio-group, .alert-checkbox-group { position: relative; + overflow: auto; + max-height: $alert-md-content-max-height; border-top: 1px solid $alert-md-input-border-color; border-bottom: 1px solid $alert-md-input-border-color; - max-height: $alert-md-content-max-height; - overflow: auto; } .alert-tappable { position: relative; - overflow: hidden; display: flex; + overflow: hidden; min-height: 44px; } @@ -134,11 +135,11 @@ $alert-md-button-text-align: right !default; // -------------------------------------------------- .alert-radio-label { - flex: 1; - text-align: auto; - padding: 13px 26px; - text-overflow: ellipsis; overflow: hidden; + flex: 1; + padding: 13px 26px; + text-align: auto; + text-overflow: ellipsis; white-space: nowrap; } @@ -147,25 +148,25 @@ $alert-md-button-text-align: right !default; top: 13px; left: 13px; display: block; + margin: 0; width: 16px; height: 16px; - margin: 0; border-width: 2px; border-style: solid; - border-color: darken($list-md-border-color, 40%); border-radius: 50%; + border-color: darken($list-md-border-color, 40%); - &:after { + &::after { position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; - background-color: $alert-md-button-text-color; border-radius: 50%; - content: ''; - transition: transform 280ms cubic-bezier(.4, 0, .2, 1); + background-color: $alert-md-button-text-color; + content: ""; transform: scale3d(0, 0, 0); + transition: transform 280ms cubic-bezier(.4, 0, .2, 1); } } @@ -176,7 +177,7 @@ $alert-md-button-text-align: right !default; border-color: $alert-md-button-text-color; } - .alert-radio-icon:after { + .alert-radio-icon::after { transform: scale3d(1, 1, 1); } } @@ -186,11 +187,11 @@ $alert-md-button-text-align: right !default; // -------------------------------------------------- .alert-checkbox-label { - flex: 1; - text-align: auto; - padding: 13px 26px; - text-overflow: ellipsis; overflow: hidden; + flex: 1; + padding: 13px 26px; + text-align: auto; + text-overflow: ellipsis; white-space: nowrap; } @@ -200,29 +201,29 @@ $alert-md-button-text-align: right !default; left: 13px; width: 16px; height: 16px; - border-radius: 2px; border-width: 2px; border-style: solid; + border-radius: 2px; border-color: darken($list-md-border-color, 40%); background-color: transparent; } .alert-checkbox[aria-checked=true] .alert-checkbox-icon { - background-color: $alert-md-button-text-color; border-color: $alert-md-button-text-color; + background-color: $alert-md-button-text-color; - &:after { + &::after { position: absolute; - border-width: 2px; - border-style: solid; - border-color: $alert-md-background-color; top: 0; left: 3px; width: 4px; height: 8px; - border-left: none; - border-top: none; - content: ''; + border-width: 2px; + border-top-width: 0; + border-left-width: 0; + border-style: solid; + border-color: $alert-md-background-color; + content: ""; transform: rotate(45deg); } } @@ -232,25 +233,25 @@ $alert-md-button-text-align: right !default; // -------------------------------------------------- .alert-button-group { - padding: $alert-md-button-group-padding; - justify-content: $alert-md-button-group-justify-content; flex-wrap: $alert-md-button-group-flex-wrap; + justify-content: $alert-md-button-group-justify-content; + padding: $alert-md-button-group-padding; } .alert-button { - padding: $alert-md-button-padding; - margin: $alert-md-button-margin; - font-weight: $alert-md-button-font-weight; - color: $alert-md-button-text-color; - background-color: $alert-md-button-background-color; - border-radius: $alert-md-button-border-radius; - text-transform: $alert-md-button-text-transform; - text-align: $alert-md-button-text-align; - // necessary for ripple to work properly position: relative; overflow: hidden; + margin: $alert-md-button-margin; + padding: $alert-md-button-padding; + border-radius: $alert-md-button-border-radius; + font-weight: $alert-md-button-font-weight; + text-align: $alert-md-button-text-align; + text-transform: $alert-md-button-text-transform; + color: $alert-md-button-text-color; + background-color: $alert-md-button-background-color; + &.activated { background-color: $alert-md-button-background-color-activated; } diff --git a/ionic/components/alert/alert.scss b/ionic/components/alert/alert.scss index 2f1a766bd9..e761bbee78 100644 --- a/ionic/components/alert/alert.scss +++ b/ionic/components/alert/alert.scss @@ -12,15 +12,15 @@ $alert-button-font-size: 14px !default; ion-alert { position: absolute; - z-index: $z-index-overlay; top: 0; - left: 0; - bottom: 0; right: 0; + bottom: 0; + left: 0; + z-index: $z-index-overlay; display: flex; - justify-content: center; align-items: center; + justify-content: center; input { width: 100%; @@ -29,12 +29,10 @@ ion-alert { .alert-wrapper { z-index: $z-index-overlay-wrapper; - min-width: $alert-min-width; - max-height: $alert-max-height; - display: flex; flex-direction: column; - + min-width: $alert-min-width; + max-height: $alert-max-height; opacity: 0; } @@ -44,7 +42,7 @@ ion-alert { } .alert-sub-title { - margin: 5px 0 0 0; + margin: 5px 0 0; padding: 0; font-weight: normal; } @@ -56,9 +54,9 @@ ion-alert { .alert-input { @include placeholder(); + padding: 10px 0; border: 0; background: inherit; - padding: 10px 0; } .alert-button-group { @@ -72,11 +70,11 @@ ion-alert { } .alert-button { + z-index: 0; display: block; margin: 0; - z-index: 0; - line-height: $alert-button-line-height; font-size: $alert-button-font-size; + line-height: $alert-button-line-height; } .alert-tappable { diff --git a/ionic/components/alert/alert.wp.scss b/ionic/components/alert/alert.wp.scss index e1586ff4a6..c10b5a42db 100644 --- a/ionic/components/alert/alert.wp.scss +++ b/ionic/components/alert/alert.wp.scss @@ -4,7 +4,7 @@ // Windows Alerts // -------------------------------------------------- -$alert-wp-backdrop-background: white !default; +$alert-wp-backdrop-background: #fff !default; $alert-wp-width: 100% !default; $alert-wp-max-width: 520px !default; @@ -12,7 +12,7 @@ $alert-wp-border-radius: 0 !default; $alert-wp-border-width: 1px !default; $alert-wp-border-style: solid !default; $alert-wp-border-color: map-get($colors-wp, primary) !default; -$alert-wp-background: #E6E6E6 !default; +$alert-wp-background: #e6e6e6 !default; $alert-wp-head-text-align: left !default; $alert-wp-head-padding: 20px 22px 5px 22px !default; @@ -31,7 +31,7 @@ $alert-wp-content-max-height: 240px !default; $alert-wp-input-border-width: 2px !default; $alert-wp-input-border-style: $alert-wp-border-style !default; $alert-wp-input-border-color: $input-wp-border-color !default; -$alert-wp-input-text-color: #000000 !default; +$alert-wp-input-text-color: #000 !default; $alert-wp-input-margin: 5px 0 5px 0 !default; $alert-wp-input-padding: 0 8px !default; $alert-wp-input-line-height: 3rem !default; @@ -40,7 +40,7 @@ $alert-wp-input-border-color-focused: map-get($colors-wp, primary) !def $alert-wp-button-padding: 5px !default; $alert-wp-button-text-color: #000 !default; -$alert-wp-button-background: #B8B8B8 !default; +$alert-wp-button-background: #b8b8b8 !default; $alert-wp-button-border-radius: 0 !default; $alert-wp-button-width: 49.5% !default; $alert-wp-button-margin-right: 1% !default; @@ -68,17 +68,17 @@ ion-alert { .alert-wrapper { width: $alert-wp-width; max-width: $alert-wp-max-width; + border: $alert-wp-border-width $alert-wp-border-style $alert-wp-border-color; border-radius: $alert-wp-border-radius; background: $alert-wp-background; - border: $alert-wp-border-width $alert-wp-border-style $alert-wp-border-color; } // Windows Alert Header // -------------------------------------------------- .alert-head { - text-align: $alert-wp-head-text-align; padding: $alert-wp-head-padding; + text-align: $alert-wp-head-text-align; } .alert-title { @@ -101,8 +101,8 @@ ion-alert { } .alert-message { - font-size: $alert-wp-message-font-size; max-height: $alert-wp-content-max-height; + font-size: $alert-wp-message-font-size; &:empty { padding: $alert-wp-message-padding-empty; @@ -114,11 +114,11 @@ ion-alert { // -------------------------------------------------- .alert-input { - border: $alert-wp-input-border-width $alert-wp-input-border-style $alert-wp-input-border-color; - color: $alert-wp-input-text-color; margin: $alert-wp-input-margin; padding: $alert-wp-input-padding; + border: $alert-wp-input-border-width $alert-wp-input-border-style $alert-wp-input-border-color; line-height: $alert-wp-input-line-height; + color: $alert-wp-input-text-color; &:focus { border-color: $alert-wp-input-border-color-focused; @@ -132,16 +132,16 @@ ion-alert { .alert-radio-group, .alert-checkbox-group { position: relative; + overflow: auto; + max-height: $alert-wp-content-max-height; border-top: 0 solid $alert-wp-input-border-color; border-bottom: 0 solid $alert-wp-input-border-color; - max-height: $alert-wp-content-max-height; - overflow: auto; } .alert-tappable { position: relative; - overflow: hidden; display: flex; + overflow: hidden; min-height: 44px; } @@ -150,11 +150,11 @@ ion-alert { // -------------------------------------------------- .alert-radio-label { - flex: 1; - text-align: auto; - padding: 13px 26px; - text-overflow: ellipsis; overflow: hidden; + flex: 1; + padding: 13px 26px; + text-align: auto; + text-overflow: ellipsis; white-space: nowrap; } @@ -163,24 +163,24 @@ ion-alert { top: 13px; left: 13px; display: block; + margin: 0; width: 16px; height: 16px; - margin: 0; border-width: 2px; border-style: solid; - border-color: $alert-wp-radio-border-color; border-radius: 50%; + border-color: $alert-wp-radio-border-color; - &:after { + &::after { position: absolute; top: 2px; left: 2px; + display: none; width: 8px; height: 8px; - background: $alert-wp-radio-background; border-radius: 50%; - content: ''; - display: none; + background: $alert-wp-radio-background; + content: ""; } } @@ -191,7 +191,7 @@ ion-alert { border-color: $alert-wp-radio-border-color; } - .alert-radio-icon:after { + .alert-radio-icon::after { display: block; } } @@ -201,11 +201,11 @@ ion-alert { // -------------------------------------------------- .alert-checkbox-label { - flex: 1; - text-align: auto; - padding: 13px 26px; - text-overflow: ellipsis; overflow: hidden; + flex: 1; + padding: 13px 26px; + text-align: auto; + text-overflow: ellipsis; white-space: nowrap; } @@ -218,9 +218,9 @@ ion-alert { left: 13px; width: 16px; height: 16px; - border-radius: $alert-wp-checkbox-border-radius; border-width: 2px; border-style: solid; + border-radius: $alert-wp-checkbox-border-radius; border-color: $alert-wp-checkbox-border-color; background: transparent; } @@ -229,22 +229,22 @@ ion-alert { // -------------------------------------------------- .alert-checkbox[aria-checked=true] .alert-checkbox-icon { - background: $alert-wp-checkbox-background; border-color: $alert-wp-checkbox-background; + background: $alert-wp-checkbox-background; } .alert-checkbox[aria-checked=true] .alert-checkbox-inner { position: absolute; - border-width: 1px; - border-style: solid; - border-color: $alert-wp-background; top: -2px; left: 3px; width: 6px; height: 12px; - border-left: none; - border-top: none; - content: ''; + border-width: 1px; + border-top-width: 0; + border-left-width: 0; + border-style: solid; + border-color: $alert-wp-background; + content: ""; transform: rotate(45deg); } @@ -253,13 +253,13 @@ ion-alert { // -------------------------------------------------- .alert-button-group { - padding: $alert-wp-button-group-padding; - justify-content: $alert-wp-button-group-justify-content; flex-wrap: $alert-wp-button-group-flex-wrap; + justify-content: $alert-wp-button-group-justify-content; + padding: $alert-wp-button-group-padding; &.vertical .alert-button { - width: $alert-wp-button-group-vertical-width; margin-top: $alert-wp-button-group-vertical-margin-top; + width: $alert-wp-button-group-vertical-width; &:first-child:not(:only-child) { margin-top: 0; @@ -269,11 +269,11 @@ ion-alert { .alert-button { padding: $alert-wp-button-padding; + width: $alert-wp-button-width; + border-radius: $alert-wp-button-border-radius; + font-weight: $alert-wp-button-font-weight; color: $alert-wp-button-text-color; background: $alert-wp-button-background; - border-radius: $alert-wp-button-border-radius; - width: $alert-wp-button-width; - font-weight: $alert-wp-button-font-weight; &:first-child:not(:only-child) { margin-right: $alert-wp-button-margin-right; diff --git a/ionic/components/app/app.ios.scss b/ionic/components/app/app.ios.scss index a559aa3109..13e3200e87 100644 --- a/ionic/components/app/app.ios.scss +++ b/ionic/components/app/app.ios.scss @@ -17,7 +17,7 @@ a { } hr { - background-color: rgba(0, 0, 0, 0.12); + background-color: rgba(0, 0, 0, .12); } &.hairlines hr { @@ -25,7 +25,12 @@ hr { } @each $color-name, $color-value in $colors-ios { - h1, h2, h3, h4, h5, h6, + h1, + h2, + h3, + h4, + h5, + h6, p, span, a:not([button]), diff --git a/ionic/components/app/app.md.scss b/ionic/components/app/app.md.scss index f81d16910f..bb9f37a846 100644 --- a/ionic/components/app/app.md.scss +++ b/ionic/components/app/app.md.scss @@ -16,11 +16,16 @@ a { } hr { - background-color: rgba(0, 0, 0, 0.08); + background-color: rgba(0, 0, 0, .08); } @each $color-name, $color-value in $colors-md { - h1, h2, h3, h4, h5, h6, + h1, + h2, + h3, + h4, + h5, + h6, p, span, a:not([button]), diff --git a/ionic/components/app/app.wp.scss b/ionic/components/app/app.wp.scss index 46b58beed1..383f1ebd32 100644 --- a/ionic/components/app/app.wp.scss +++ b/ionic/components/app/app.wp.scss @@ -16,11 +16,16 @@ a { } hr { - background-color: rgba(0, 0, 0, 0.08); + background-color: rgba(0, 0, 0, .08); } @each $color-name, $color-value in $colors-wp { - h1, h2, h3, h4, h5, h6, + h1, + h2, + h3, + h4, + h5, + h6, p, span, a:not([button]), diff --git a/ionic/components/app/normalize.scss b/ionic/components/app/normalize.scss index 32e0a9ce94..a3cf7dafe5 100644 --- a/ionic/components/app/normalize.scss +++ b/ionic/components/app/normalize.scss @@ -1,4 +1,4 @@ -/*! normalize.css v3.0.2 | MIT License | github.com/necolas/normalize.css */ +// ! normalize.css v3.0.2 | MIT License | github.com/necolas/normalize.css // HTML5 display definitions @@ -35,8 +35,8 @@ strong { // Remove border when inside `a` element in IE 8/9/10. img { - border: 0; max-width: 100%; + border: 0; } // Correct overflow not hidden in IE 9/10/11. @@ -54,9 +54,9 @@ figure { } hr { - box-sizing: content-box; height: 1px; border-width: 0; + box-sizing: content-box; } // Contain overflow in all browsers. @@ -90,13 +90,13 @@ label, input, select, textarea { - line-height: normal; font-family: inherit; + line-height: normal; } textarea { - height: auto; overflow: auto; + height: auto; font: inherit; color: inherit; } @@ -105,9 +105,9 @@ form, input, optgroup, select { - color: inherit; // 1 - font: inherit; // 2 margin: 0; // 3 + font: inherit; // 2 + color: inherit; // 1 } // 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` @@ -118,8 +118,8 @@ select { html input[type="button"], // 1 input[type="reset"], input[type="submit"] { - -webkit-appearance: button; // 2 cursor: pointer; // 3 + -webkit-appearance: button; // 2 } // remove 300ms delay @@ -145,18 +145,18 @@ textarea { button { border: 0; - line-height: 1; font-family: inherit; - font-variant: inherit; font-style: inherit; + font-variant: inherit; + line-height: 1; text-transform: none; - -webkit-appearance: button; cursor: pointer; + -webkit-appearance: button; } // Re-set default cursor for disabled elements. a[disabled], -button[disabled] +button[disabled], html input[disabled] { cursor: default; } @@ -164,8 +164,8 @@ html input[disabled] { // Remove inner padding and border in Firefox 4+. button::-moz-focus-inner, input::-moz-focus-inner { - border: 0; padding: 0; + border: 0; } // Firefox's implementation doesn't respect box-sizing, padding, or width. @@ -173,8 +173,8 @@ input::-moz-focus-inner { // 2. Remove excess padding in IE 8/9/10. input[type="checkbox"], input[type="radio"] { - box-sizing: border-box; // 1 padding: 0; // 2 + box-sizing: border-box; // 1 } // Fix the cursor style for Chrome's increment/decrement buttons. For certain diff --git a/ionic/components/app/scrollbars.scss b/ionic/components/app/scrollbars.scss index b9647aed77..6132f86549 100644 --- a/ionic/components/app/scrollbars.scss +++ b/ionic/components/app/scrollbars.scss @@ -11,19 +11,19 @@ } ::-webkit-scrollbar-thumb:vertical { - background: rgba(0, 0, 0, 0.4); + min-height: 10px; border: 2px solid transparent; border-radius: 20px; + background: rgba(0, 0, 0, .4); background-clip: padding-box; - min-height: 10px; } ::-webkit-scrollbar-thumb:vertical:active { - background: rgba(0, 0, 0, 0.6); + min-height: 10px; border: 2px solid transparent; border-radius: 20px; + background: rgba(0, 0, 0, .6); background-clip: padding-box; - min-height: 10px; } -} \ No newline at end of file +} diff --git a/ionic/components/app/structure.scss b/ionic/components/app/structure.scss index a793f5f51b..cfd63954d4 100644 --- a/ionic/components/app/structure.scss +++ b/ionic/components/app/structure.scss @@ -56,43 +56,45 @@ html { } body { + @include user-select-none(); + position: fixed; overflow: hidden; - width: 100%; - height: 100%; - max-width: 100%; - max-height: 100%; margin: 0; padding: 0; - word-wrap: break-word; - touch-action: manipulation; - - -webkit-user-drag: none; - -ms-content-zooming: none; + width: 100%; + max-width: 100%; + height: 100%; + max-height: 100%; -webkit-font-smoothing: antialiased; font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -webkit-user-drag: none; + + -ms-content-zooming: none; + touch-action: manipulation; + + word-wrap: break-word; -webkit-text-size-adjust: none; -moz-text-size-adjust: none; text-size-adjust: none; - - @include user-select-none(); } ion-app, ion-nav, ion-tabs { - display: flex; - flex-direction: column; position: absolute; top: 0; left: 0; + display: flex; + overflow: hidden; + flex-direction: column; width: 100%; height: 100%; - overflow: hidden; } ion-navbar-section { @@ -102,19 +104,19 @@ ion-navbar-section { } ion-content-section { + position: relative; display: block; flex: 1; - position: relative; width: 100%; height: 100%; } ion-page { - display: none; - flex-direction: column; position: absolute; top: 0; left: 0; + display: none; + flex-direction: column; width: 100%; height: 100%; @@ -126,42 +128,42 @@ ion-page { ion-content { position: relative; display: block; + flex: 1; width: 100%; height: 100%; - flex: 1; } scroll-content { position: absolute; - z-index: $z-index-scroll-content; top: 0; right: 0; bottom: 0; left: 0; + z-index: $z-index-scroll-content; display: block; - overflow-y: scroll; overflow-x: hidden; + overflow-y: scroll; -webkit-overflow-scrolling: touch; will-change: scroll-position; } ion-tabbar { - display: block; position: absolute; top: 0; left: 0; + display: block; width: 100%; min-height: 50px; } ion-tab-section { - display: block; position: relative; top: 0; left: 0; + display: block; + overflow: hidden; width: 100%; height: 100%; - overflow: hidden; } ion-page.tab-subpage { @@ -170,13 +172,13 @@ ion-page.tab-subpage { } ion-navbar { - display: block; position: absolute; top: 0; left: 0; + z-index: $z-index-navbar-section; + display: block; width: 100%; min-height: 50px; - z-index: $z-index-navbar-section; } ion-navbar-section ion-navbar.toolbar { diff --git a/ionic/components/app/typography.scss b/ionic/components/app/typography.scss index 4f5ffe3ed3..e012fd62b8 100644 --- a/ionic/components/app/typography.scss +++ b/ionic/components/app/typography.scss @@ -14,7 +14,7 @@ $headings-line-height: 1.2 !default; $h1-font-size: 2.6rem !default; $h2-font-size: 2.4rem !default; $h3-font-size: 2.2rem !default; -$h4-font-size: 2.0rem !default; +$h4-font-size: 2rem !default; $h5-font-size: 1.8rem !default; $h6-font-size: 1.6rem !default; @@ -28,20 +28,30 @@ a { } .enable-hover a:hover { - opacity: 0.7; + opacity: .7; } -h1, h2, h3, h4, h5, h6 { - font-weight: $headings-font-weight; - line-height: $headings-line-height; +h1, +h2, +h3, +h4, +h5, +h6 { margin-top: 1.6rem; margin-bottom: 1rem; + font-weight: $headings-font-weight; + line-height: $headings-line-height; } [padding] { - h1, h2, h3, h4, h5, h6 { + h1, + h2, + h3, + h4, + h5, + h6 { &:first-child { - margin-top: -0.3rem; + margin-top: -.3rem; } } } @@ -49,17 +59,17 @@ h1, h2, h3, h4, h5, h6 { h1 + h2, h1 + h3, h2 + h3 { - margin-top: -0.3rem; + margin-top: -.3rem; } h1 { - font-size: $h1-font-size; margin-top: 2rem; + font-size: $h1-font-size; } h2 { - font-size: $h2-font-size; margin-top: 1.8rem; + font-size: $h2-font-size; } h3 { @@ -84,18 +94,18 @@ small { sub, sup { + position: relative; font-size: 75%; line-height: 0; - position: relative; vertical-align: baseline; } sup { - top: -0.5em; + top: -.5em; } sub { - bottom: -0.25em; + bottom: -.25em; } // Text Alignment diff --git a/ionic/components/badge/badge.ios.scss b/ionic/components/badge/badge.ios.scss index ec7fba50aa..ed77a9d640 100644 --- a/ionic/components/badge/badge.ios.scss +++ b/ionic/components/badge/badge.ios.scss @@ -9,8 +9,8 @@ $badge-ios-background-color: map-get($colors-ios, primary) !default; ion-badge { border-radius: $badge-ios-border-radius; - background-color: $badge-ios-background-color; color: color-inverse($badge-ios-background-color); + background-color: $badge-ios-background-color; } @@ -20,8 +20,8 @@ ion-badge { @each $color-name, $color-value in $colors-ios { .badge-#{$color-name} { - background-color: $color-value; color: color-inverse($color-value); + background-color: $color-value; } } diff --git a/ionic/components/badge/badge.md.scss b/ionic/components/badge/badge.md.scss index a4ecd6b738..ca1eb2f056 100644 --- a/ionic/components/badge/badge.md.scss +++ b/ionic/components/badge/badge.md.scss @@ -9,8 +9,8 @@ $badge-md-background-color: map-get($colors-md, primary) !default; ion-badge { border-radius: $badge-md-border-radius; - background-color: $badge-md-background-color; color: color-inverse($badge-md-background-color); + background-color: $badge-md-background-color; } @@ -20,8 +20,8 @@ ion-badge { @each $color-name, $color-value in $colors-md { .badge-#{$color-name} { - background-color: $color-value; color: color-inverse($color-value); + background-color: $color-value; } } diff --git a/ionic/components/badge/badge.scss b/ionic/components/badge/badge.scss index 53e5a7aa96..8892304734 100644 --- a/ionic/components/badge/badge.scss +++ b/ionic/components/badge/badge.scss @@ -13,14 +13,14 @@ ion-badge { padding: 3px 8px; min-width: 10px; - vertical-align: baseline; - text-align: center; - white-space: nowrap; - font-size: $badge-font-size; font-weight: $badge-font-weight; line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + &:empty { display: none; } diff --git a/ionic/components/badge/badge.wp.scss b/ionic/components/badge/badge.wp.scss index ccd0ea18a6..a3adcd5c18 100644 --- a/ionic/components/badge/badge.wp.scss +++ b/ionic/components/badge/badge.wp.scss @@ -9,8 +9,8 @@ $badge-wp-background-color: map-get($colors-wp, primary) !default; ion-badge { border-radius: $badge-wp-border-radius; - background-color: $badge-wp-background-color; color: color-inverse($badge-wp-background-color); + background-color: $badge-wp-background-color; } @@ -20,8 +20,8 @@ ion-badge { @each $color-name, $color-value in $colors-wp { .badge-#{$color-name} { - background-color: $color-value; color: color-inverse($color-value); + background-color: $color-value; } } diff --git a/ionic/components/button/button-fab.scss b/ionic/components/button/button-fab.scss index 1762615177..80c09aff0f 100644 --- a/ionic/components/button/button-fab.scss +++ b/ionic/components/button/button-fab.scss @@ -8,18 +8,15 @@ $button-fab-size: 56px !default; .button-fab { position: absolute; - width: $button-fab-size; - height: $button-fab-size; - line-height: $button-fab-size; - min-width: 0; - vertical-align: middle; - - border-radius: 50%; - background-clip: padding-box; - overflow: hidden; - + width: $button-fab-size; + min-width: 0; + height: $button-fab-size; + border-radius: 50%; font-size: 14px; + line-height: $button-fab-size; + vertical-align: middle; + background-clip: padding-box; ion-icon { flex: 1; diff --git a/ionic/components/button/button-icon.scss b/ionic/components/button/button-icon.scss index 878e1d33a3..178e64db7b 100644 --- a/ionic/components/button/button-icon.scss +++ b/ionic/components/button/button-icon.scss @@ -5,27 +5,27 @@ .button-icon-left ion-icon { - padding-right: 0.3em; + padding-right: .3em; font-size: 1.4em; - line-height: 0.67; + line-height: .67; pointer-events: none; } .button-icon-right ion-icon { - padding-left: 0.4em; + padding-left: .4em; font-size: 1.4em; - line-height: 0.67; + line-height: .67; pointer-events: none; } .button-icon-only { padding: 0; - min-width: 0.9em; + min-width: .9em; ion-icon { - padding: 0 0.5em; + padding: 0 .5em; font-size: 1.8em; - line-height: 0.67; + line-height: .67; pointer-events: none; } } diff --git a/ionic/components/button/button.ios.scss b/ionic/components/button/button.ios.scss index 5daae74cdc..7a6735ca07 100644 --- a/ionic/components/button/button.ios.scss +++ b/ionic/components/button/button.ios.scss @@ -4,22 +4,22 @@ // iOS Button // -------------------------------------------------- -$button-ios-margin: 0.4rem 0.2rem !default; +$button-ios-margin: .4rem .2rem !default; $button-ios-padding: 0 1em !default; $button-ios-font-size: 1.6rem !default; $button-ios-height: 2.8em !default; $button-ios-color: map-get($colors-ios, primary) !default; $button-ios-color-activated: color-shade($button-ios-color) !default; $button-ios-text-color: color-inverse($button-ios-color) !default; -$button-ios-hover-opacity: 0.8 !default; +$button-ios-hover-opacity: .8 !default; $button-ios-border-radius: 4px !default; $button-ios-large-font-size: 2rem !default; $button-ios-large-height: 2.8em !default; -$button-ios-large-padding: 1.0em !default; +$button-ios-large-padding: 1em !default; $button-ios-small-font-size: 1.3rem !default; $button-ios-small-height: 2.1em !default; -$button-ios-small-padding: 0.9em !default; +$button-ios-small-padding: .9em !default; $button-ios-small-icon-font-size: 1.3em !default; @@ -31,20 +31,20 @@ $button-ios-small-icon-font-size: 1.3em !default; padding: $button-ios-padding; height: $button-ios-height; + border-radius: $button-ios-border-radius; font-size: $button-ios-font-size; - border-radius: $button-ios-border-radius; color: $button-ios-text-color; background-color: $button-ios-color; &:hover:not(.disable-hover) { - opacity: $button-ios-hover-opacity; text-decoration: none; + opacity: $button-ios-hover-opacity; } &.activated { - opacity: 1; background-color: $button-ios-color-activated; + opacity: 1; } } @@ -83,18 +83,18 @@ $button-ios-small-icon-font-size: 1.3em !default; padding: 0 $button-ios-small-padding; height: $button-ios-small-height; font-size: $button-ios-small-font-size; -} -.button-small.button-icon-only ion-icon { - font-size: $button-ios-small-icon-font-size; + &.button-icon-only ion-icon { + font-size: $button-ios-small-icon-font-size; + } } // iOS Block Button // -------------------------------------------------- .button-block { - margin-left: 0; margin-right: 0; + margin-left: 0; } // iOS Full Button @@ -103,9 +103,9 @@ $button-ios-small-icon-font-size: 1.3em !default; .button-full { margin-right: 0; margin-left: 0; - border-radius: 0; border-right-width: 0; border-left-width: 0; + border-radius: 0; } // iOS Outline Button @@ -114,15 +114,15 @@ $button-ios-small-icon-font-size: 1.3em !default; .button-outline { border-width: 1px; border-style: solid; + border-radius: 4px; border-color: $button-ios-color; color: $button-ios-color; background-color: transparent; - border-radius: 4px; &.activated { - opacity: 1; color: $background-ios-color; background-color: $button-ios-color; + opacity: 1; } } @@ -159,13 +159,13 @@ $button-ios-small-icon-font-size: 1.3em !default; background-color: transparent; &.activated { - opacity: 0.4; background-color: transparent; + opacity: .4; } &:hover:not(.disable-hover) { - opacity: 0.6; color: $button-ios-color; + opacity: .6; } } @@ -178,11 +178,11 @@ $button-ios-small-icon-font-size: 1.3em !default; .button-clear-#{$color-name} { $fg-color: $color-value; border-color: transparent; - background-color: transparent; color: $fg-color; + background-color: transparent; &.activated { - opacity: 0.4; + opacity: .4; } &:hover:not(.disable-hover) { diff --git a/ionic/components/button/button.md.scss b/ionic/components/button/button.md.scss index f6dc060d81..8e17b4b58d 100644 --- a/ionic/components/button/button.md.scss +++ b/ionic/components/button/button.md.scss @@ -4,34 +4,35 @@ // Material Design Button // -------------------------------------------------- -$button-md-margin: 0.4rem 0.2rem !default; +$button-md-margin: .4rem .2rem !default; $button-md-padding: 0 1.1em !default; $button-md-font-size: 1.4rem !default; $button-md-height: 3.6rem !default; -$button-md-box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12) !default; -$button-md-box-shadow-active: 0 3px 5px rgba(0, 0, 0, 0.14), 0 3px 5px rgba(0, 0, 0, 0.21) !default; +$button-md-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12) !default; +$button-md-box-shadow-active: 0 3px 5px rgba(0, 0, 0, .14), 0 3px 5px rgba(0, 0, 0, .21) !default; $button-md-border-radius: 2px !default; -$button-md-animation-curve: cubic-bezier(0.4, 0, 0.2, 1) !default; +$button-md-animation-curve: cubic-bezier(.4, 0, .2, 1) !default; $button-md-transition-duration: 300ms !default; -$button-md-clear-hover-background-color: rgba(158, 158, 158, 0.1) !default; -$button-md-clear-active-background-color: rgba(158, 158, 158, 0.2) !default; +$button-md-clear-hover-background-color: rgba(158, 158, 158, .1) !default; +$button-md-clear-active-background-color: rgba(158, 158, 158, .2) !default; +$button-md-clear-ripple-background-color: #999 !default; -$button-md-fab-box-shadow: 0 4px 6px 0 rgba(0, 0, 0, 0.14), 0 4px 5px rgba(0, 0, 0, 0.1) !default; -$button-md-fab-box-shadow-active: 0 5px 15px 0 rgba(0, 0, 0, 0.4), 0 4px 7px 0 rgba(0, 0, 0, 0.1) !default; +$button-md-fab-box-shadow: 0 4px 6px 0 rgba(0, 0, 0, .14), 0 4px 5px rgba(0, 0, 0, .1) !default; +$button-md-fab-box-shadow-active: 0 5px 15px 0 rgba(0, 0, 0, .4), 0 4px 7px 0 rgba(0, 0, 0, .1) !default; $button-md-color: map-get($colors-md, primary) !default; $button-md-color-activated: color-shade($button-md-color) !default; $button-md-text-color: color-inverse($button-md-color) !default; -$button-md-hover-opacity: 0.8 !default; +$button-md-hover-opacity: .8 !default; $button-md-large-font-size: 2rem !default; $button-md-large-height: 2.8em !default; -$button-md-large-padding: 1.0em !default; +$button-md-large-padding: 1em !default; $button-md-small-font-size: 1.3rem !default; $button-md-small-height: 2.1em !default; -$button-md-small-padding: 0.9em !default; +$button-md-small-padding: .9em !default; $button-md-small-icon-font-size: 1.4em !default; @@ -44,15 +45,14 @@ $button-md-small-icon-font-size: 1.4em !default; height: $button-md-height; border-radius: $button-md-border-radius; - font-weight: 500; font-size: $button-md-font-size; + font-weight: 500; + text-transform: uppercase; color: $button-md-text-color; background-color: $button-md-color; box-shadow: $button-md-box-shadow; - text-transform: uppercase; - transition: box-shadow $button-md-transition-duration $button-md-animation-curve, background-color $button-md-transition-duration $button-md-animation-curve, color $button-md-transition-duration $button-md-animation-curve; @@ -62,8 +62,8 @@ $button-md-small-icon-font-size: 1.4em !default; } &.activated { - box-shadow: $button-md-box-shadow-active; background-color: $button-md-color-activated; + box-shadow: $button-md-box-shadow-active; } ion-button-effect { @@ -90,8 +90,8 @@ $button-md-small-icon-font-size: 1.4em !default; } &.activated { - opacity: 1; background-color: $background-color-activated; + opacity: 1; } ion-button-effect { @@ -115,18 +115,18 @@ $button-md-small-icon-font-size: 1.4em !default; padding: 0 $button-md-small-padding; height: $button-md-small-height; font-size: $button-md-small-font-size; -} -.button-small.button-icon-only ion-icon { - font-size: $button-md-small-icon-font-size; + &.button-icon-only ion-icon { + font-size: $button-md-small-icon-font-size; + } } // Material Design Block Button // -------------------------------------------------- .button-block { - margin-left: 0; margin-right: 0; + margin-left: 0; } // Material Design Full Button @@ -135,9 +135,9 @@ $button-md-small-icon-font-size: 1.4em !default; .button-full { margin-right: 0; margin-left: 0; - border-radius: 0; border-right-width: 0; border-left-width: 0; + border-radius: 0; } // Material Design Outline Button @@ -147,8 +147,8 @@ $button-md-small-icon-font-size: 1.4em !default; border-width: 1px; border-style: solid; border-color: $button-md-color; - background-color: transparent; color: $button-md-color; + background-color: transparent; box-shadow: none; &:hover:not(.disable-hover) { @@ -156,9 +156,9 @@ $button-md-small-icon-font-size: 1.4em !default; } &.activated { - opacity: 1; - box-shadow: none; background-color: transparent; + box-shadow: none; + opacity: 1; } ion-button-effect { @@ -175,8 +175,8 @@ $button-md-small-icon-font-size: 1.4em !default; .button-outline-#{$color-name} { $fg-color: color-shade($color-value, 5%); border-color: $fg-color; - background-color: transparent; color: $fg-color; + background-color: transparent; &:hover:not(.disable-hover) { background-color: $button-md-clear-hover-background-color; @@ -199,10 +199,10 @@ $button-md-small-icon-font-size: 1.4em !default; .button-clear { border-color: transparent; - opacity: 1; - box-shadow: none; - background-color: transparent; color: $button-md-color; + background-color: transparent; + box-shadow: none; + opacity: 1; &.activated { background-color: $button-md-clear-active-background-color; @@ -214,7 +214,7 @@ $button-md-small-icon-font-size: 1.4em !default; } ion-button-effect { - background-color: #999; + background-color: $button-md-clear-ripple-background-color; } } @@ -227,8 +227,8 @@ $button-md-small-icon-font-size: 1.4em !default; .button-clear-#{$color-name} { $fg-color: $color-value; border-color: transparent; - background-color: transparent; color: $fg-color; + background-color: transparent; &.activated { background-color: $button-md-clear-active-background-color; @@ -284,10 +284,10 @@ ion-button-effect { border-radius: 50%; background-color: $ripple-background-color; - opacity: 0.2; + opacity: .2; - pointer-events: none; transition-timing-function: ease-in-out; + pointer-events: none; } diff --git a/ionic/components/button/button.scss b/ionic/components/button/button.scss index ac4eeaf672..4e3fdcea3d 100644 --- a/ionic/components/button/button.scss +++ b/ionic/components/button/button.scss @@ -8,44 +8,45 @@ $button-round-border-radius: 64px !default; .button { - position: relative; - display: inline-block; - transition: background-color, opacity 100ms linear; - z-index: 0; + @include user-select-none(); + @include appearance(none); - white-space: nowrap; - text-overflow: ellipsis; + position: relative; + z-index: 0; + display: inline-block; overflow: hidden; text-align: center; + text-overflow: ellipsis; text-transform: none; - font-kerning: none; + white-space: nowrap; + cursor: pointer; vertical-align: top; // the better option for most scenarios vertical-align: -webkit-baseline-middle; // the best for those that support it - cursor: pointer; - @include user-select-none(); - @include appearance(none); + transition: background-color, opacity 100ms linear; + font-kerning: none; } .button-inner { display: flex; - flex-shrink: 0; flex-flow: row nowrap; + flex-shrink: 0; align-items: center; justify-content: center; width: 100%; height: 100%; } -a.button, a[button] { +a.button, +a[button] { text-decoration: none; } .button[disabled] { - opacity: 0.4; - cursor: default !important; + cursor: default; + opacity: .4; pointer-events: none; } @@ -58,7 +59,7 @@ a.button, a[button] { clear: both; width: 100%; - &:after { + &::after { clear: both; } } @@ -70,6 +71,14 @@ a.button, a[button] { .button-full { display: block; width: 100%; + + // Full Outline Button + // -------------------------------------------------- + &.button-outline { + border-right-width: 0; + border-left-width: 0; + border-radius: 0; + } } @@ -80,12 +89,3 @@ a.button, a[button] { padding: $button-round-padding; border-radius: $button-round-border-radius; } - -// Full Outline Button -// -------------------------------------------------- - -.button-full.button-outline { - border-left-width: 0; - border-right-width: 0; - border-radius: 0; -} diff --git a/ionic/components/button/button.wp.scss b/ionic/components/button/button.wp.scss index df12a50bd6..17b3e4c100 100644 --- a/ionic/components/button/button.wp.scss +++ b/ionic/components/button/button.wp.scss @@ -4,7 +4,7 @@ // Windows Button // -------------------------------------------------- -$button-wp-margin: 0.4rem 0.2rem !default; +$button-wp-margin: .4rem .2rem !default; $button-wp-padding: 0 1.1em !default; $button-wp-font-size: 1.4rem !default; $button-wp-height: 3.6rem !default; @@ -18,15 +18,15 @@ $button-wp-background-color-activated: color-shade($button-wp-bac $button-wp-text-color: color-inverse($button-wp-background-color) !default; // Clear button -$button-wp-clear-background-color-hover: rgba(158, 158, 158, 0.1) !default; -$button-wp-clear-background-color-activated: rgba(158, 158, 158, 0.2) !default; +$button-wp-clear-background-color-hover: rgba(158, 158, 158, .1) !default; +$button-wp-clear-background-color-activated: rgba(158, 158, 158, .2) !default; $button-wp-clear-background-color: transparent !default; $button-wp-clear-text-color: $button-wp-background-color !default; // Outline button $button-wp-outline-background-color: transparent !default; $button-wp-outline-background-color-activated: $button-wp-background-color !default; -$button-wp-outline-background-color-opacity: 0.16 !default; +$button-wp-outline-background-color-opacity: .16 !default; $button-wp-outline-border-width: 1px !default; $button-wp-outline-border-color: $button-wp-background-color !default; $button-wp-outline-text-color: $button-wp-background-color !default; @@ -34,12 +34,12 @@ $button-wp-outline-text-color: $button-wp-background-colo // Large button $button-wp-large-font-size: 2rem !default; $button-wp-large-height: 2.8em !default; -$button-wp-large-padding: 0 1.0em !default; +$button-wp-large-padding: 0 1em !default; // Small button $button-wp-small-font-size: 1.3rem !default; $button-wp-small-height: 2.1em !default; -$button-wp-small-padding: 0 0.9em !default; +$button-wp-small-padding: 0 .9em !default; $button-wp-small-icon-font-size: 1.4em !default; // FAB button @@ -52,8 +52,8 @@ $button-wp-fab-border-radius: 50% !default; margin: $button-wp-margin; padding: $button-wp-padding; height: $button-wp-height; - border-radius: $button-wp-border-radius; border: $button-wp-border-width solid $button-wp-border-color; + border-radius: $button-wp-border-radius; font-size: $button-wp-font-size; @@ -110,18 +110,18 @@ $button-wp-fab-border-radius: 50% !default; padding: $button-wp-small-padding; height: $button-wp-small-height; font-size: $button-wp-small-font-size; -} -.button-small.button-icon-only ion-icon { - font-size: $button-wp-small-icon-font-size; + &.button-icon-only ion-icon { + font-size: $button-wp-small-icon-font-size; + } } // Windows Block Button // -------------------------------------------------- .button-block { - margin-left: 0; margin-right: 0; + margin-left: 0; } // Windows Full Button @@ -130,9 +130,9 @@ $button-wp-fab-border-radius: 50% !default; .button-full { margin-right: 0; margin-left: 0; - border-radius: 0; border-right-width: 0; border-left-width: 0; + border-radius: 0; } // Windows Outline Button @@ -142,8 +142,8 @@ $button-wp-fab-border-radius: 50% !default; border-width: $button-wp-outline-border-width; border-style: solid; border-color: $button-wp-outline-border-color; - background-color: $button-wp-outline-background-color; color: $button-wp-outline-text-color; + background-color: $button-wp-outline-background-color; &:hover:not(.disable-hover) { background-color: $button-wp-clear-background-color-hover; @@ -182,8 +182,8 @@ $button-wp-fab-border-radius: 50% !default; // -------------------------------------------------- .button-clear { - background-color: $button-wp-clear-background-color; color: $button-wp-clear-text-color; + background-color: $button-wp-clear-background-color; &.activated { background-color: $button-wp-clear-background-color-activated; diff --git a/ionic/components/card/card.ios.scss b/ionic/components/card/card.ios.scss index 965e76618b..5677d442ef 100644 --- a/ionic/components/card/card.ios.scss +++ b/ionic/components/card/card.ios.scss @@ -18,7 +18,8 @@ $card-ios-padding-media-top: 10px !default; $card-ios-padding-media-bottom: 9px !default; $card-ios-background-color: $list-ios-background-color !default; -$card-ios-box-shadow: 0 1px 2px rgba(0,0,0,.3) !default; +$card-ios-box-shadow-color: rgba(0, 0, 0, .3) !default; +$card-ios-box-shadow: 0 1px 2px $card-ios-box-shadow-color !default; $card-ios-border-radius: 2px !default; $card-ios-font-size: 1.4rem !default; @@ -36,11 +37,11 @@ $card-ios-header-color: #333 !default; ion-card { margin: $card-ios-margin-top $card-ios-margin-right $card-ios-margin-bottom $card-ios-margin-left; + border-radius: $card-ios-border-radius; font-size: $card-ios-font-size; background: $card-ios-background-color; box-shadow: $card-ios-box-shadow; - border-radius: $card-ios-border-radius; ion-list { margin-bottom: 0; @@ -55,12 +56,12 @@ ion-card { > .item:last-child, > ion-item-sliding:last-child .item { - border-bottom: none; + border-bottom: 0; } } .item-inner { - border: none; + border: 0; } ion-card-content { @@ -88,10 +89,10 @@ ion-card { ion-card-title { display: block; - line-height: 1.2; - padding: $card-ios-title-padding; margin: $card-ios-title-margin; + padding: $card-ios-title-padding; font-size: $card-ios-title-font-size; + line-height: 1.2; color: $card-ios-title-text-color; } @@ -102,7 +103,7 @@ ion-card { } h2 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.6rem; font-weight: normal; } @@ -111,14 +112,14 @@ ion-card { h4, h5, h6 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.4rem; font-weight: normal; } p { - font-size: 1.4rem; margin: 0 0 2px; + font-size: 1.4rem; color: $card-ios-text-color; } diff --git a/ionic/components/card/card.md.scss b/ionic/components/card/card.md.scss index 195a9d8632..14a9320382 100644 --- a/ionic/components/card/card.md.scss +++ b/ionic/components/card/card.md.scss @@ -21,7 +21,7 @@ $card-md-avatar-size: 4rem !default; $card-md-thumbnail-size: 8rem !default; $card-md-background-color: $list-md-background-color !default; -$card-md-box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12) !default; +$card-md-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12) !default; $card-md-border-radius: 2px !default; $card-md-font-size: 1.4rem !default; $card-md-line-height: 1.5 !default; @@ -39,11 +39,11 @@ $card-md-header-color: #222 !default; ion-card { margin: $card-md-margin-top $card-md-margin-right $card-md-margin-bottom $card-md-margin-left; + border-radius: $card-md-border-radius; font-size: $card-md-font-size; background: $card-md-background-color; box-shadow: $card-md-box-shadow; - border-radius: $card-md-border-radius; ion-list { margin-bottom: 0; @@ -58,12 +58,12 @@ ion-card { > .item:last-child, > ion-item-sliding:last-child .item { - border-bottom: none; + border-bottom: 0; } } .item-inner { - border: none; + border: 0; } ion-card-content { @@ -90,10 +90,10 @@ ion-card { ion-card-title { display: block; - line-height: 1.2; - padding: $card-md-title-padding; margin: $card-md-title-margin; + padding: $card-md-title-padding; font-size: $card-md-title-font-size; + line-height: 1.2; color: $card-md-title-text-color; } @@ -105,7 +105,7 @@ ion-card { } h2 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.6rem; font-weight: normal; color: $card-md-text-color; @@ -115,17 +115,17 @@ ion-card { h4, h5, h6 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.4rem; font-weight: normal; color: $card-md-text-color; } p { - font-size: 1.4rem; margin: 0 0 2px; - line-height: 1.5; + font-size: 1.4rem; font-weight: normal; + line-height: 1.5; color: $card-md-text-color; } diff --git a/ionic/components/card/card.scss b/ionic/components/card/card.scss index 8d6024b3eb..0a3655a5ae 100644 --- a/ionic/components/card/card.scss +++ b/ionic/components/card/card.scss @@ -17,8 +17,8 @@ ion-card img { ion-card-header { display: block; overflow: hidden; - white-space: nowrap; text-overflow: ellipsis; + white-space: nowrap; } ion-card-content { diff --git a/ionic/components/card/card.wp.scss b/ionic/components/card/card.wp.scss index 471abc4702..24ebcf1faf 100644 --- a/ionic/components/card/card.wp.scss +++ b/ionic/components/card/card.wp.scss @@ -21,7 +21,8 @@ $card-wp-avatar-size: 4rem !default; $card-wp-thumbnail-size: 8rem !default; $card-wp-background-color: $list-wp-background-color !default; -$card-wp-box-shadow: 0px 1px 1px 1px rgba(0, 0, 0, 0.2) !default; +$card-wp-box-shadow-color: rgba(0, 0, 0, .2) !default; +$card-wp-box-shadow: 0 1px 1px 1px $card-wp-box-shadow-color !default; $card-wp-border-radius: 1px !default; $card-wp-font-size: 1.4rem !default; $card-wp-line-height: 1.5 !default; @@ -29,7 +30,7 @@ $card-wp-line-height: 1.5 !default; $card-wp-text-color: #222 !default; $card-wp-title-font-size: 2.4rem !default; $card-wp-title-padding: 8px 0 8px 0 !default; -$card-wp-title-margin: 2px 0 2px !default; +$card-wp-title-margin: 2px 0 !default; $card-wp-title-text-color: #222 !default; $card-wp-header-font-size: 1.6rem !default; @@ -39,10 +40,10 @@ $card-wp-header-color: #222 !default; ion-card { margin: $card-wp-margin-top $card-wp-margin-right $card-wp-margin-bottom $card-wp-margin-left; + border-radius: $card-wp-border-radius; font-size: $card-wp-font-size; background: $card-wp-background-color; - border-radius: $card-wp-border-radius; box-shadow: $card-wp-box-shadow; ion-list { @@ -58,12 +59,12 @@ ion-card { > .item:last-child, > ion-item-sliding:last-child .item { - border-bottom: none; + border-bottom: 0; } } .item-inner { - border: none; + border: 0; } ion-card-content { @@ -90,10 +91,10 @@ ion-card { ion-card-title { display: block; - line-height: 1.2; - padding: $card-wp-title-padding; margin: $card-wp-title-margin; + padding: $card-wp-title-padding; font-size: $card-wp-title-font-size; + line-height: 1.2; color: $card-wp-title-text-color; } @@ -105,7 +106,7 @@ ion-card { } h2 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.6rem; font-weight: normal; color: $card-wp-text-color; @@ -115,17 +116,17 @@ ion-card { h4, h5, h6 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.4rem; font-weight: normal; color: $card-wp-text-color; } p { - font-size: 1.4rem; margin: 0 0 2px; - line-height: 1.5; + font-size: 1.4rem; font-weight: normal; + line-height: 1.5; color: $card-wp-text-color; } diff --git a/ionic/components/checkbox/checkbox.ios.scss b/ionic/components/checkbox/checkbox.ios.scss index 10e0974e4f..a7832aa508 100644 --- a/ionic/components/checkbox/checkbox.ios.scss +++ b/ionic/components/checkbox/checkbox.ios.scss @@ -19,7 +19,7 @@ $checkbox-ios-icon-checkmark-color: $background-ios-color !default; $checkbox-ios-media-margin: $item-ios-padding-media-top $item-ios-padding-right $item-ios-padding-media-bottom 2px !default; -$checkbox-ios-disabled-opacity: 0.3 !default; +$checkbox-ios-disabled-opacity: .3 !default; ion-checkbox { @@ -35,9 +35,9 @@ ion-checkbox { position: relative; width: $checkbox-ios-icon-size; height: $checkbox-ios-icon-size; - border-radius: $checkbox-ios-icon-border-radius; border-width: $checkbox-ios-icon-border-width; border-style: $checkbox-ios-icon-border-style; + border-radius: $checkbox-ios-icon-border-radius; border-color: $checkbox-ios-icon-border-color-off; background-color: $checkbox-ios-background-color-off; } @@ -47,8 +47,8 @@ ion-checkbox { // ----------------------------------------- .checkbox-checked { - background-color: $checkbox-ios-background-color-on; border-color: $checkbox-ios-icon-border-color-on; + background-color: $checkbox-ios-background-color-on; } @@ -57,15 +57,15 @@ ion-checkbox { .checkbox-checked .checkbox-inner { position: absolute; - border-width: $checkbox-ios-icon-checkmark-width; - border-style: $checkbox-ios-icon-checkmark-style; - border-color: $checkbox-ios-icon-checkmark-color; top: 4px; left: 7px; width: 4px; height: 9px; - border-left: none; - border-top: none; + border-width: $checkbox-ios-icon-checkmark-width; + border-top-width: 0; + border-left-width: 0; + border-style: $checkbox-ios-icon-checkmark-style; + border-color: $checkbox-ios-icon-checkmark-color; transform: rotate(45deg); } @@ -96,8 +96,8 @@ ion-checkbox { @mixin checkbox-theme-ios($color-name, $bg-on) { ion-checkbox[#{$color-name}] .checkbox-checked { - background-color: $bg-on; border-color: $bg-on; + background-color: $bg-on; .checkbox-inner { border-color: color-inverse($bg-on); diff --git a/ionic/components/checkbox/checkbox.md.scss b/ionic/components/checkbox/checkbox.md.scss index 8c50b78c0a..d8ed7fab11 100644 --- a/ionic/components/checkbox/checkbox.md.scss +++ b/ionic/components/checkbox/checkbox.md.scss @@ -9,7 +9,7 @@ $checkbox-md-border-bottom-color: $list-md-border-color !default; $checkbox-md-padding: $item-md-padding-top ($item-md-padding-right / 2) $item-md-padding-bottom 0 !default; $checkbox-md-margin: 0 !default; $checkbox-md-media-margin: $item-md-padding-media-top 36px $item-md-padding-media-bottom 4px !default; -$checkbox-md-disabled-opacity: 0.3 !default; +$checkbox-md-disabled-opacity: .3 !default; $checkbox-md-icon-background-color-off: $list-md-background-color !default; $checkbox-md-icon-background-color-on: map-get($colors-md, primary) !default; @@ -26,7 +26,7 @@ $checkbox-md-icon-border-color-off: darken($list-md-border-color, 40%) !def $checkbox-md-icon-border-color-on: map-get($colors-md, primary) !default; $checkbox-md-transition-duration: 280ms !default; -$checkbox-md-transition-easing: cubic-bezier(.4,0,.2,1) !default; +$checkbox-md-transition-easing: cubic-bezier(.4, 0, .2, 1) !default; ion-checkbox { @@ -42,14 +42,14 @@ ion-checkbox { position: relative; width: $checkbox-md-icon-size; height: $checkbox-md-icon-size; - border-radius: $checkbox-md-icon-border-radius; border-width: $checkbox-md-icon-border-width; border-style: $checkbox-md-icon-border-style; + border-radius: $checkbox-md-icon-border-radius; border-color: $checkbox-md-icon-border-color-off; background-color: $checkbox-md-icon-background-color-off; - transition-property: background; transition-duration: $checkbox-md-transition-duration; + transition-property: background; transition-timing-function: $checkbox-md-transition-easing; } @@ -58,8 +58,8 @@ ion-checkbox { // ----------------------------------------- .checkbox-checked { - background-color: $checkbox-md-icon-background-color-on; border-color: $checkbox-md-icon-border-color-on; + background-color: $checkbox-md-icon-background-color-on; } @@ -68,15 +68,15 @@ ion-checkbox { .checkbox-checked .checkbox-inner { position: absolute; - border-width: $checkbox-md-icon-checkmark-width; - border-style: $checkbox-md-icon-checkmark-style; - border-color: $checkbox-md-icon-checkmark-color; top: 0; left: 4px; width: 5px; height: 10px; - border-left: none; - border-top: none; + border-width: $checkbox-md-icon-checkmark-width; + border-top-width: 0; + border-left-width: 0; + border-style: $checkbox-md-icon-checkmark-style; + border-color: $checkbox-md-icon-checkmark-color; transform: rotate(45deg); } @@ -111,8 +111,8 @@ ion-checkbox + .item-inner ion-label { @mixin checkbox-theme-md($color-name, $bg-on) { ion-checkbox[#{$color-name}] .checkbox-checked { - background-color: $bg-on; border-color: $bg-on; + background-color: $bg-on; .checkbox-inner { border-color: color-inverse($bg-on); diff --git a/ionic/components/checkbox/checkbox.wp.scss b/ionic/components/checkbox/checkbox.wp.scss index d18c2aedfa..1a1c26d086 100644 --- a/ionic/components/checkbox/checkbox.wp.scss +++ b/ionic/components/checkbox/checkbox.wp.scss @@ -9,7 +9,7 @@ $checkbox-wp-border-bottom-color: $list-wp-border-color !default; $checkbox-wp-padding: $item-wp-padding-top ($item-wp-padding-right / 2) $item-wp-padding-bottom 0 !default; $checkbox-wp-margin: 0 !default; $checkbox-wp-media-margin: $item-wp-padding-media-top $item-wp-padding-right $item-wp-padding-media-bottom 4px !default; -$checkbox-wp-disabled-opacity: 0.3 !default; +$checkbox-wp-disabled-opacity: .3 !default; $checkbox-wp-icon-background-color-off: $list-wp-background-color !default; $checkbox-wp-icon-background-color-on: map-get($colors-wp, primary) !default; @@ -22,7 +22,7 @@ $checkbox-wp-icon-checkmark-color: $background-wp-color !default; $checkbox-wp-icon-border-width: 2px !default; $checkbox-wp-icon-border-style: solid !default; $checkbox-wp-icon-border-radius: 0 !default; -$checkbox-wp-icon-border-color-off: #333333 !default; +$checkbox-wp-icon-border-color-off: #333 !default; $checkbox-wp-icon-border-color-on: map-get($colors-wp, primary) !default; @@ -39,9 +39,9 @@ ion-checkbox { position: relative; width: $checkbox-wp-icon-size; height: $checkbox-wp-icon-size; - border-radius: $checkbox-wp-icon-border-radius; border-width: $checkbox-wp-icon-border-width; border-style: $checkbox-wp-icon-border-style; + border-radius: $checkbox-wp-icon-border-radius; border-color: $checkbox-wp-icon-border-color-off; background-color: $checkbox-wp-icon-background-color-off; } @@ -51,8 +51,8 @@ ion-checkbox { // ----------------------------------------- .checkbox-checked { - background-color: $checkbox-wp-icon-background-color-on; border-color: $checkbox-wp-icon-border-color-on; + background-color: $checkbox-wp-icon-background-color-on; } @@ -61,15 +61,15 @@ ion-checkbox { .checkbox-checked .checkbox-inner { position: absolute; - border-width: $checkbox-wp-icon-checkmark-width; - border-style: $checkbox-wp-icon-checkmark-style; - border-color: $checkbox-wp-icon-checkmark-color; top: -2px; left: 3px; width: 6px; height: 12px; - border-left: none; - border-top: none; + border-width: $checkbox-wp-icon-checkmark-width; + border-top-width: 0; + border-left-width: 0; + border-style: $checkbox-wp-icon-checkmark-style; + border-color: $checkbox-wp-icon-checkmark-color; transform: rotate(45deg); } @@ -104,8 +104,8 @@ ion-checkbox + .item-inner ion-label { @mixin checkbox-theme-wp($color-name, $bg-on) { ion-checkbox[#{$color-name}] .checkbox-checked { - background-color: $bg-on; border-color: $bg-on; + background-color: $bg-on; .checkbox-inner { border-color: color-inverse($bg-on); diff --git a/ionic/components/chip/chip.ios.scss b/ionic/components/chip/chip.ios.scss index f8c7a27042..041977af13 100644 --- a/ionic/components/chip/chip.ios.scss +++ b/ionic/components/chip/chip.ios.scss @@ -3,10 +3,6 @@ // Material Design Chip // -------------------------------------------------- -ion-chip { - -} - // Generate Material Design Chip Colors // -------------------------------------------------- @@ -15,8 +11,8 @@ ion-chip { ion-chip { ion-icon[#{$color-name}] { + color: color-inverse($color-value); background-color: $color-value; - color: color-inverse($color-value) !important; } } diff --git a/ionic/components/chip/chip.md.scss b/ionic/components/chip/chip.md.scss index e2f1292f4a..06ac4fa8c7 100644 --- a/ionic/components/chip/chip.md.scss +++ b/ionic/components/chip/chip.md.scss @@ -3,10 +3,6 @@ // Material Design Chip // -------------------------------------------------- -ion-chip { - -} - // Generate Material Design Chip Colors // -------------------------------------------------- @@ -15,8 +11,8 @@ ion-chip { ion-chip { ion-icon[#{$color-name}] { + color: color-inverse($color-value); background-color: $color-value; - color: color-inverse($color-value) !important; } } diff --git a/ionic/components/chip/chip.scss b/ionic/components/chip/chip.scss index 7660d9b5bc..8046cf1941 100644 --- a/ionic/components/chip/chip.scss +++ b/ionic/components/chip/chip.scss @@ -3,33 +3,30 @@ // Chip // -------------------------------------------------- -$chip-background-color: rgba(0,0,0,0.12) !default; +$chip-background-color: rgba(0, 0, 0, .12) !default; $chip-font-size: 13px !default; $chip-height: 32px !default; $chip-border-radius: 16px !default; $chip-padding: 0 12px !default; $chip-margin: 2px 0 !default; -$chip-label-color: rgba(0,0,0,0.87) !default; - -$chip-icon-color: rgba(0,0,0,0.87) !default; +$chip-label-color: rgba(0, 0, 0, .87) !default; +$chip-icon-color: rgba(0, 0, 0, .87) !default; ion-chip { - background: $chip-background-color; - display: inline-block; - height: $chip-height; - line-height: $chip-height; - border-radius: $chip-border-radius; - padding: $chip-padding; - margin: $chip-margin; - - box-sizing: border-box; - vertical-align: middle; display: inline-flex; align-self: center; - + margin: $chip-margin; + padding: $chip-padding; + height: $chip-height; + border-radius: $chip-border-radius; font-size: $chip-font-size; font-weight: normal; + line-height: $chip-height; + background: $chip-background-color; + + vertical-align: middle; + box-sizing: border-box; ion-label { margin: 0; @@ -38,23 +35,23 @@ ion-chip { > ion-icon, > ion-avatar { + margin-left: -12px; width: 32px; height: 32px; - margin-left: -12px; - vertical-align: top; border-radius: 50%; - text-align: center; - line-height: 32px; - color: $chip-icon-color; font-size: 18px; + line-height: 32px; + text-align: center; + color: $chip-icon-color; + vertical-align: top; img { - max-width: 100%; - max-height: 100%; - width: 100%; - height: 100%; - border-radius: 50%; display: block; + width: 100%; + max-width: 100%; + height: 100%; + max-height: 100%; + border-radius: 50%; } + ion-label { @@ -68,9 +65,9 @@ ion-chip { } .button { - height: inherit; margin: 0; margin-right: -4px; + height: inherit; } ion-icon[name="close-circle"] { diff --git a/ionic/components/chip/chip.wp.scss b/ionic/components/chip/chip.wp.scss index 32abad90e3..8e0a342833 100644 --- a/ionic/components/chip/chip.wp.scss +++ b/ionic/components/chip/chip.wp.scss @@ -3,10 +3,6 @@ // Windows Chip // -------------------------------------------------- -ion-chip { - -} - // Generate Windows Chip Colors // -------------------------------------------------- @@ -15,8 +11,8 @@ ion-chip { ion-chip { ion-icon[#{$color-name}] { + color: color-inverse($color-value); background-color: $color-value; - color: color-inverse($color-value) !important; } } diff --git a/ionic/components/content/content.ios.scss b/ionic/components/content/content.ios.scss index d7eea21493..226b078936 100644 --- a/ionic/components/content/content.ios.scss +++ b/ionic/components/content/content.ios.scss @@ -4,22 +4,22 @@ // iOS Content // -------------------------------------------------- -$content-ios-outer-background-color: #efeff4 !default; +$content-ios-outer-background: #efeff4 !default; $content-ios-padding: $content-padding !default; $content-ios-margin: $content-margin !default; - +$content-ios-has-views-background: #000 !default; ion-content { background-color: $background-ios-color; } .outer-content { - background: $content-ios-outer-background-color; + background: $content-ios-outer-background; } ion-nav.has-views, ion-tab.has-views { - background: #000; + background: $content-ios-has-views-background; } diff --git a/ionic/components/grid/grid.scss b/ionic/components/grid/grid.scss index 7b85adff0d..10abcd3f23 100644 --- a/ionic/components/grid/grid.scss +++ b/ionic/components/grid/grid.scss @@ -20,12 +20,22 @@ $grid-responsive-lg-break: 1023px !default; // smaller than landscape tab flex-direction: column; ion-col { - &[width-10], &[width-20], &[width-25], &[width-33], &[width-34], &[width-50], &[width-66], &[width-67], &[width-75], &[width-80], &[width-90] { + &[width-10], + &[width-20], + &[width-25], + &[width-33], + &[width-34], + &[width-50], + &[width-66], + &[width-67], + &[width-75], + &[width-80], + &[width-90] { flex: 1; margin-bottom: ($grid-padding-width * 3) / 2; margin-left: 0; - max-width: 100%; width: 100%; + max-width: 100%; } } @@ -50,6 +60,7 @@ ion-row { &[top] { align-items: flex-start; } + &[bottom] { align-items: flex-end; } @@ -57,9 +68,11 @@ ion-row { &[center] { align-items: center; } + &[stretch] { align-items: stretch; } + &[baseline] { align-items: baseline; } @@ -71,14 +84,17 @@ ion-row + ion-row { } ion-col { - flex: 1; display: block; + flex: 1; padding: ($grid-padding-width / 2); width: 100%; + // Column Alignment + &[top] { align-self: flex-start; } + &[bottom] { align-self: flex-end; } @@ -86,84 +102,102 @@ ion-col { &[center] { align-self: center; } + &[stretch] { align-self: stretch; } + &[baseline] { align-self: baseline; } -} + // Column Offsets -/* Column Offsets */ -ion-col { &[offset-10] { margin-left: 10%; } + &[offset-20] { margin-left: 20%; } + &[offset-25] { margin-left: 25%; } - &[offset-33], &[offset-34] { + + &[offset-33], + &[offset-34] { margin-left: 33.3333%; } + &[offset-50] { margin-left: 50%; } - &[offset-66], &[offset-67] { + + &[offset-66], + &[offset-67] { margin-left: 66.6666%; } + &[offset-75] { margin-left: 75%; } + &[offset-80] { margin-left: 80%; } + &[offset-90] { margin-left: 90%; } -} + // Explicit Column Percent Sizes + // By default each grid column will evenly distribute + // across the grid. However, you can specify individual + // columns to take up a certain size of the available area -/* Explicit Column Percent Sizes */ -/* By default each grid column will evenly distribute */ -/* across the grid. However, you can specify individual */ -/* columns to take up a certain size of the available area */ -ion-col { &[width-10] { flex: 0 0 10%; max-width: 10%; } + &[width-20] { flex: 0 0 20%; max-width: 20%; } + &[width-25] { flex: 0 0 25%; max-width: 25%; } - &[width-33], &[width-34] { + + &[width-33], + &[width-34] { flex: 0 0 33.3333%; max-width: 33.3333%; } + &[width-50] { flex: 0 0 50%; max-width: 50%; } - &[width-66], &[width-67] { + + &[width-66], + &[width-67] { flex: 0 0 66.6666%; max-width: 66.6666%; } + &[width-75] { flex: 0 0 75%; max-width: 75%; } + &[width-80] { flex: 0 0 80%; max-width: 80%; } + &[width-90] { flex: 0 0 90%; max-width: 90%; @@ -171,11 +205,11 @@ ion-col { } -/* Responsive Grid Classes */ -/* Adding a class of responsive-X to a row */ -/* will trigger the width-direction to */ -/* change to column and add some margin */ -/* to any columns in the row for clearity */ +// Responsive Grid Classes +// Adding a class of responsive-X to a row +// will trigger the width-direction to +// change to column and add some margin +// to any columns in the row for clearity @include responsive-grid-break('[responsive-sm]', $grid-responsive-sm-break); @include responsive-grid-break('[responsive-md]', $grid-responsive-md-break); diff --git a/ionic/components/infinite-scroll/infinite-scroll.scss b/ionic/components/infinite-scroll/infinite-scroll.scss index 75b4c634c5..74d9780170 100644 --- a/ionic/components/infinite-scroll/infinite-scroll.scss +++ b/ionic/components/infinite-scroll/infinite-scroll.scss @@ -3,7 +3,7 @@ // Infinite Scroll // -------------------------------------------------- -$infinite-scroll-loading-margin: 0px 0px 32px 0px !default; +$infinite-scroll-loading-margin: 0 0 32px 0 !default; $infinite-scroll-loading-color: #666 !default; $infinite-scroll-loading-text-margin: 4px 32px 0 32px !default; @@ -26,9 +26,9 @@ ion-infinite-scroll-content { } .infinite-loading { - opacity: 0; - width: 100%; margin: $infinite-scroll-loading-margin; + width: 100%; + opacity: 0; } .infinite-loading-text { diff --git a/ionic/components/input/input.ios.scss b/ionic/components/input/input.ios.scss index 6f1ebe744f..7f8bfe18d0 100644 --- a/ionic/components/input/input.ios.scss +++ b/ionic/components/input/input.ios.scss @@ -7,7 +7,7 @@ $text-input-ios-background-color: $list-ios-background-color !default; $text-input-ios-input-clear-icon-width: 30px !default; -$text-input-ios-input-clear-icon-color: rgba(0, 0, 0, 0.5) !default; +$text-input-ios-input-clear-icon-color: rgba(0, 0, 0, .5) !default; $text-input-ios-input-clear-icon-svg: "" !default; $text-input-ios-input-clear-icon-size: 18px !default; @@ -35,16 +35,16 @@ $text-input-ios-input-clear-icon-size: 18px !default; .item-label-stacked .text-input, .item-label-floating .text-input { - margin-left: 0; margin-top: 8px; margin-bottom: 8px; + margin-left: 0; } .item-label-stacked ion-select, .item-label-floating ion-select { - padding-left: 0; padding-top: 8px; padding-bottom: 8px; + padding-left: 0; } .item-label-floating .text-input.cloned-input, @@ -65,10 +65,10 @@ ion-input[clearInput] { } .text-input-clear-icon { - width: $text-input-ios-input-clear-icon-width; - @include svg-background-image($text-input-ios-input-clear-icon-svg); - background-size: $text-input-ios-input-clear-icon-size; + right: ($item-ios-padding-right / 2); bottom: 0; + width: $text-input-ios-input-clear-icon-width; + background-size: $text-input-ios-input-clear-icon-size; } diff --git a/ionic/components/input/input.md.scss b/ionic/components/input/input.md.scss index 692f6951d0..fc14d77ce9 100644 --- a/ionic/components/input/input.md.scss +++ b/ionic/components/input/input.md.scss @@ -10,7 +10,7 @@ $text-input-md-hightlight-color-valid: map-get($colors-md, secondary) !defa $text-input-md-hightlight-color-invalid: map-get($colors-md, danger) !default; $text-input-md-input-clear-icon-width: 30px !default; -$text-input-md-input-clear-icon-color: #5B5B5B !default; +$text-input-md-input-clear-icon-color: #5b5b5b !default; $text-input-md-input-clear-icon-svg: "" !default; $text-input-md-input-clear-icon-size: 22px !default; @@ -37,26 +37,26 @@ $text-input-md-input-clear-icon-size: 22px !default; // Material Design Highlighted Input // -------------------------------------------------- -ion-input:after { +ion-input::after { position: absolute; - bottom: 0; right: 0; + bottom: 0; left: $item-md-padding-left; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: transparent; - content: ''; + content: ""; } -.input-has-focus:after { +.input-has-focus::after { border-bottom-color: $text-input-md-highlight-color; } -ion-input.ng-valid.input-has-value:after { +ion-input.ng-valid.input-has-value::after { border-bottom-color: $text-input-md-hightlight-color-valid; } -ion-input.ng-invalid.ng-touched:after { +ion-input.ng-invalid.ng-touched::after { border-bottom-color: $text-input-md-hightlight-color-invalid; } @@ -66,16 +66,16 @@ ion-input.ng-invalid.ng-touched:after { .item-label-stacked .text-input, .item-label-floating .text-input { - margin-left: 0; margin-top: 8px; margin-bottom: 8px; + margin-left: 0; } .item-label-stacked ion-select, .item-label-floating ion-select { - padding-left: 0; padding-top: 8px; padding-bottom: 8px; + padding-left: 0; } .item-label-floating .text-input.cloned-input { @@ -99,10 +99,10 @@ ion-input[clearInput] { } .text-input-clear-icon { - width: $text-input-md-input-clear-icon-width; - @include svg-background-image($text-input-md-input-clear-icon-svg); - background-size: $text-input-md-input-clear-icon-size; + right: ($item-md-padding-right / 2); bottom: 2px; + width: $text-input-md-input-clear-icon-width; + background-size: $text-input-md-input-clear-icon-size; } diff --git a/ionic/components/input/input.scss b/ionic/components/input/input.scss index e589b2f17a..27eb065b25 100644 --- a/ionic/components/input/input.scss +++ b/ionic/components/input/input.scss @@ -29,15 +29,16 @@ ion-textarea { // -------------------------------------------------- .text-input { + @include placeholder(); + display: inline-block; - background: transparent; - border: 0; - border-radius: 0; flex: 1; width: 92%; width: calc(100% - 10px); + border: 0; + border-radius: 0; + background: transparent; -webkit-appearance: none; - @include placeholder(); } textarea.text-input { @@ -45,7 +46,7 @@ textarea.text-input { } .text-input[disabled] { - opacity: 0.4; + opacity: .4; } @@ -92,9 +93,9 @@ input.text-input:-webkit-autofill { [next-input] { position: absolute; bottom: 1px; + padding: 0; width: 1px; height: 1px; - padding: 0; border: 0; background: transparent; pointer-events: none; diff --git a/ionic/components/input/input.wp.scss b/ionic/components/input/input.wp.scss index 32abc6f26d..aa2fc00929 100644 --- a/ionic/components/input/input.wp.scss +++ b/ionic/components/input/input.wp.scss @@ -64,17 +64,17 @@ ion-input.ng-invalid.ng-touched .text-input { .item-label-stacked .text-input, .item-label-floating .text-input { - margin-left: 0; margin-top: 8px; margin-bottom: 8px; + margin-left: 0; } .item-label-stacked ion-select, .item-label-floating ion-select { - padding-top: 0; - padding-bottom: 0; margin-top: 8px; margin-bottom: 8px; + padding-top: 0; + padding-bottom: 0; .select-icon { margin-top: 5px; @@ -106,10 +106,10 @@ ion-input[clearInput] { } .text-input-clear-icon { - width: $text-input-wp-input-clear-icon-width; - @include svg-background-image($text-input-wp-input-clear-icon-svg); - background-size: $text-input-wp-input-clear-icon-size; + right: ($item-wp-padding-right / 2); bottom: 2px; + width: $text-input-wp-input-clear-icon-width; + background-size: $text-input-wp-input-clear-icon-size; } diff --git a/ionic/components/item/item-media.scss b/ionic/components/item/item-media.scss index 0fd7391c19..9c6782fb7b 100644 --- a/ionic/components/item/item-media.scss +++ b/ionic/components/item/item-media.scss @@ -17,18 +17,18 @@ .item > ion-icon, .item-inner > ion-icon { - line-height: 1; - font-size: 2.4rem; min-height: 2.4rem; + font-size: 2.4rem; + line-height: 1; &[large] { - font-size: 3.2rem; min-height: 3.2rem; + font-size: 3.2rem; } &[small] { - font-size: 1.8rem; min-height: 1.8rem; + font-size: 1.8rem; } } @@ -43,11 +43,11 @@ ion-thumbnail { } .item-cover { - cursor: pointer; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: transparent; -} \ No newline at end of file + cursor: pointer; +} diff --git a/ionic/components/item/item-sliding.scss b/ionic/components/item/item-sliding.scss index db8698663b..0222099bee 100644 --- a/ionic/components/item/item-sliding.scss +++ b/ionic/components/item/item-sliding.scss @@ -6,8 +6,8 @@ ion-item-sliding { - display: block; position: relative; + display: block; overflow: hidden; .item { @@ -16,20 +16,20 @@ ion-item-sliding { } ion-item-options { - display: none; position: absolute; top: 0; right: 0; z-index: $z-index-item-options; + display: none; height: 100%; visibility: hidden; } ion-item-options .button { margin: 0; + height: 100%; border-radius: 0; box-shadow: none; - height: 100%; } ion-item-options:not([icon-left]) .button-icon-left { @@ -38,10 +38,11 @@ ion-item-options:not([icon-left]) .button-icon-left { .button-inner { flex-direction: column; } + ion-icon { - padding-left: 0 !important; - padding-right: 0 !important; - padding-bottom: 0.3em; + padding-right: 0; + padding-bottom: .3em; + padding-left: 0; } } @@ -52,7 +53,7 @@ ion-item-sliding.active-slide { position: relative; z-index: $z-index-item-options + 1; opacity: 1; - transition: all 300ms cubic-bezier(0.36,0.66,0.04,1); + transition: all 300ms cubic-bezier(.36, .66, .04, 1); pointer-events: none; } diff --git a/ionic/components/item/item.ios.scss b/ionic/components/item/item.ios.scss index d2819e5675..feff115035 100644 --- a/ionic/components/item/item.ios.scss +++ b/ionic/components/item/item.ios.scss @@ -26,8 +26,8 @@ $item-ios-sliding-content-background: $list-ios-background-color !default; position: relative; padding-left: $item-ios-padding-left; - font-size: $item-ios-body-text-font-size; border-radius: 0; + font-size: $item-ios-body-text-font-size; color: $list-ios-text-color; background-color: $list-ios-background-color; transition-duration: 200ms; @@ -48,17 +48,17 @@ $item-ios-sliding-content-background: $list-ios-background-color !default; h4, h5, h6 { - line-height: normal; - margin: 0 0 3px 0; + margin: 0 0 3px; font-size: 1.4rem; font-weight: normal; + line-height: normal; } p { + margin: 0 0 2px; + font-size: 1.2rem; line-height: normal; color: $item-ios-paragraph-text-color; - font-size: 1.2rem; - margin: 0 0 2px; } h2:last-child, @@ -119,15 +119,15 @@ ion-thumbnail[item-right] { } .item-button { - padding: 0 0.5em; - font-size: 1.3rem; + padding: 0 .5em; height: 24px; + font-size: 1.3rem; } .item-button.button-icon-only ion-icon, .item-button.button-icon-only { - padding: 0 1px; - } + padding: 0 1px; +} ion-avatar { min-width: $item-ios-avatar-size; @@ -158,10 +158,11 @@ button.item:not([detail-none]) .item-inner, a.item:not([detail-none]) .item-inner, .item[detail-push] .item-inner { @include ios-detail-push-icon($item-ios-detail-push-color); + + padding-right: 32px; background-repeat: no-repeat; background-position: right ($item-ios-padding-right - 2) center; background-size: 14px 14px; - padding-right: 32px; } @@ -176,8 +177,8 @@ ion-item-group { } .item:last-child .item-inner, - ion-item-sliding:last-child .item .item-inner { - border: none; + ion-item-sliding:last-child .item-inner { + border: 0; } } @@ -197,8 +198,8 @@ ion-item-divider { @each $color-name, $color-value in $colors-ios { ion-item-divider[#{$color-name}] { - background-color: $color-value; color: color-inverse($color-value); + background-color: $color-value; } } diff --git a/ionic/components/item/item.md.scss b/ionic/components/item/item.md.scss index 5b1708a204..adca25ca54 100644 --- a/ionic/components/item/item.md.scss +++ b/ionic/components/item/item.md.scss @@ -25,13 +25,13 @@ $item-md-sliding-content-background: $list-md-background-color !default; padding-right: 0; padding-left: ($item-md-padding-left); font-size: $item-md-font-size; - text-transform: none; font-weight: normal; + text-transform: none; color: $list-md-text-color; background-color: $list-md-background-color; box-shadow: none; - transition: background-color 300ms cubic-bezier(0.4, 0, 0.2, 1), transform 300ms; + transition: background-color 300ms cubic-bezier(.4, 0, .2, 1), transform 300ms; h1 { margin: 0 0 2px; @@ -40,7 +40,7 @@ $item-md-sliding-content-background: $list-md-background-color !default; } h2 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.6rem; font-weight: normal; } @@ -49,17 +49,17 @@ $item-md-sliding-content-background: $list-md-background-color !default; h4, h5, h6 { - line-height: normal; - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.4rem; font-weight: normal; + line-height: normal; } p { + margin: 0 0 2px; + font-size: 1.4rem; line-height: normal; color: $item-md-paragraph-text-color; - font-size: 1.4rem; - margin: 0 0 2px; } } @@ -93,15 +93,15 @@ ion-icon[item-right] { } .item-button { - padding: 0 0.6em; + padding: 0 .6em; height: 25px; font-size: 1.2rem; } .item-button.button-icon-only ion-icon, .item-button.button-icon-only { - padding: 0 1px; - } + padding: 0 1px; +} ion-icon[item-left] + .item-inner, ion-icon[item-left] + .item-input { @@ -149,8 +149,8 @@ ion-note { ion-item-divider { padding: $item-md-padding-top $item-md-padding-right $item-md-padding-bottom $item-md-padding-left; - background-color: $item-md-divider-background; color: $item-md-divider-color; + background-color: $item-md-divider-background; } @@ -159,8 +159,8 @@ ion-item-divider { @each $color-name, $color-value in $colors-md { ion-item-divider[#{$color-name}] { - background-color: $color-value; color: color-inverse($color-value); + background-color: $color-value; } } diff --git a/ionic/components/item/item.scss b/ionic/components/item/item.scss index 6c1ba77bc2..9598bf74d5 100644 --- a/ionic/components/item/item.scss +++ b/ionic/components/item/item.scss @@ -7,50 +7,49 @@ .item { display: flex; - justify-content: space-between; + overflow: hidden; align-items: center; + justify-content: space-between; margin: 0; padding: 0; - border: 0; width: 100%; min-height: 4.4rem; - overflow: hidden; + border: 0; - text-align: initial; font-weight: normal; line-height: normal; + text-align: initial; text-decoration: none; color: inherit; } .item-inner { display: flex; - margin: 0; - padding: 0; - border: 0; overflow: hidden; - min-height: inherit; - flex: 1; flex-direction: inherit; align-items: inherit; align-self: stretch; + margin: 0; + padding: 0; + min-height: inherit; + border: 0; } .input-wrapper { display: flex; + overflow: hidden; flex: 1; flex-direction: inherit; align-items: inherit; align-self: stretch; text-overflow: ellipsis; - overflow: hidden; } .item[no-lines], .item[no-lines] .item-inner { - border: none; + border: 0; } ion-item-group { @@ -58,15 +57,15 @@ ion-item-group { } ion-item-divider { - display: block; - min-height: 30px; - width: 100%; z-index: 1000; + display: block; + width: 100%; + min-height: 30px; &[sticky] { position: -webkit-sticky; position: sticky; - top: 0px; + top: 0; } } diff --git a/ionic/components/item/item.wp.scss b/ionic/components/item/item.wp.scss index db2a353c2c..9012b9357d 100644 --- a/ionic/components/item/item.wp.scss +++ b/ionic/components/item/item.wp.scss @@ -27,8 +27,8 @@ $item-wp-sliding-content-background: $list-wp-background-color !default; padding-right: 0; padding-left: ($item-wp-padding-left); font-size: $item-wp-font-size; - text-transform: none; font-weight: normal; + text-transform: none; color: $item-wp-body-text-color; background-color: $item-wp-body-background-color; @@ -41,7 +41,7 @@ $item-wp-sliding-content-background: $list-wp-background-color !default; } h2 { - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.6rem; font-weight: normal; } @@ -50,17 +50,17 @@ $item-wp-sliding-content-background: $list-wp-background-color !default; h4, h5, h6 { - line-height: normal; - margin: 2px 0 2px; + margin: 2px 0; font-size: 1.4rem; font-weight: normal; + line-height: normal; } p { + margin: 0 0 2px; + font-size: 1.4rem; line-height: normal; color: $item-wp-paragraph-text-color; - font-size: 1.4rem; - margin: 0 0 2px; } } @@ -94,15 +94,15 @@ ion-icon[item-right] { } .item-button { - padding: 0 0.6em; + padding: 0 .6em; height: 25px; font-size: 1.2rem; } .item-button.button-icon-only ion-icon, .item-button.button-icon-only { - padding: 0 1px; - } + padding: 0 1px; +} [text-wrap] ion-label { font-size: $item-wp-body-text-font-size; @@ -155,8 +155,8 @@ ion-note { ion-item-divider { padding: $item-wp-padding-top $item-wp-padding-right $item-wp-padding-bottom $item-wp-padding-left; - background-color: $item-wp-divider-background; color: $item-wp-divider-color; + background-color: $item-wp-divider-background; } @@ -165,8 +165,8 @@ ion-item-divider { @each $color-name, $color-value in $colors-wp { ion-item-divider[#{$color-name}] { - background-color: $color-value; color: color-inverse($color-value); + background-color: $color-value; } } diff --git a/ionic/components/item/test/sliding/main.html b/ionic/components/item/test/sliding/main.html index d98eb5b2ad..ab760d6a63 100644 --- a/ionic/components/item/test/sliding/main.html +++ b/ionic/components/item/test/sliding/main.html @@ -30,9 +30,13 @@