Skip to content

Commit

Permalink
Automatic discount cart position fix (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoboludo committed Jan 12, 2022
1 parent ce9a0ce commit 551a3e9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions assets/component-discounts.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@
color: rgba(var(--color-button), var(--alpha-button-background));
}

.discounts__discount--end {
justify-content: flex-end;
.discounts__discount--position {
justify-content: center;
}

@media screen and (min-width: 750px) {
.discounts__discount--position {
justify-content: flex-end;
}
}

.discounts__discount > .icon {
Expand Down
2 changes: 1 addition & 1 deletion sections/main-cart-footer.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{%- if cart.cart_level_discount_applications.size > 0 -%}
<ul class="discounts list-unstyled" role="list" aria-label="{{ 'customer.order.discount' | t }}">
{%- for discount in cart.cart_level_discount_applications -%}
<li class="discounts__discount discounts__discount--end">
<li class="discounts__discount discounts__discount--position">
{%- render 'icon-discount' -%}
{{ discount.title }}
(-{{ discount.total_allocated_amount | money }})
Expand Down

0 comments on commit 551a3e9

Please sign in to comment.