mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix color inheritance, core components should not contain colors
This commit is contained in:
@@ -9,10 +9,10 @@ $switch-ios-height: 32px !default;
|
||||
$switch-ios-border-width: 2px !default;
|
||||
$switch-ios-border-radius: $switch-ios-height / 2 !default;
|
||||
|
||||
$switch-ios-background-color-off: $list-background-color !default;
|
||||
$switch-ios-border-color-off: grayscale(lighten($list-border-color, 11%)) !default;
|
||||
$switch-ios-background-color-off: $list-ios-background-color !default;
|
||||
$switch-ios-border-color-off: grayscale(lighten($list-ios-border-color, 11%)) !default;
|
||||
|
||||
$switch-ios-background-color-on: color(primary) !default;
|
||||
$switch-ios-background-color-on: map-get($colors-ios, primary) !default;
|
||||
|
||||
$switch-ios-handle-width: $switch-ios-height - ($switch-ios-border-width * 2) !default;
|
||||
$switch-ios-handle-height: $switch-ios-handle-width !default;
|
||||
@@ -27,7 +27,7 @@ $switch-ios-transition-duration: 300ms !default;
|
||||
ion-switch {
|
||||
|
||||
&.item.activated {
|
||||
background: $list-background-color;
|
||||
background: $list-ios-background-color;
|
||||
}
|
||||
|
||||
media-switch {
|
||||
@@ -145,7 +145,7 @@ ion-switch {
|
||||
// Generate iOS Switch Auxiliary Colors
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $value in $colors {
|
||||
@each $color-name, $value in $colors-ios {
|
||||
|
||||
@include switch-theme-ios($color-name, $value);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// Material Design Switch
|
||||
// --------------------------------------------------
|
||||
|
||||
$switch-md-active-color: map-get($colors, primary) !default;
|
||||
$switch-md-active-color: map-get($colors-md, primary) !default;
|
||||
|
||||
$switch-md-track-width: 36px !default;
|
||||
$switch-md-track-height: 14px !default;
|
||||
@@ -13,7 +13,7 @@ $switch-md-track-background-color-on: lighten($switch-md-active-color, 25%) !
|
||||
|
||||
$switch-md-handle-width: 20px !default;
|
||||
$switch-md-handle-height: 20px !default;
|
||||
$switch-md-handle-background-color-off: $background-color !default;
|
||||
$switch-md-handle-background-color-off: $background-md-color !default;
|
||||
$switch-md-handle-background-color-on: $switch-md-active-color !default;
|
||||
$switch-md-handle-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;
|
||||
|
||||
@@ -105,7 +105,7 @@ ion-switch {
|
||||
// Generate Material Design Switch Auxiliary Colors
|
||||
// --------------------------------------------------
|
||||
|
||||
@each $color-name, $value in $colors {
|
||||
@each $color-name, $value in $colors-md {
|
||||
|
||||
@include switch-theme-md($color-name, $value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user