-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix for small screens with large fonts don't fit all content #2946
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.
This looks good. I left some minor feedback.
assets/quick-order-list.css
Outdated
@@ -187,6 +187,12 @@ quick-order-list .quantity__button { | |||
align-items: center; | |||
} | |||
|
|||
@media screen and (max-width: 749px) { | |||
.variant-item__discounted-prices { | |||
display: block; |
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.
We could use flex-wrap: wrap;
instead since display: flex;
is already being applied here. Additionally, flex-wrap: wrap
would allow the prices to be on the same line when there is available space, whereas display: block
forces them to be on separate lines (video).
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.
Hey Andrew, thanks for a good idea. This makes sense. Fixed.
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.
Sick! That's a great call, @andrewetchen... sorry, late to catching up with this one. 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.
This 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.
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.
Tested on my phone, iPad, and on Desktop. All looks great and works as advertised. Thanks @eugenekasimov!
* upstream/main: (205 commits) Fix for small screens with large fonts don't fit all content (Shopify#2946) Adjust quantity rules margin (Shopify#2948) Update Social media settings defaults to remove Shopify links (Shopify#2830) added json to barcode to pass gtin as a json string (Shopify#2804) Fixed extra margin spacing in collage section when header is empty (Shopify#2770) Track state of mouseenter event (Shopify#2934) Fix misalignment of total items in quick order list (Shopify#2923) Hide vol pricing and qty rules when variant is unavailable (Shopify#2889) Fix font family for quick order list (Shopify#2888) v11.0.0 version bump and release notes (Shopify#2916) Revert "v11.0.0 version bump and release notes (Shopify#2906)" (Shopify#2915) Update quantity-popover.css v11.0.0 version bump and release notes (Shopify#2906) Fix social list styles loading (Shopify#2900) Fix an error (Shopify#2903) Fix hardcoded info color (Shopify#2893) Fix error misalignment for Quick order list (Shopify#2887) Replace generic section name with section ID. (Shopify#2884) Fix cart drawer for variant list and tablet spacing (Shopify#2880) Add missing shadow styles to inputs in Quick Order List (Shopify#2879) ...
…#2946) * Change display flex to block for mobile * Revert back from display block to flex. Add flex wrap.
PR Summary:
This PR fixes an issue when the total price of an item on mobile goes out of screen. This happens when an item has
compare_at_price
and large fonts, so in that case there is just not enough room to fit the total price on a small screen.Why are these changes introduced?
Fixes #2931 .
What approach did you take?
I changed the way we display
the old priceand the current one. They used to be in one line. Now I place them in two different lines under each other.Visual impact on existing themes
The layout of
the old priceand the current one has been changed for mobile.Before
After
Testing steps/scenarios
Demo links
Checklist