UNPKG

7.44 kBSCSSView Raw
1@import "../../themes/ionic.globals.wp";
2
3// Windows Card
4// --------------------------------------------------
5
6/// @prop - Margin top of the card
7$card-wp-margin-top: 8px !default;
8
9// deprecated
10$card-wp-margin-right: 8px !default;
11/// @prop - Margin end of the card
12$card-wp-margin-end: $card-wp-margin-right !default;
13
14/// @prop - Margin bottom of the card
15$card-wp-margin-bottom: 8px !default;
16
17// deprecated
18$card-wp-margin-left: 8px !default;
19/// @prop - Margin start of the card
20$card-wp-margin-start: $card-wp-margin-left !default;
21
22/// @prop - Padding top of the card
23$card-wp-padding-top: 13px !default;
24
25// deprecated
26$card-wp-padding-right: 16px !default;
27/// @prop - Padding end of the card
28$card-wp-padding-end: $card-wp-padding-right !default;
29
30/// @prop - Padding bottom of the card
31$card-wp-padding-bottom: 13px !default;
32
33// deprecated
34$card-wp-padding-left: 16px !default;
35/// @prop - Padding start of the card
36$card-wp-padding-start: $card-wp-padding-left !default;
37
38/// @prop - Padding top of the media on the card
39$card-wp-padding-media-top: 10px !default;
40
41/// @prop - Padding bottom of the media on the card
42$card-wp-padding-media-bottom: 10px !default;
43
44/// @prop - Size of the card avatar
45$card-wp-avatar-size: 4rem !default;
46
47/// @prop - Size of the card thumbnail
48$card-wp-thumbnail-size: 8rem !default;
49
50/// @prop - Background color of the card
51$card-wp-background-color: $list-wp-background-color !default;
52
53/// @prop - Box shadow color of the card
54$card-wp-box-shadow-color: rgba(0, 0, 0, .2) !default;
55
56/// @prop - Box shadow of the card
57$card-wp-box-shadow: 0 1px 1px 1px $card-wp-box-shadow-color !default;
58
59/// @prop - Border radius of the card
60$card-wp-border-radius: 1px !default;
61
62/// @prop - Font size of the card
63$card-wp-font-size: 1.4rem !default;
64
65/// @prop - Line height of the card
66$card-wp-line-height: 1.5 !default;
67
68/// @prop - Color of the card text
69$card-wp-text-color: #222 !default;
70
71/// @prop - Font size of card title
72$card-wp-title-font-size: 2.4rem !default;
73
74// deprecated
75$card-wp-title-padding: null !default;
76
77/// @prop - Padding top of the card title
78$card-wp-title-padding-top: 8px !default;
79
80/// @prop - Padding end of the card title
81$card-wp-title-padding-end: 0 !default;
82
83/// @prop - Padding bottom of the card title
84$card-wp-title-padding-bottom: 8px !default;
85
86/// @prop - Padding start of the card title
87$card-wp-title-padding-start: 0 !default;
88
89// deprecated
90$card-wp-title-margin: null !default;
91
92/// @prop - Margin top of the card title
93$card-wp-title-margin-top: 2px !default;
94
95/// @prop - Margin end of the card title
96$card-wp-title-margin-end: 0 !default;
97
98/// @prop - Margin bottom of the card title
99$card-wp-title-margin-bottom: $card-wp-title-margin-top !default;
100
101/// @prop - Margin start of the card title
102$card-wp-title-margin-start: $card-wp-title-margin-end !default;
103
104/// @prop - Color of the card title
105$card-wp-title-text-color: #222 !default;
106
107/// @prop - Font size of the card header
108$card-wp-header-font-size: 1.6rem !default;
109
110// deprecated
111$card-wp-header-padding: null !default;
112
113/// @prop - Padding top of the card header
114$card-wp-header-padding-top: 16px !default;
115
116/// @prop - Padding end of the card header
117$card-wp-header-padding-end: $card-wp-header-padding-top !default;
118
119/// @prop - Padding bottom of the card header
120$card-wp-header-padding-bottom: $card-wp-header-padding-top !default;
121
122/// @prop - Padding start of the card header
123$card-wp-header-padding-start: $card-wp-header-padding-end !default;
124
125/// @prop - Color of the card header
126$card-wp-header-color: #222 !default;
127
128
129.card-wp {
130 @include margin($card-wp-margin-top, $card-wp-margin-end, $card-wp-margin-bottom, $card-wp-margin-start);
131 @include border-radius($card-wp-border-radius);
132
133 width: calc(100% - #{($card-wp-margin-end + $card-wp-margin-start)});
134
135 font-size: $card-wp-font-size;
136
137 background: $card-wp-background-color;
138 box-shadow: $card-wp-box-shadow;
139}
140
141.card-wp ion-list {
142 @include margin(null, null, 0, null);
143}
144
145.card-wp > .item:last-child,
146.card-wp > .item:last-child .item-inner,
147.card-wp > .item-wrapper:last-child .item {
148 border-bottom: 0;
149}
150
151.card-wp .item-wp.item-block .item-inner {
152 border: 0;
153}
154
155.card-content-wp {
156 @include padding($card-wp-padding-top, $card-wp-padding-end, $card-wp-padding-bottom, $card-wp-padding-start);
157
158 font-size: $card-wp-font-size;
159 line-height: $card-wp-line-height;
160}
161
162.card-header-wp {
163 font-size: $card-wp-header-font-size;
164
165 color: $card-wp-header-color;
166
167 @include deprecated-variable(padding, $card-wp-header-padding) {
168 @include padding($card-wp-header-padding-top, $card-wp-header-padding-end, $card-wp-header-padding-bottom, $card-wp-header-padding-start);
169 }
170}
171
172.card-header-wp + .card-content-wp,
173.card-wp .item + .card-content-wp {
174 @include padding(0, null, null, null);
175}
176
177.card .note-wp {
178 font-size: 1.3rem;
179}
180
181.card-title-wp {
182 display: block;
183
184 font-size: $card-wp-title-font-size;
185 line-height: 1.2;
186 color: $card-wp-title-text-color;
187
188 @include deprecated-variable(margin, $card-wp-title-margin) {
189 @include margin($card-wp-title-margin-top, $card-wp-title-margin-end, $card-wp-title-margin-bottom, $card-wp-title-margin-start);
190 }
191
192 @include deprecated-variable(padding, $card-wp-title-padding) {
193 @include padding($card-wp-title-padding-top, $card-wp-title-padding-end, $card-wp-title-padding-bottom, $card-wp-title-padding-start);
194 }
195}
196
197.card-wp h1 {
198 @include margin(0, 0, 2px);
199
200 font-size: 2.4rem;
201 font-weight: normal;
202 color: $card-wp-text-color;
203}
204
205.card-wp h2 {
206 @include margin(2px, 0);
207
208 font-size: 1.6rem;
209 font-weight: normal;
210 color: $card-wp-text-color;
211}
212
213.card-wp h3,
214.card-wp h4,
215.card-wp h5,
216.card-wp h6 {
217 @include margin(2px, 0);
218
219 font-size: 1.4rem;
220 font-weight: normal;
221 color: $card-wp-text-color;
222}
223
224.card-wp p {
225 @include margin(0, 0, 2px);
226
227 font-size: 1.4rem;
228 font-weight: normal;
229 line-height: 1.5;
230 color: $card-wp-text-color;
231}
232
233.card-wp + ion-card {
234 @include margin(0, null, null, null);
235}
236
237
238// Generate Windows Card Colors
239// --------------------------------------------------
240
241@each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
242
243 .card-wp .text-wp-#{$color-name} {
244 color: $color-base;
245 }
246
247 .card-wp-#{$color-name} {
248 color: $color-contrast;
249 background-color: $color-base;
250
251 .card-header-wp,
252 .card-title-wp,
253 .card-content-wp,
254 h1,
255 h2,
256 h3,
257 h4,
258 h5,
259 h6,
260 p {
261 color: $color-contrast;
262 }
263
264 @each $color-name, $color-base, $color-contrast in get-colors($colors-wp) {
265 .text-wp-#{$color-name},
266 .card-header-wp-#{$color-name},
267 .card-title-wp-#{$color-name},
268 .card-content-wp-#{$color-name} {
269 color: $color-base;
270 }
271 }
272 }
273
274 .card-header-wp-#{$color-name},
275 .card-title-wp-#{$color-name},
276 .card-content-wp-#{$color-name} {
277 color: $color-base;
278 }
279
280}