Skip to content

Commit ea7478c

Browse files
authored
Address design feedback for ProductsSelector and ProductCard (#37028)
* Address design feedback for products selector in Jetpack Connect flow * Clean up and fix issues in product price CSS
1 parent 4e6c4d2 commit ea7478c

File tree

2 files changed

+112
-69
lines changed

2 files changed

+112
-69
lines changed

client/components/product-card/style.scss

Lines changed: 69 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,8 @@
7979
font-size: 22px;
8080
line-height: 24px;
8181

82-
.product-card:not( .is-purchased ) & {
83-
color: var( --color-primary-50 );
84-
}
85-
8682
@include breakpoint( '>660px' ) {
8783
font-size: 17px;
88-
font-weight: 400;
8984
}
9085

9186
em,
@@ -94,6 +89,14 @@
9489
font-weight: 600;
9590
font-style: italic;
9691
}
92+
93+
.product-card:not( .is-purchased ) & {
94+
color: var( --color-primary-50 );
95+
96+
@include breakpoint( '>660px' ) {
97+
font-weight: 600;
98+
}
99+
}
97100
}
98101

99102
.product-card__subtitle {
@@ -112,42 +115,89 @@
112115
display: flex;
113116
flex-flow: row wrap;
114117
align-items: baseline;
118+
}
115119

