a zip code crypto-currency system good for red ONLY

toggle.ios.scss 7.4KB

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