123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. @import "../../themes/ionic.globals.ios";
  2. // iOS Card
  3. // --------------------------------------------------
  4. /// @prop - Margin top of the card
  5. $card-ios-margin-top: 12px !default;
  6. // deprecated
  7. $card-ios-margin-right: 12px !default;
  8. /// @prop - Margin end of the card
  9. $card-ios-margin-end: $card-ios-margin-right !default;
  10. /// @prop - Margin bottom of the card
  11. $card-ios-margin-bottom: 12px !default;
  12. // deprecated
  13. $card-ios-margin-left: 12px !default;
  14. /// @prop - Margin start of the card
  15. $card-ios-margin-start: $card-ios-margin-left !default;
  16. /// @prop - Padding top of the card
  17. $card-ios-padding-top: 13px !default;
  18. // deprecated
  19. $card-ios-padding-right: 16px !default;
  20. /// @prop - Padding end of the card
  21. $card-ios-padding-end: $card-ios-padding-right !default;
  22. /// @prop - Padding bottom of the card
  23. $card-ios-padding-bottom: 14px !default;
  24. // deprecated
  25. $card-ios-padding-left: 16px !default;
  26. /// @prop - Padding start of the card
  27. $card-ios-padding-start: $card-ios-padding-left !default;
  28. /// @prop - Padding top of the media on the card
  29. $card-ios-padding-media-top: 10px !default;
  30. /// @prop - Padding bottom of the media on the card
  31. $card-ios-padding-media-bottom: 9px !default;
  32. /// @prop - Background color of the card
  33. $card-ios-background-color: $list-ios-background-color !default;
  34. /// @prop - Box shadow color of the card
  35. $card-ios-box-shadow-color: rgba(0, 0, 0, .3) !default;
  36. /// @prop - Box shadow of the card
  37. $card-ios-box-shadow: 0 1px 2px $card-ios-box-shadow-color !default;
  38. /// @prop - Border radius of the card
  39. $card-ios-border-radius: 2px !default;
  40. /// @prop - Font size of the card
  41. $card-ios-font-size: 1.4rem !default;
  42. /// @prop - Color of the card text
  43. $card-ios-text-color: #666 !default;
  44. /// @prop - Font size of the card title
  45. $card-ios-title-font-size: 1.8rem !default;
  46. // deprecated
  47. $card-ios-title-padding: null !default;
  48. /// @prop - Padding top of the card title
  49. $card-ios-title-padding-top: 8px !default;
  50. /// @prop - Padding end of the card title
  51. $card-ios-title-padding-end: 0 !default;
  52. /// @prop - Padding bottom of the card title
  53. $card-ios-title-padding-bottom: 8px !default;
  54. /// @prop - Padding start of the card title
  55. $card-ios-title-padding-start: 0 !default;
  56. // deprecated
  57. $card-ios-title-margin: null !default;
  58. /// @prop - Margin top of the card title
  59. $card-ios-title-margin-top: 2px !default;
  60. /// @prop - Margin end of the card title
  61. $card-ios-title-margin-end: 0 !default;
  62. /// @prop - Margin bottom of the card title
  63. $card-ios-title-margin-bottom: 2px !default;
  64. /// @prop - Margin start of the card title
  65. $card-ios-title-margin-start: 0 !default;
  66. /// @prop - Color of the card title
  67. $card-ios-title-text-color: #222 !default;
  68. /// @prop - Font size of the card header
  69. $card-ios-header-font-size: 1.6rem !default;
  70. /// @prop - Font weight of the card header
  71. $card-ios-header-font-weight: 500 !default;
  72. // deprecated
  73. $card-ios-header-padding: null !default;
  74. /// @prop - Padding top of the card header
  75. $card-ios-header-padding-top: 16px !default;
  76. /// @prop - Padding end of the card header
  77. $card-ios-header-padding-end: $card-ios-header-padding-top !default;
  78. /// @prop - Padding bottom of the card header
  79. $card-ios-header-padding-bottom: $card-ios-header-padding-top !default;
  80. /// @prop - Padding start of the card header
  81. $card-ios-header-padding-start: $card-ios-header-padding-end !default;
  82. /// @prop - Color of the card header
  83. $card-ios-header-color: #333 !default;
  84. .card-ios {
  85. @include margin($card-ios-margin-top, $card-ios-margin-end, $card-ios-margin-bottom, $card-ios-margin-start);
  86. @include border-radius($card-ios-border-radius);
  87. width: calc(100% - #{($card-ios-margin-end + $card-ios-margin-start)});
  88. font-size: $card-ios-font-size;
  89. background: $card-ios-background-color;
  90. box-shadow: $card-ios-box-shadow;
  91. }
  92. .card-ios ion-list {
  93. @include margin(null, null, 0, null);
  94. }
  95. .card-ios > .item:last-child,
  96. .card-ios > .item:last-child .item-inner,
  97. .card-ios > .item-wrapper:last-child .item {
  98. border-bottom: 0;
  99. }
  100. .card-ios .item-ios.item-block .item-inner {
  101. border: 0;
  102. }
  103. .card-content-ios {
  104. @include padding($card-ios-padding-top, $card-ios-padding-end, $card-ios-padding-bottom, $card-ios-padding-start);
  105. font-size: $card-ios-font-size;
  106. line-height: 1.4;
  107. }
  108. .card-header-ios {
  109. font-size: $card-ios-header-font-size;
  110. font-weight: $card-ios-header-font-weight;
  111. color: $card-ios-header-color;
  112. @include deprecated-variable(padding, $card-ios-header-padding) {
  113. @include padding($card-ios-header-padding-top, $card-ios-header-padding-end, $card-ios-header-padding-bottom, $card-ios-header-padding-start);
  114. }
  115. }
  116. .card-header-ios + .card-content-ios,
  117. .card-ios .item + .card-content-ios {
  118. @include padding(0, null, null, null);
  119. }
  120. .card .note-ios {
  121. font-size: 1.3rem;
  122. }
  123. .card-title-ios {
  124. display: block;
  125. font-size: $card-ios-title-font-size;
  126. line-height: 1.2;
  127. color: $card-ios-title-text-color;
  128. @include deprecated-variable(margin, $card-ios-title-margin) {
  129. @include margin($card-ios-title-margin-top, $card-ios-title-margin-end, $card-ios-title-margin-bottom, $card-ios-title-margin-start);
  130. }
  131. @include deprecated-variable(padding, $card-ios-title-padding) {
  132. @include padding($card-ios-title-padding-top, $card-ios-title-padding-end, $card-ios-title-padding-bottom, $card-ios-title-padding-start);
  133. }
  134. }
  135. .card-ios h1 {
  136. @include margin(0, 0, 2px);
  137. font-size: 2.4rem;
  138. font-weight: normal;
  139. }
  140. .card-ios h2 {
  141. @include margin(2px, 0);
  142. font-size: 1.6rem;
  143. font-weight: normal;
  144. }
  145. .card-ios h3,
  146. .card-ios h4,
  147. .card-ios h5,
  148. .card-ios h6 {
  149. @include margin(2px, 0);
  150. font-size: 1.4rem;
  151. font-weight: normal;
  152. }
  153. .card-ios p {
  154. @include margin(0, 0, 2px);
  155. font-size: 1.4rem;
  156. color: $card-ios-text-color;
  157. }
  158. .card-ios + ion-card {
  159. @include margin(0, null, null, null);
  160. }
  161. // Generate iOS Card Colors
  162. // --------------------------------------------------
  163. @each $color-name, $color-base, $color-contrast in get-colors($colors-ios) {
  164. .card-ios .text-ios-#{$color-name} {
  165. color: $color-base;
  166. }
  167. .card-ios-#{$color-name} {
  168. color: $color-contrast;
  169. background-color: $color-base;
  170. .card-header-ios,
  171. .card-title-ios,
  172. .card-content-ios,
  173. p {
  174. color: $color-contrast;
  175. }
  176. @each $color-name, $color-base, $color-contrast in get-colors($colors-ios) {
  177. .text-ios-#{$color-name},
  178. .card-header-ios-#{$color-name},
  179. .card-title-ios-#{$color-name},
  180. .card-content-ios-#{$color-name} {
  181. color: $color-base;
  182. }
  183. }
  184. }
  185. .card-header-ios-#{$color-name},
  186. .card-title-ios-#{$color-name},
  187. .card-content-ios-#{$color-name} {
  188. color: $color-base;
  189. }
  190. }