120+
.product-card {
116121
.plan-price {
117122
margin-right: 0.333em;
118-
}
119123

120-
@include breakpoint( '>660px' ) {
121-
.plan-price,
122-
.plan-price__currency-symbol,
123-
.plan-price__integer,
124-
.plan-price__fraction {
125-
font-size: 14px;
126-
vertical-align: baseline;
124+
&,
125+
& * {
126+
@include breakpoint( '>660px' ) {
127+
font-size: 14px;
128+
vertical-align: baseline;
129+
}
127130
}
128131
}
129132
}
130133

131134
.product-card__billing-timeframe {
132-
width: 100%;
133135
font-size: 13px;
134-
font-style: italic;
135136
font-weight: 400;
136137
line-height: 13px;
137138
color: var( --color-text-subtle );
138139

139-
@include breakpoint( '>660px' ) {
140-
width: auto;
140+
@include breakpoint( '<660px' ) {
141+
font-style: italic;
142+
}
143+
144+
@include breakpoint( '>960px' ) {
141145
font-size: 12px;
142146
}
143147

144-
&.is-discounted {
145-
@include breakpoint( '>960px' ) {
148+
.is-discounted & {
149+
@include breakpoint( '>660px' ) {
146150
color: var( --color-success );
147151
}
148152
}
149153
}
150154

155+
// Adjust price group styles when part of product card header
156+
.product-card__header {
157+
.plan-price,
158+
.plan-price * {
159+
@include breakpoint( '>660px' ) {
160+
font-weight: 600;
161+
}
162+
}
163+
164+
.product-card__billing-timeframe {
165+
width: 100%;
166+
167+
@include breakpoint( '>660px' ) {
168+
width: auto;
169+
font-size: 12px;
170+
font-weight: 600;
171+
}
172+
}
173+
}
174+
175+
// Adjust price group styles when part of product option
176+
.product-card__option {
177+
.plan-price,
178+
.plan-price * {
179+
font-size: 16px;
180+
font-weight: 400;
181+
vertical-align: baseline;
182+
183+
@include breakpoint( '>960px' ) {
184+
font-size: 14px;
185+
}
186+
}
187+
188+
.is-discounted .product-card__billing-timeframe {
189+
color: var( --color-success );
190+
}
191+
192+
@include breakpoint( '>960px' ) {
193+
.plan-price.is-discounted,
194+
.plan-price.is-discounted *,
195+
.is-discounted .product-card__billing-timeframe {
196+
color: var( --color-text-subtle );
197+
}
198+
}
199+
}
200+
151201
// Description
152202
.product-card__description {
153203
font-size: 14px;
@@ -223,35 +273,6 @@
223273
}
224274
}
225275

226-
// Adjust price group styles when part of product option
227-
.product-card__option {
228-
.plan-price,
229-
.plan-price__currency-symbol,
230-
.plan-price__integer,
231-
.plan-price__fraction {
232-
font-size: 16px;
233-
font-weight: 400;
234-
vertical-align: baseline;
235-
236-
@include breakpoint( '>960px' ) {
237-
font-size: 14px;
238-
}
239-
}
240-
241-
.product-card__billing-timeframe {
242-
width: auto;
243-
font-size: 13px;
244-
245-
@include breakpoint( '>960px' ) {
246-
font-size: 12px;
247-
}
248-
}
249-
250-
.product-card__price-group.is-discounted .product-card__billing-timeframe {
251-
color: var( --color-success );
252-
}
253-
}
254-
255276
// Action
256277
.product-card__action {
257278
margin: 16px auto;

client/jetpack-connect/style.scss

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,12 +1097,15 @@ body.is-section-jetpack-connect .layout.is-jetpack-woocommerce-flow {
10971097
}
10981098
}
10991099

1100-
// <ProductCard /> overrides
1101-
.is-section-jetpack-connect {
1102-
.product-card {
1103-
@include breakpoint( '>660px' ) {
1104-
text-align: left;
1105-
}
1100+
// ProductSelector and ProductCard overrides
1101+
.is-section-jetpack-connect .product-selector {
1102+
padding-left: 16px;
1103+
padding-right: 16px;
1104+
}
1105+
1106+
.is-section-jetpack-connect .product-card {
1107+
@include breakpoint( '>660px' ) {
1108+
text-align: left;
11061109
}
11071110

11081111
.product-card__header {
@@ -1112,8 +1115,12 @@ body.is-section-jetpack-connect .layout.is-jetpack-woocommerce-flow {
11121115
}
11131116

11141117
.product-card__header-primary {
1115-
padding-top: 20px;
1116-
padding-bottom: 20px;
1118+
padding-top: 13px;
1119+
padding-bottom: 14px;
1120+
1121+
@include breakpoint( '<660px' ) {
1122+
justify-content: center;
1123+
}
11171124
}
11181125

11191126
.product-card__header-secondary {
@@ -1138,34 +1145,49 @@ body.is-section-jetpack-connect .layout.is-jetpack-woocommerce-flow {
11381145

11391146
@include breakpoint( '>660px' ) {
11401147
font-size: 22px;
1141-
font-weight: 600;
11421148
}
11431149
}
11441150

11451151
.product-card__price-group {
11461152
justify-content: center;
11471153
}
11481154

1149-
.plan-price.is-discounted,
1150-
.plan-price.is-discounted .plan-price__currency-symbol,
1151-
.product-card__price-group.is-discounted .product-card__billing-timeframe,
1152-
.product-card__option .product-card__price-group.is-discounted .product-card__billing-timeframe {
1155+
.plan-price,
1156+
.plan-price *,
1157+
.product-card__billing-timeframe,
1158+
.product-card__option .product-card__price-group .product-card__billing-timeframe {
11531159
color: var( --color-neutral-70 );
1160+
font-style: normal;
1161+
vertical-align: baseline;
11541162
}
11551163

1156-
@include breakpoint( '>660px' ) {
1164+
.plan-price.is-original,
1165+
.plan-price.is-original * {
1166+
color: var( --color-neutral-light );
1167+
}
1168+
1169+
.product-card__header {
11571170
.plan-price,
1158-
.plan-price__currency-symbol,
1159-
.plan-price__integer,
1160-
.plan-price__fraction,
1171+
.plan-price *,
11611172
.product-card__billing-timeframe {
1162-
font-size: 14px;
1163-
font-weight: 600;
1164-
font-style: normal;
1173+
font-size: 16px;
1174+
font-weight: 500;
1175+
line-height: 20px;
1176+
1177+
@include breakpoint( '>660px' ) {
1178+
font-size: 20px;
1179+
font-weight: 600;
1180+
}
11651181
}
1182+
}
11661183

1184+
.product-card__option {
1185+
.plan-price.is-discounted,
1186+
.plan-price.is-discounted *,
11671187
.product-card__billing-timeframe {
1168-
color: var( --color-neutral-70 );
1188+
@include breakpoint( '>660px' ) {
1189+
font-weight: 600;
1190+
}
11691191
}
11701192
}
11711193

0 commit comments

Comments
 (0)