-
Notifications
You must be signed in to change notification settings - Fork 219
Missing margin when using cart and checkout blocks in full width mode #5010
Comments
Is this a storefront issue or is this behavior consistent in all themes? Should Cart/Checkout provide margin when they're full width anyway? isn't this a responsibility for the parent block (group, template part...) |
I agree with Nadir here, I wonder if this more a theme issue. |
It's consistent in all themes. At least, I checked the following default themes and they all show the same behaviour:
I cannot answer that question, but I can say that our current approach is inconsistent, as the cart block shows a right-margin in full-mode. In my opinion, both the cart and the checkout blocks should either have a default margin on both sides or no margin at all.
Relying on a parent block, could solve the problem. That said, it would also require adding an extra element to the DOM. Thus, instead of adding the cart or checkout block directly, a merchant would have to add a group block first and then add the cart or checkout block as the only element to it. |
@niels, I'm not seeing quite the same thing as you in my testing (using Chrome browser).
I'm seeing equal margin on both sides. The cart does have less margin than the checkout though. What might be beneficial here is to see if this is a change from the previous iteration of the blocks. |
I have no explanation why you're seeing a different result, @nerrad. I see the same result, that I posted in the description, both in Local by Flywheel and in https://jurassic.ninja/ and https://tastewp.com/. The only recent change I could find is the following change, that added margin to the cart order summary block: |
Let's figure this out then.
That's just a short list of things that might impact different behaviour. If we're still not able to determine the cause from comparing environments, the next step might be to get another team member to try and verify, but I can just add this for the next person doing porter rotation to look at. Also related to this comment:
I think Nadir wasn't necessarily saying that a group block would have to be added. He's just referring to how margins for alignments should be primarily controlled by the wrapping container, whether that comes from a block (group or column), a template part, a template, or a theme. |
@nerrad I created a fresh site using Local by Flywheel and I still do not see the margins on my end. These are the versions I'm running:
WooCommerce system status report
I did not install Gutenberg this time and I noticed that you're using Storefront 3.5.1, while I'm using Storefront 3.9.1. When trying to build Storefront 3.5.1, I received the following error in the console:
@frontdevde As you're porter this week, would you mind checking if you're able to reproduce this problem? |
I'm currently prioritizing the work remaining on the Store Editing Templates v1 project to ensure we can ship it this week. I'll put it on my to-do list for the end of the week but I can't promise I get to it (depending on how things go on the project). |
I can reproduce the same as @nielslange. I think there are a couple of issues here:
|
I just checked the wide alignment, and it works perfect. Independent of the screen width, there's always an outer margin visible. I'll go with this solution for now. We can always iterate towards a full-width solution later, if really needed. |
Describe the bug
To reproduce
Steps to reproduce the behavior:
Expected behavior
I expected that both the cart and the checkout block have some spacing between the block and the browser border.
Screenshots
The text was updated successfully, but these errors were encountered: