-
Notifications
You must be signed in to change notification settings - Fork 219
Product grid Blocks have some differences compared to product list #3349
Comments
Hi @MaggieCabrer👋🏻, I'll let @Aljullu weigh in on the inconsistencies with the sales badge positioning between the different contexts, that may be something we can look into addressing. Besides that I'd like to address this:
To give some context around why things are the way they are now, it's good to review #2403 and #891. Besides the rationale given in those two issues (which is important and I won't rehash here), we have intentionally departed from consistency with structure and css between the two views because:
|
Thanks for opening this issue @MaggieCabrera, loads of good stuff here!
Nice catch with this. I'm pretty sure that was unnoticed by us because it can't be reproduced in WC default theme (Storefront). I created an issue to fix this (or leave it unfixed, depending on design feedback): #3354.
That seems to be because Varia adds some specific styles to the sale badge. This is what I see when I inspect it: #content .wc-block-grid .wc-block-grid__product .wc-block-grid__product-onsale {
right: calc(-0.5em + 16px);
...
} Should we open an issue in Varia's repo in order to investigate that? I'm not sure about the purpose of those styles.
It's true there is an inconsistency with WooCommerce Core styles here. But in this case I don't think we want to fix it, we are trying as much as possible to avoid changing the opacity of text for accessibility reasons. That can't be undone in WC Core without breaking the styles from live stores, but WC Blocks allows us to "start from scratch" in this field, and I think it's the right decision not to tweak the opacity (but I'm happy to discuss 🙂 ). My suggestion would be to implement the desired style in the theme. I see Varia has this selector: #woocommerce-wrapper ul.products li.product .price del ... {
opacity: 0.5;
...
} You could add the WC Blocks specific selector to it and all blocks will inherit those styles too: #woocommerce-wrapper ul.products li.product .price del,
+.wc-block-components-product-price__regular {
opacity: 0.5;
...
} I don't know if you are working on Varia. If not, let me know and I can create the issues in the repo. 🙂 |
Thanks for your feedback both of you!
@nerrad I completely understand what you mean and makes a lot of sense
@Aljullu thanks for pointing this out! I thought the discrepancy was coming from the block's css but I wasn't looking at it correctly I chose Varia as an example because it had minimal styles but my point with this issue was trying to streamline how the block is going to look right at its base (rather than making these tweaks for every single theme we design and develop) and leave to the themes just customization, not homogenization between blocks and the rest of the store. I see this will not be an issue in the future for the reasons @nerrad explained so feel free to close if you feel like this issue is not relevant anymore. Thank you for your time! |
Thanks Maggie for raising the issues - it looks like anything actionable from this issue has been noted so I'll go ahead and close it. |
Describe the bug
To reproduce
Steps to reproduce the behavior:
Expected behavior
I expected both views to look the same
Screenshots
Product list page:
Best Selling Products Block
I added a background to the body in order to see the position of the sale badge:
Enviroment
WordPress (please complete the following information):
Desktop (please complete the following information):
I wonder if these blocks and the regular grid should share some css/classes inorder to avoid duplicate css both on Woo's side and on the theme's. Right now it looks like any change that we want to do to the style of the products grids will need to be done twice.
The text was updated successfully, but these errors were encountered: