Skip to content

Commit dd7def6

Browse files
committed
feat(windows): add card components
references #5565
1 parent 781ea83 commit dd7def6

File tree

3 files changed

+138
-1
lines changed

3 files changed

+138
-1
lines changed

ionic/components.wp.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"components/alert/alert.wp",
1111
"components/badge/badge.wp",
1212
"components/button/button.wp",
13+
"components/card/card.wp",
1314
"components/checkbox/checkbox.wp",
1415
"components/chip/chip.wp",
1516
"components/content/content.wp",

ionic/components/alert/alert.wp.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ $alert-wp-buttons-justify-content: flex-end !default;
194194
border-radius: 2px;
195195
border-width: 2px;
196196
border-style: solid;
197-
border-color: darken($list-wp-border-color, 40%);
197+
border-color: #818181;
198198
background-color: transparent;
199199
}
200200

ionic/components/card/card.wp.scss

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
@import "../../globals.wp";
2+
@import "./card";
3+
4+
// Windows Card
5+
// --------------------------------------------------
6+
7+
$card-wp-margin-top: 10px !default;
8+
$card-wp-margin-right: 10px !default;
9+
$card-wp-margin-bottom: 10px !default;
10+
$card-wp-margin-left: 10px !default;
11+
12+
$card-wp-padding-top: 13px !default;
13+
$card-wp-padding-right: 16px !default;
14+
$card-wp-padding-bottom: 13px !default;
15+
$card-wp-padding-left: 16px !default;
16+
17+
$card-wp-padding-media-top: 10px !default;
18+
$card-wp-padding-media-bottom: 10px !default;
19+
20+
$card-wp-avatar-size: 4rem !default;
21+
$card-wp-thumbnail-size: 8rem !default;
22+
23+
$card-wp-background-color: $list-wp-background-color !default;
24+
$card-wp-box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12) !default;
25+
$card-wp-border-radius: 2px !default;
26+
$card-wp-font-size: 1.4rem !default;
27+
$card-wp-line-height: 1.5 !default;
28+
29+
$card-wp-text-color: #222 !default;
30+
$card-wp-title-font-size: 2.4rem !default;
31+
$card-wp-title-padding: 8px 0 8px 0 !default;
32+
$card-wp-title-margin: 2px 0 2px !default;
33+
$card-wp-title-text-color: #222 !default;
34+
35+
$card-wp-header-font-size: 1.6rem !default;
36+
$card-wp-header-padding: 16px !default;
37+
$card-wp-header-color: #222 !default;
38+
39+
40+
ion-card {
41+
margin: $card-wp-margin-top $card-wp-margin-right $card-wp-margin-bottom $card-wp-margin-left;
42+
font-size: $card-wp-font-size;
43+
44+
background: $card-wp-background-color;
45+
box-shadow: $card-wp-box-shadow;
46+
border-radius: $card-wp-border-radius;
47+
48+
ion-list {
49+
margin-bottom: 0;
50+
51+
ion-label {
52+
padding: 0;
53+
}
54+
55+
.item-inner {
56+
border-bottom: 1px solid $list-wp-border-color;
57+
}
58+
59+
> .item:last-child,
60+
> ion-item-sliding:last-child .item {
61+
border-bottom: none;
62+
}
63+
}
64+
65+
.item-inner {
66+
border: none;
67+
}
68+
69+
ion-card-content {
70+
padding: $card-wp-padding-top $card-wp-padding-right $card-wp-padding-bottom $card-wp-padding-left;
71+
font-size: $card-wp-font-size;
72+
line-height: $card-wp-line-height;
73+
}
74+
75+
ion-card-header {
76+
padding: $card-wp-header-padding;
77+
font-size: $card-wp-header-font-size;
78+
color: $card-wp-header-color;
79+
}
80+
81+
ion-card-header + ion-card-content,
82+
.item + ion-card-content {
83+
padding-top: 0;
84+
}
85+
86+
ion-note[item-left],
87+
ion-note[item-right], {
88+
font-size: 1.3rem;
89+
}
90+
91+
ion-card-title {
92+
display: block;
93+
line-height: 1.2;
94+
padding: $card-wp-title-padding;
95+
margin: $card-wp-title-margin;
96+
font-size: $card-wp-title-font-size;
97+
color: $card-wp-title-text-color;
98+
}
99+
100+
h1 {
101+
margin: 0 0 2px;
102+
font-size: 2.4rem;
103+
font-weight: normal;
104+
color: $card-wp-text-color;
105+
}
106+
107+
h2 {
108+
margin: 2px 0 2px;
109+
font-size: 1.6rem;
110+
font-weight: normal;
111+
color: $card-wp-text-color;
112+
}
113+
114+
h3,
115+
h4,
116+
h5,
117+
h6 {
118+
margin: 2px 0 2px;
119+
font-size: 1.4rem;
120+
font-weight: normal;
121+
color: $card-wp-text-color;
122+
}
123+
124+
p {
125+
font-size: 1.4rem;
126+
margin: 0 0 2px;
127+
line-height: 1.5;
128+
font-weight: normal;
129+
color: $card-wp-text-color;
130+
}
131+
132+
}
133+
134+
ion-card + ion-card {
135+
margin-top: 0;
136+
}

0 commit comments

Comments
 (0)