a zip code crypto-currency system good for red ONLY

toggle.wp.scss 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. @import "../../themes/ionic.globals.wp";
  2. // Windows Toggle
  3. // --------------------------------------------------
  4. /// @prop - Color of the toggle
  5. $toggle-wp-inactive-color: #323232 !default;
  6. /// @prop - Color of the checked toggle
  7. $toggle-wp-active-color: color($colors-wp, primary) !default;
  8. /// @prop - Width of the toggle track
  9. $toggle-wp-track-width: 40px !default;
  10. /// @prop - Height of the toggle track
  11. $toggle-wp-track-height: 18px !default;
  12. /// @prop - Background color of the toggle track
  13. $toggle-wp-track-background-color-off: transparent !default;
  14. /// @prop - Background color of the checked toggle track
  15. $toggle-wp-track-background-color-on: $toggle-wp-active-color !default;
  16. /// @prop - Border width of the toggle track
  17. $toggle-wp-track-border-width: 2px !default;
  18. /// @prop - Border color of the toggle track
  19. $toggle-wp-track-border-color-off: $toggle-wp-inactive-color !default;
  20. /// @prop - Border color of the checked toggle track
  21. $toggle-wp-track-border-color-on: $toggle-wp-active-color !default;
  22. /// @prop - Width of the toggle handle
  23. $toggle-wp-handle-width: 10px !default;
  24. /// @prop - Height of the toggle handle
  25. $toggle-wp-handle-height: 10px !default;
  26. /// @prop - Top of the toggle handle
  27. $toggle-wp-handle-top: 2px !default;
  28. /// @prop - Left of the toggle handle
  29. $toggle-wp-handle-left: 2px !default;
  30. /// @prop - Border radius of the toggle handle
  31. $toggle-wp-handle-border-radius: 50% !default;
  32. /// @prop - Background color of the toggle handle
  33. $toggle-wp-handle-background-color-off: $toggle-wp-inactive-color !default;
  34. /// @prop - Background color of the checked toggle handle
  35. $toggle-wp-handle-background-color-on: color-contrast($colors-wp, $toggle-wp-active-color) !default;
  36. /// @prop - Margin of the toggle
  37. $toggle-wp-media-margin: 0 !default;
  38. /// @prop - Transition duration of the toggle icon
  39. $toggle-wp-transition-duration: 300ms !default;
  40. /// @prop - Opacity of the disabled toggle
  41. $toggle-wp-disabled-opacity: .3 !default;
  42. // deprecated
  43. $toggle-wp-item-left-padding: null !default;
  44. /// @prop - Padding top of the toggle positioned on the start in an item
  45. $toggle-wp-item-start-padding-top: 12px !default;
  46. /// @prop - Padding end of the toggle positioned on the start in an item
  47. $toggle-wp-item-start-padding-end: 18px !default;
  48. /// @prop - Padding bottom of the toggle positioned on the start in an item
  49. $toggle-wp-item-start-padding-bottom: 12px !default;
  50. /// @prop - Padding start the toggle positioned on the start in an item
  51. $toggle-wp-item-start-padding-start: 2px !default;
  52. // deprecated
  53. $toggle-wp-item-right-padding: null !default;
  54. /// @prop - Padding top of the toggle positioned on the end in an item
  55. $toggle-wp-item-end-padding-top: 12px !default;
  56. /// @prop - Padding end of the toggle positioned on the end in an item
  57. $toggle-wp-item-end-padding-end: ($item-wp-padding-end / 2) !default;
  58. /// @prop - Padding bottom of the toggle positioned on the end in an item
  59. $toggle-wp-item-end-padding-bottom: 12px !default;
  60. /// @prop - Padding start of the toggle positioned on the end in an item
  61. $toggle-wp-item-end-padding-start: $item-wp-padding-start !default;
  62. // Windows Toggle
  63. // -----------------------------------------
  64. .toggle-wp {
  65. position: relative;
  66. width: $toggle-wp-track-width;
  67. height: $toggle-wp-track-height;
  68. box-sizing: content-box;
  69. contain: strict;
  70. }
  71. // Windows Toggle Background Track: Unchecked
  72. // -----------------------------------------
  73. .toggle-wp .toggle-icon {
  74. @include border-radius($toggle-wp-track-height);
  75. position: relative;
  76. display: block;
  77. width: 100%;
  78. height: 100%;
  79. border: $toggle-wp-track-border-width solid $toggle-wp-track-border-color-off;
  80. background-color: $toggle-wp-track-background-color-off;
  81. pointer-events: none;
  82. contain: strict;
  83. }
  84. // Windows Toggle Inner Knob: Unchecked
  85. // -----------------------------------------
  86. .toggle-wp .toggle-inner {
  87. @include position($toggle-wp-handle-top, null, null, $toggle-wp-handle-left);
  88. @include border-radius($toggle-wp-handle-border-radius);
  89. position: absolute;
  90. width: $toggle-wp-handle-width;
  91. height: $toggle-wp-handle-height;
  92. background-color: $toggle-wp-handle-background-color-off;
  93. transition-duration: $toggle-wp-transition-duration;
  94. transition-property: transform, background-color;
  95. will-change: transform, background-color;
  96. }
  97. // Windows Toggle Background Track: Checked
  98. // -----------------------------------------
  99. .toggle-wp.toggle-checked .toggle-icon {
  100. border-color: $toggle-wp-track-background-color-on;
  101. background-color: $toggle-wp-track-background-color-on;
  102. }
  103. // Windows Toggle Inner Knob: Checked
  104. // -----------------------------------------
  105. .toggle-wp.toggle-checked .toggle-inner {
  106. @include transform(translate3d($toggle-wp-track-width - $toggle-wp-handle-width - ($toggle-wp-track-border-width * 2) - ($toggle-wp-handle-left * 2), 0, 0));
  107. background-color: $toggle-wp-handle-background-color-on;
  108. }
  109. // Windows Toggle: Disabled
  110. // -----------------------------------------
  111. .toggle-wp.toggle-disabled,
  112. .item-wp.item-toggle-disabled ion-label {
  113. opacity: $toggle-wp-disabled-opacity;
  114. pointer-events: none;
  115. }
  116. .toggle-wp.toggle-disabled ion-radio {
  117. opacity: $toggle-wp-disabled-opacity;
  118. }
  119. // Windows Toggle Within An Item
  120. // -----------------------------------------
  121. .item-wp .toggle-wp {
  122. @include margin($toggle-wp-media-margin);
  123. cursor: pointer;
  124. @include deprecated-variable(padding, $toggle-wp-item-right-padding) {
  125. @include padding($toggle-wp-item-end-padding-top, $toggle-wp-item-end-padding-end, $toggle-wp-item-end-padding-bottom, $toggle-wp-item-end-padding-start);
  126. }
  127. }
  128. .item-wp .toggle-wp[item-left], // deprecated
  129. .item-wp .toggle-wp[item-start] {
  130. @include deprecated-variable(padding, $toggle-wp-item-left-padding) {
  131. @include padding($toggle-wp-item-start-padding-top, $toggle-wp-item-start-padding-end, $toggle-wp-item-start-padding-bottom, $toggle-wp-item-start-padding-start);
  132. }
  133. }
  134. .item-wp.item-toggle ion-label {
  135. @include margin-horizontal(0, null);
  136. }
  137. // Windows Color Mixin
  138. // --------------------------------------------------
  139. @mixin toggle-theme-wp($color-name, $color-base, $color-contrast) {
  140. .toggle-wp-#{$color-name}.toggle-checked .toggle-icon {
  141. border-color: $color-base;
  142. background-color: $color-base;
  143. }
  144. .toggle-wp-#{$color-name}.toggle-checked .toggle-inner {
  145. background-color: $color-contrast;
  146. }
  147. }
  148. // Generate Windows Toggle Auxiliary Colors
  149. // --------------------------------------------------
  150. @each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
  151. @include toggle-theme-wp($color-name, $color-base, $color-contrast);
  152. }