diff --git a/ionic/components/button/button-outline.scss b/ionic/components/button/button-outline.scss index 3c2d36dd42..fc4aade773 100644 --- a/ionic/components/button/button-outline.scss +++ b/ionic/components/button/button-outline.scss @@ -47,7 +47,7 @@ button, button[#{$color}], [button][#{$color}] { - $fg-color: darken-or-lighten($value); + $fg-color: darken-or-lighten($value, 5%); @include button-outline($fg-color); } diff --git a/ionic/components/button/button.scss b/ionic/components/button/button.scss index 35a6ec5db4..6f7af095a3 100644 --- a/ionic/components/button/button.scss +++ b/ionic/components/button/button.scss @@ -14,7 +14,7 @@ $button-round-padding: 0 2.6rem !default; $button-color: color(primary) !default; $button-color-activated: darken-or-lighten($button-color) !default; -$button-text-color: inverse(primary) !default; +$button-text-color: inverse($button-color) !default; $button-hover-opacity: 0.88 !default; @@ -112,7 +112,6 @@ button, padding: $button-round-padding; } - &.disabled, &[disabled] { opacity: 0.4; cursor: default !important; @@ -121,17 +120,15 @@ button, } +a[button] { + text-decoration: none; +} .padding > button[block]:first-child, .padding > [button][block]:first-child { margin-top: 0; } -a[button] { - color: inherit; - text-decoration: none; -} - // Default Button Color Mixin // -------------------------------------------------- @@ -156,7 +153,7 @@ a[button] { $bg-color: $value; $bg-color-activated: darken-or-lighten($bg-color); - $text-color: inverse($color); + $text-color: inverse($bg-color); @include button-default($bg-color, $bg-color-activated, $text-color); } diff --git a/ionic/components/button/extensions/material.scss b/ionic/components/button/extensions/material.scss index af7bb0ae4e..4587c39598 100644 --- a/ionic/components/button/extensions/material.scss +++ b/ionic/components/button/extensions/material.scss @@ -12,7 +12,6 @@ $button-md-border-radius: 3px !default; [mode="md"] button, [mode="md"] [button] { - border: 0; border-radius: $button-md-border-radius; min-height: $button-md-min-height; @@ -32,18 +31,6 @@ $button-md-border-radius: 3px !default; box-shadow: $button-md-box-shadow-active; } - &[icon] { - //font-size: $button-icon-size; - } - - &[large][icon] { - //font-size: $button-icon-large-size; - } - - &[small][icon] { - //font-size: $button-icon-small-size; - } - &[full] { border-radius: 0; } @@ -51,40 +38,63 @@ $button-md-border-radius: 3px !default; &[outline] { box-shadow: none; - .md-ripple { + /*.md-ripple { &.is-visible { opacity: 0.2; } - } + }*/ + } + + &[round] { + border-radius: $button-round-border-radius; + padding: $button-round-padding; + } + + &[large] { + padding: 0 $button-large-padding; + min-width: ($button-large-padding * 4); + min-height: $button-large-height; + font-size: $button-large-font-size; + } + + &[small] { + padding: 0 $button-small-padding; + min-width: ($button-small-padding * 3); + min-height: $button-small-height; + font-size: $button-small-font-size; } &[fab] { border-radius: 50%; } - @each $color, $value in $colors { + + // Generate iOS Checkbox Auxiliary Colors + // -------------------------------------------------- + + @each $color, $value in { &[#{$color}] { @if lightness(get-color($color, base)) < 80 { .md-ripple { - background-color: white; + //background-color: white; } } &.activated { opacity: 1; - background-color: get-color($color, base); + //background-color: get-color($color, base); } &[outline] { @if lightness(get-color($color, base)) >= 80 { .md-ripple { - background-color: black; + //background-color: black; } } @else { .md-ripple { - background-color: get-color($color, base); + //background-color: get-color($color, base); } } @@ -97,8 +107,8 @@ $button-md-border-radius: 3px !default; } opacity: 1; - background: transparent; - color: $fg-color; + //background: transparent; + //color: $fg-color; } } @@ -107,31 +117,12 @@ $button-md-border-radius: 3px !default; &:hover, &.hover { - background-color: rgba(158, 158, 158, 0.1); + //background-color: rgba(158, 158, 158, 0.1); } &.activated { - background-color: rgba(158, 158, 158, 0.2); + //background-color: rgba(158, 158, 158, 0.2); } } - - &[round] { - border-radius: $button-round-border-radius; - padding: $button-round-padding; - } - - &[large] { - padding: 0 $button-large-padding; - min-width: ($button-large-padding * 4); - min-height: $button-large-height; - font-size: $button-large-font-size; - } - - &[small] { - padding: 0 $button-small-padding; - min-width: ($button-small-padding * 3); - min-height: $button-small-height; - font-size: $button-small-font-size; - } } } } diff --git a/ionic/components/checkbox/checkbox.scss b/ionic/components/checkbox/checkbox.scss index 00bc71b453..8185a47c70 100644 --- a/ionic/components/checkbox/checkbox.scss +++ b/ionic/components/checkbox/checkbox.scss @@ -11,5 +11,5 @@ .checkbox[aria-disabled=true] { pointer-events: none; opacity: 0.5; - color: gray; + color: $subdued-text-color; } diff --git a/ionic/components/checkbox/extensions/ios.scss b/ionic/components/checkbox/extensions/ios.scss index 2415604617..2bcc45004f 100644 --- a/ionic/components/checkbox/extensions/ios.scss +++ b/ionic/components/checkbox/extensions/ios.scss @@ -3,8 +3,8 @@ // -------------------------------------------------- $checkbox-ios-icon-size: 21px !default; -$checkbox-ios-bg-color-off: $background-color !default; -$checkbox-ios-border-color-off: $border-color !default; +$checkbox-ios-bg-color-off: $list-background-color !default; +$checkbox-ios-border-color-off: $list-border-color !default; $checkbox-ios-bg-color-on: color(primary) !default; $checkbox-ios-border-color-on: color(primary) !default; $checkbox-ios-checkmark-color-on: $background-color !default; @@ -45,9 +45,9 @@ $checkbox-ios-checkmark-color-on: $background-color !default; // iOS Checkbox Color Mixin // -------------------------------------------------- -@mixin checkbox-theme-ios($color, $bg-on) { +@mixin checkbox-theme-ios($color-name, $bg-on) { - .checkbox[mode=ios][#{$color}] { + .checkbox[mode=ios][#{$color-name}] { &[aria-checked=true] .checkbox-icon { background-color: $bg-on; @@ -58,11 +58,12 @@ $checkbox-ios-checkmark-color-on: $background-color !default; } + // Generate iOS Checkbox Auxiliary Colors // -------------------------------------------------- -@each $color, $value in auxiliary-colors() { +@each $color-name, $value in auxiliary-colors() { - @include checkbox-theme-ios($color, $value); + @include checkbox-theme-ios($color-name, $value); } diff --git a/ionic/components/checkbox/extensions/material.scss b/ionic/components/checkbox/extensions/material.scss index 3c559cafef..9d5547943e 100644 --- a/ionic/components/checkbox/extensions/material.scss +++ b/ionic/components/checkbox/extensions/material.scss @@ -1,38 +1,69 @@ -// Material Design Checkbox +// Material Design Checkbox Structure // -------------------------------------------------- -$checkbox-md-icon-size: 24px !default; -$checkbox-md-background-color: get-color(primary, base) !default; -$checkbox-md-foreground-color: get-color(primary, inverse) !default; +$checkbox-md-icon-size: 21px !default; +$checkbox-md-bg-color-off: $list-background-color !default; +$checkbox-md-border-color-off: $list-border-color !default; +$checkbox-md-bg-color-on: color(primary) !default; +$checkbox-md-border-color-on: color(primary) !default; +$checkbox-md-checkmark-color-on: $background-color !default; -.checkbox[mode="md"] { +.checkbox[mode=md] { .checkbox-icon { position: relative; width: $checkbox-md-icon-size; height: $checkbox-md-icon-size; - border-radius: $checkbox-md-icon-size / 2; - background-color: $checkbox-md-foreground-color; - border: 1px solid $checkbox-md-background-color; + border-radius: 50%; + border: 1px solid $checkbox-md-border-color-off; + background-color: $checkbox-md-bg-color-off; } &[aria-checked=true] .checkbox-icon { - background-color: $checkbox-md-background-color; + background-color: $checkbox-md-bg-color-on; + border-color: $checkbox-md-border-color-on; + } - &::after { - position: absolute; - border: 1px solid $checkbox-md-foreground-color; - top: 3px; - left: 8px; - width: 5px; - height: 12px; - border-left: none; - border-top: none; - content: ''; - transform: rotate(45deg); - } + &[aria-checked=true] .checkbox-icon::after { + position: absolute; + border: 1px solid $checkbox-md-checkmark-color-on; + top: 3px; + left: 7px; + width: 4px; + height: 9px; + border-left: none; + border-top: none; + content: ''; + transform: rotate(45deg); } } + + +// Material Design Checkbox Color Mixin +// -------------------------------------------------- + +@mixin checkbox-theme-md($color-name, $bg-on) { + + .checkbox[mode=md][#{$color-name}] { + + &[aria-checked=true] .checkbox-icon { + background-color: $bg-on; + border-color: $bg-on; + } + + } + +} + + +// Generate Material Design Checkbox Auxiliary Colors +// -------------------------------------------------- + +@each $color-name, $value in auxiliary-colors() { + + @include checkbox-theme-md($color-name, $value); + +} diff --git a/ionic/components/item/extensions/ios.scss b/ionic/components/item/extensions/ios.scss index 04bc251e04..4f1ccce9d3 100644 --- a/ionic/components/item/extensions/ios.scss +++ b/ionic/components/item/extensions/ios.scss @@ -2,7 +2,7 @@ // iOS Item // -------------------------------------------------- -$item-ios-border-color: #c8c7cc !default; +$item-ios-border-color: $list-border-color !default; $item-ios-font-size: 1.6rem !default; $item-ios-padding-top: 13px !default; @@ -15,7 +15,8 @@ $item-ios-padding-media-bottom: 11px !default; $item-ios-avatar-size: 3.6rem !default; $item-ios-thumbnail-size: 5.6rem !default; -$item-ios-note-color: #999 !default; +$item-ios-note-color: $item-ios-border-color !default; +$item-ios-forward-icon-color: $item-ios-border-color !default; .list[mode="ios"] { @@ -73,7 +74,7 @@ $item-ios-note-color: #999 !default; icon[forward] { font-size: 2rem; - color: #cfcfcf; + color: $item-ios-forward-icon-color; } button { @@ -115,46 +116,3 @@ $item-ios-note-color: #999 !default; } -/* -.list[mode="ios"] { - margin-top: -1px; - - .item { - background: $item-ios-background-color; - min-height: $item-ios-min-height; - padding-left: $item-ios-padding-left; - - .item-media + .item-content { - margin-left: $item-ios-padding-left; - } - - .item-content { - min-height: $item-ios-min-height; - padding: 0; - } - - .item:last-of-type .item-content:after { - background: none; - } - - .item-accessory { - color: $item-ios-accessory-color; - } - - .item-subtitle { - width: 100%; - color: #808080; - } - .item-full { - // No left ios-style padding - padding-left: 0; - - button { - width: 100%; - font-size: 1.3em; - } - } - } - -} -*/ diff --git a/ionic/components/item/extensions/material.scss b/ionic/components/item/extensions/material.scss index d5f7689e61..d53c3cb676 100644 --- a/ionic/components/item/extensions/material.scss +++ b/ionic/components/item/extensions/material.scss @@ -2,7 +2,7 @@ // Material Design Item // -------------------------------------------------- -$item-md-border-color: #c8c7cc !default; +$item-md-border-color: $list-border-color !default; $item-md-font-size: 1.6rem !default; $item-md-padding-top: 13px !default; @@ -15,7 +15,8 @@ $item-md-padding-media-bottom: 11px !default; $item-md-avatar-size: 4rem !default; $item-md-thumbnail-size: 8rem !default; -$item-md-note-color: #999 !default; +$item-md-note-color: $item-md-border-color !default; +$item-md-forward-icon-color: $item-md-border-color !default; .list[mode="md"] { @@ -73,7 +74,7 @@ $item-md-note-color: #999 !default; icon[forward] { font-size: 2rem; - color: #cfcfcf; + color: $item-md-forward-icon-color; } button { diff --git a/ionic/components/item/item.scss b/ionic/components/item/item.scss index ef9aee1898..b0d6d834a9 100644 --- a/ionic/components/item/item.scss +++ b/ionic/components/item/item.scss @@ -15,6 +15,9 @@ border: 0; min-height: 4.4rem; text-align: initial; + + background-color: $list-background-color; + color: $list-text-color; } a.item, diff --git a/ionic/components/popup/extensions/ios.scss b/ionic/components/popup/extensions/ios.scss index 07e0a41603..3430388022 100644 --- a/ionic/components/popup/extensions/ios.scss +++ b/ionic/components/popup/extensions/ios.scss @@ -2,8 +2,9 @@ // iOS Popups // -------------------------------------------------- -$popup-ios-border-radius: 13px !default; -$popup-ios-bg-color: #f8f8f8 !default; +$popup-ios-border-radius: 13px !default; +$popup-ios-bg-color: #f8f8f8 !default; +$popup-ios-button-text-color: color(primary) !default; .popup[mode="ios"] { @@ -25,9 +26,9 @@ $popup-ios-bg-color: #f8f8f8 !default; padding: 0; min-height: 0; - .button { - min-height: 42px; - color: get-color('primary', base); + button { + background-color: transparent; + color: $popup-ios-button-text-color; font-size: 14px; &:last-child { diff --git a/ionic/components/popup/popup.scss b/ionic/components/popup/popup.scss index 4e721d9e22..64c1c747c4 100644 --- a/ionic/components/popup/popup.scss +++ b/ionic/components/popup/popup.scss @@ -46,7 +46,6 @@ ion-popup { .popup-head { padding: 15px 10px; - border-bottom: 1px solid #eee; text-align: center; } @@ -74,7 +73,7 @@ h3.popup-title { padding: 10px; min-height: $popup-button-min-height + 20; - .button { + button { flex: 1; display: block; min-height: $popup-button-min-height; diff --git a/ionic/components/popup/popup.ts b/ionic/components/popup/popup.ts index 270c54c9c6..a7fe4bdf81 100644 --- a/ionic/components/popup/popup.ts +++ b/ionic/components/popup/popup.ts @@ -27,7 +27,7 @@ export class Popup extends Overlay { if (typeof context === 'string') { context = { title: context - } + }; } let button = { text: 'OK', @@ -139,7 +139,7 @@ const OVERLAY_TYPE = 'popup'; '' + '' + '
' + '', directives: [formDirectives, CSSClass, NgIf, NgFor] diff --git a/ionic/components/radio/extensions/ios.scss b/ionic/components/radio/extensions/ios.scss index 85f9b69b67..b479884ec1 100644 --- a/ionic/components/radio/extensions/ios.scss +++ b/ionic/components/radio/extensions/ios.scss @@ -2,7 +2,7 @@ // iOS Radio // -------------------------------------------------- -$radio-ios-foreground-color: get-color(primary, base) !default; +$radio-ios-active-color: color(primary) !default; .radio[mode="ios"] { @@ -13,29 +13,51 @@ $radio-ios-foreground-color: get-color(primary, base) !default; height: 21px; } - &[aria-checked=true] .radio-icon { - border-color: $radio-ios-foreground-color; - - &::after { - position: absolute; - border: 2px solid $radio-ios-foreground-color; - top: 3px; - left: 7px; - width: 4px; - height: 10px; - border-left: none; - border-top: none; - content: ''; - transform: rotate(45deg); - } + &[aria-checked=true] .radio-icon::after { + position: absolute; + border: 2px solid $radio-ios-active-color; + top: 3px; + left: 7px; + width: 4px; + height: 10px; + border-left: none; + border-top: none; + content: ''; + transform: rotate(45deg); } &[aria-checked=true] { - color: $radio-ios-foreground-color; - } - - .input-label { - color: inherit; + color: $radio-ios-active-color; } } + + +// iOS Radio Color Mixin +// -------------------------------------------------- + +@mixin radio-theme-ios($color-name, $color-value) { + + .radio[mode=ios][#{$color-name}] { + + &[aria-checked=true] .radio-icon::after { + border-color: $color-value; + } + + &[aria-checked=true] { + color: $color-value; + } + + } + +} + + +// Generate iOS Radio Auxiliary Colors +// -------------------------------------------------- + +@each $color-name, $color-value in auxiliary-colors() { + + @include radio-theme-ios($color-name, $color-value); + +} diff --git a/ionic/components/radio/radio.scss b/ionic/components/radio/radio.scss index 07fd5f1456..f319a42b3a 100644 --- a/ionic/components/radio/radio.scss +++ b/ionic/components/radio/radio.scss @@ -2,12 +2,14 @@ // Radio // -------------------------------------------------- + .radio { cursor: pointer; @include user-select-none(); } .radio[aria-disabled=true] { + pointer-events: none; opacity: 0.5; - color: gray; + color: $subdued-text-color; } diff --git a/ionic/components/radio/test/basic/main.html b/ionic/components/radio/test/basic/main.html index d09a808907..91ff5830fc 100644 --- a/ionic/components/radio/test/basic/main.html +++ b/ionic/components/radio/test/basic/main.html @@ -20,8 +20,12 @@ Banana -