UNPKG

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