Skip to content
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

Adjust card badge visual tweaks #155

Merged
merged 1 commit into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/component-badge.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
font-size: 1.2rem;
letter-spacing: 0.1rem;
line-height: 1;
padding: 0.6rem 1.6rem;
padding: 0.6rem 1.3rem;
text-align: center;
background-color: rgb(var(--color-badge-background));
border-color: rgba(var(--color-badge-border), var(--alpha-badge-border));
Expand Down
2 changes: 1 addition & 1 deletion assets/template-giftcard.css
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ h2,
font-size: 1.2rem;
letter-spacing: 0.1rem;
line-height: 1;
padding: 0.6rem 1.6rem;
padding: 0.6rem 1.3rem;
text-align: center;
background-color: rgb(var(--color-base-background-1));
border-color: rgba(var(--color-base-text), 0.04);
Expand Down
8 changes: 2 additions & 6 deletions sections/collage.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,9 @@
<div class="collage-product__badge">
<div class="card__badge">
{%- if block.settings.product.available == false -%}
<span class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}" aria-hidden="true">
{{ 'products.product.sold_out' | t }}
</span>
<span class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}" aria-hidden="true">{{ 'products.product.sold_out' | t }}</span>
{%- elsif block.settings.product.compare_at_price > block.settings.product.price and block.settings.product.available -%}
<span class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}" aria-hidden="true">
{{ 'products.product.on_sale' | t }}
</span>
<span class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}" aria-hidden="true">{{ 'products.product.on_sale' | t }}</span>
{%- endif -%}
</div>
</div>
Expand Down
8 changes: 2 additions & 6 deletions snippets/product-card.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,9 @@

<div class="card__badge">
{%- if product_card_product.available == false -%}
<span class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}" aria-hidden="true">
{{ 'products.product.sold_out' | t }}
</span>
<span class="badge badge--bottom-left color-{{ settings.sold_out_badge_color_scheme }}" aria-hidden="true">{{ 'products.product.sold_out' | t }}</span>
{%- elsif product_card_product.compare_at_price > product_card_product.price and product_card_product.available -%}
<span class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}" aria-hidden="true">
{{ 'products.product.on_sale' | t }}
</span>
<span class="badge badge--bottom-left color-{{ settings.sale_badge_color_scheme }}" aria-hidden="true">{{ 'products.product.on_sale' | t }}</span>
{%- endif -%}
</div>
</div>
Expand Down