-
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
Add bottom padding to cart subtotal section #2779
Add bottom padding to cart subtotal section #2779
Conversation
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.
Works well in my testing, thank you!
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.
Just one comment but the rest looks good 👍
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.
@@ -78,7 +74,7 @@ cart-items { | |||
} | |||
|
|||
.cart__footer > * + * { | |||
margin-top: 4rem; | |||
margin-top: 6.5rem; |
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.
This may be ok, but I'm not sure if apps can inject elements into the cart footer and will inherit this additional margin too. So it may be safer to only target elements that directly follow the cart note in the DOM:
@media screen and (max-width: 749px) {
.cart__note + * {
margin-top: 6.5rem;
}
}
* added padding top and padding bottom to cart subtotal * removed styling that were interfering with customizable padding * changed the calculations to reflect other sections * applied changes from code review * changed default to 40px * applied changes suggested in code review * added extra padding for mobile
PR Summary:
Cart subtotal section has padding bottom and padding top presets
Why are these changes introduced?
Fixes #2363 .
What approach did you take?
I added a preset for padding bottom in the schema and then realized that the padding top was hard-coded to be at 4rem. I added the padding top preset to this PR because I thought if a merchant has the ability to customize the bottom, they should be able to customize the top in case they want both paddings to be symmetrical or unique.
Other considerations
Visual impact on existing themes
Merchants can customize their subtotal section
Testing steps/scenarios
Demo links
Checklist