-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product card spacing and price polish #407
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,6 +262,7 @@ a.product__text { | |
|
||
.product .price { | ||
align-items: flex-start; | ||
gap: 1rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This gap is to fix this issue which only happens at specific viewport widths for on sale items with unit pricing. I chose 1rem so it can take the place of the existing horizontal 1rem margin between the sale price and the sale badge (when displayed next to each on larger breakpoints). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
.product .price--sold-out .price__badge-sold-out { | ||
|
@@ -276,6 +277,10 @@ a.product__text { | |
} | ||
|
||
@media screen and (min-width: 750px) { | ||
.product__info-container .price--on-sale .price-item--regular { | ||
font-size: 1.6rem; | ||
} | ||
|
||
.product__info-container > *:first-child { | ||
margin-top: 0; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,7 +129,7 @@ | |
<dt> | ||
<span class="visually-hidden">{{ 'products.product.price.regular_price' | t }}</span> | ||
</dt> | ||
<dd> | ||
<dd class="regular-price"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember wanting to stir away from using classes in the customer templates. Those classes should be generic enough so it's ok to have them I take it ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I think so. We do use a few other simple classes in this template as well as the account table for convenience and clarity. At a certain point a selector becomes too flaky and indiscernible to justify. This PR actually resolves a styling bug that presumably happened due to unintended selector scope. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sweet! And makes sense some selectors you removed were not pretty 😅 |
||
<s>{{ line_item.original_price | money }}</s> | ||
</dd> | ||
<dt> | ||
|
@@ -150,7 +150,7 @@ | |
<dt> | ||
<span class="visually-hidden">{{ 'products.product.price.unit_price' | t }}</span> | ||
</dt> | ||
<dd> | ||
<dd class="unit-price"> | ||
<span> | ||
{%- capture unit_price_separator -%} | ||
<span aria-hidden="true">/</span><span class="visually-hidden">{{ 'accessibility.unit_price_separator' | t }} </span> | ||
|
@@ -187,7 +187,7 @@ | |
<dt> | ||
<span class="visually-hidden">{{ 'products.product.price.regular_price' | t }}</span> | ||
</dt> | ||
<dd> | ||
<dd class="regular-price"> | ||
<s>{{ line_item.original_line_price | money }}</s> | ||
</dd> | ||
<dt> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--color-foreground-XX
CSS variables no longer exist in the theme. More context here.