card.wp.scss 7.3KB

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