UI for Zipcoin Blue

item.ios.scss 7.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. @import "../../themes/ionic.globals.ios";
  2. // iOS Item
  3. // --------------------------------------------------
  4. /// @prop - Font size of the item text
  5. $item-ios-body-text-font-size: 1.7rem !default;
  6. // deprecated
  7. $item-ios-paragraph-margin: null !default;
  8. /// @prop - Margin top of the item paragraph
  9. $item-ios-paragraph-margin-top: 0 !default;
  10. /// @prop - Margin end of the item paragraph
  11. $item-ios-paragraph-margin-end: 0 !default;
  12. /// @prop - Margin bottom of the item paragraph
  13. $item-ios-paragraph-margin-bottom: 2px !default;
  14. /// @prop - Margin start of the item paragraph
  15. $item-ios-paragraph-margin-start: $item-ios-paragraph-margin-end !default;
  16. /// @prop - Font size of the item paragraph
  17. $item-ios-paragraph-font-size: 1.4rem !default;
  18. /// @prop - Color of the item paragraph
  19. $item-ios-paragraph-text-color: #8e9093 !default;
  20. /// @prop - Size of the avatar in the item
  21. $item-ios-avatar-size: 36px !default;
  22. /// @prop - Border radius of the avatar in the item
  23. $item-ios-avatar-border-radius: 50% !default;
  24. /// @prop - Size of the thumbnail in the item
  25. $item-ios-thumbnail-size: 56px !default;
  26. /// @prop - Shows the detail arrow icon on an item
  27. $item-ios-detail-push-show: true !default;
  28. /// @prop - Color of the detail arrow icon
  29. $item-ios-detail-push-color: $list-ios-border-color !default;
  30. /// @prop - Icon for the detail arrow
  31. $item-ios-detail-push-svg: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'><path d='M2,20l-2-2l8-8L0,2l2-2l10,10L2,20z' fill='#{$item-ios-detail-push-color}'/></svg>" !default;
  32. /// @prop - Background for the divider
  33. $item-ios-divider-background: #f7f7f7 !default;
  34. /// @prop - Color for the divider
  35. $item-ios-divider-color: #222 !default;
  36. /// @prop - Background for the sliding content
  37. $item-ios-sliding-content-background: $list-ios-background-color !default;
  38. // iOS Item
  39. // --------------------------------------------------
  40. .item-ios {
  41. @include padding-horizontal($item-ios-padding-start, null);
  42. @include safe-area-padding-horizontal($item-ios-padding-start, null);
  43. @include border-radius(0);
  44. position: relative;
  45. font-size: $item-ios-body-text-font-size;
  46. color: $list-ios-text-color;
  47. background-color: $list-ios-background-color;
  48. transition: background-color 200ms linear;
  49. }
  50. .item-ios.activated {
  51. background-color: $list-ios-activated-background-color;
  52. transition-duration: 0ms;
  53. }
  54. .item-ios h1 {
  55. @include margin(0, 0, 2px);
  56. font-size: 2.4rem;
  57. font-weight: normal;
  58. }
  59. .item-ios h2 {
  60. @include margin(0, 0, 2px);
  61. font-size: 1.7rem;
  62. font-weight: normal;
  63. }
  64. .item-ios h3,
  65. .item-ios h4,
  66. .item-ios h5,
  67. .item-ios h6 {
  68. @include margin(0, 0, 3px);
  69. font-size: 1.4rem;
  70. font-weight: normal;
  71. line-height: normal;
  72. }
  73. .item-ios p {
  74. overflow: inherit;
  75. font-size: $item-ios-paragraph-font-size;
  76. line-height: normal;
  77. text-overflow: inherit;
  78. color: $item-ios-paragraph-text-color;
  79. @include deprecated-variable(margin, $item-ios-paragraph-margin) {
  80. @include margin($item-ios-paragraph-margin-top, $item-ios-paragraph-margin-end, $item-ios-paragraph-margin-bottom, $item-ios-paragraph-margin-start);
  81. }
  82. }
  83. .item-ios h2:last-child,
  84. .item-ios h3:last-child,
  85. .item-ios h4:last-child,
  86. .item-ios h5:last-child,
  87. .item-ios h6:last-child,
  88. .item-ios p:last-child {
  89. @include margin(null, null, 0, null);
  90. }
  91. .item-ios.item-block .item-inner {
  92. @include padding-horizontal(null, $item-ios-padding-end / 2);
  93. @include safe-area-padding-horizontal(null, $item-ios-padding-end / 2);
  94. border-bottom: $hairlines-width solid $list-ios-border-color;
  95. }
  96. // iOS Item Media
  97. // --------------------------------------------------
  98. .item-ios [item-left], // deprecated
  99. .item-ios [item-start] {
  100. @include margin($item-ios-padding-media-top, $item-ios-padding-start, $item-ios-padding-media-bottom, 0);
  101. }
  102. .item-ios [item-right], // deprecated
  103. .item-ios [item-end] {
  104. @include margin($item-ios-padding-media-top, ($item-ios-padding-start / 2), $item-ios-padding-media-bottom, ($item-ios-padding-end / 2));
  105. }
  106. .item-ios ion-icon[item-left], // deprecated
  107. .item-ios ion-icon[item-right], // deprecated
  108. .item-ios ion-icon[item-start],
  109. .item-ios ion-icon[item-end] {
  110. @include margin($item-ios-padding-icon-top, null, $item-ios-padding-icon-bottom, 0);
  111. }
  112. .item-ios .item-button {
  113. @include padding(0, .5em);
  114. height: 24px;
  115. font-size: 1.3rem;
  116. }
  117. .item-ios .item-button[icon-only] ion-icon,
  118. .item-ios .item-button[icon-only] {
  119. @include padding(0, 1px);
  120. }
  121. .item-ios ion-avatar[item-left], // deprecated
  122. .item-ios ion-thumbnail[item-left], // deprecated
  123. .item-ios ion-avatar[item-start],
  124. .item-ios ion-thumbnail[item-start] {
  125. @include margin(($item-ios-padding-end / 2), $item-ios-padding-end, ($item-ios-padding-end / 2), 0);
  126. }
  127. .item-ios ion-avatar[item-right], // deprecated
  128. .item-ios ion-thumbnail[item-right], // deprecated
  129. .item-ios ion-avatar[item-end],
  130. .item-ios ion-thumbnail[item-end] {
  131. @include margin(($item-ios-padding-end / 2));
  132. }
  133. // iOS Item Avatar
  134. // --------------------------------------------------
  135. .item-ios ion-avatar {
  136. min-width: $item-ios-avatar-size;
  137. min-height: $item-ios-avatar-size;
  138. }
  139. .item-ios ion-avatar ion-img,
  140. .item-ios ion-avatar img {
  141. @include border-radius($item-ios-avatar-border-radius);
  142. overflow: hidden;
  143. width: $item-ios-avatar-size;
  144. height: $item-ios-avatar-size;
  145. }
  146. // iOS Item Thumbnail
  147. // --------------------------------------------------
  148. .item-ios ion-thumbnail {
  149. min-width: $item-ios-thumbnail-size;
  150. min-height: $item-ios-thumbnail-size;
  151. }
  152. .item-ios ion-thumbnail ion-img,
  153. .item-ios ion-thumbnail img {
  154. width: $item-ios-thumbnail-size;
  155. height: $item-ios-thumbnail-size;
  156. }
  157. // iOS Item Detail Push
  158. // --------------------------------------------------
  159. // Only show the forward arrow icon if true
  160. @if $item-ios-detail-push-show == true {
  161. .item-ios[detail-push] .item-inner,
  162. button.item-ios:not([detail-none]) .item-inner,
  163. a.item-ios:not([detail-none]) .item-inner {
  164. $safe-area-position: calc(#{$item-ios-padding-end - 2} + constant(safe-area-inset-right));
  165. $safe-area-position-env: calc(#{$item-ios-padding-end - 2} + env(safe-area-inset-right));
  166. @include svg-background-image($item-ios-detail-push-svg, true);
  167. @include padding-horizontal(null, 32px);
  168. @include background-position(end, $item-ios-padding-end - 2, center);
  169. @include background-position(end, $safe-area-position, center);
  170. @include background-position(end, $safe-area-position-env, center);
  171. background-repeat: no-repeat;
  172. background-size: 14px 14px;
  173. }
  174. }
  175. // iOS Item Group
  176. // --------------------------------------------------
  177. ion-item-group .item-ios:first-child .item-inner {
  178. border-top-width: 0;
  179. }
  180. ion-item-group .item-ios:last-child .item-inner,
  181. ion-item-group .item-wrapper:last-child .item-ios .item-inner {
  182. border: 0;
  183. }
  184. // iOS Item Divider
  185. // --------------------------------------------------
  186. .item-divider-ios {
  187. @include padding-horizontal($item-ios-padding-start, null);
  188. @include safe-area-padding-horizontal($item-ios-padding-start, null);
  189. color: $item-ios-divider-color;
  190. background-color: $item-ios-divider-background;
  191. }
  192. // Generate iOS Item and Item Divider Colors
  193. // --------------------------------------------------
  194. @each $color-name, $color-base, $color-contrast in get-colors($colors-ios) {
  195. // If there is text with a color it should use this color
  196. // and override whatever item sets it to
  197. .item-ios .text-ios-#{$color-name} {
  198. color: $color-base;
  199. }
  200. .item-ios-#{$color-name},
  201. .item-divider-ios-#{$color-name} {
  202. color: $color-contrast;
  203. background-color: $color-base;
  204. p {
  205. color: $color-contrast;
  206. }
  207. &.activated {
  208. background-color: color-shade($color-base);
  209. }
  210. }
  211. }
  212. // iOS Item Sliding
  213. // --------------------------------------------------
  214. .list-ios ion-item-sliding {
  215. background-color: $item-ios-sliding-content-background;
  216. }