-
Notifications
You must be signed in to change notification settings - Fork 77
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 product page overflow in mobile view #383
Conversation
Hi @lucrp, can you post a screenshot of the overflow issue please? 🤔 Edit - I see it :-) |
This is weird, I just built fresh develop branch of the theme and I have no issue like this. The gap between columns should not affect the row width at all. Are you sure you didn't modify anything? |
Hi @Hlavtox ! I found this problem with a little JS snippet that I use to find overflows like this, if you want to test it, just type this in your browser's console: document.querySelectorAll('*').forEach(el => {
if (el.offsetWidth > document.documentElement.offsetWidth) {
console.log('Found the worst element ever: ', el);
}
}); |
Adding col-12 to mobile devices in product__left class also fix the overflow problem, not need to change row g-5 class.
I found another way of solving that. If we add a |
Only way I found to fix overflow in this page
@lucrp we did investigate it, the col fix isn't the right one at all The parent container has an inferior gutter than the row of these columns, I guess the right fix is probably about reducing the gutters on mobile or both desktop and mobile, we should really take care about the fact that he gutter helper is fine with the parent container |
So, if I use |
|
@Hlavtox feel free to merge if you feel it's good, should do the job! |
Thanks @lucrp! |
product.tpl
there is ag-5
class in<div class="row g-5 product js-product-container">
that causes a slight overflow. Changing it tog-lg-5
fixes that.