-
Notifications
You must be signed in to change notification settings - Fork 219
Add to Cart with Options block: fix inconsistency between editor and frontend #11614
Add to Cart with Options block: fix inconsistency between editor and frontend #11614
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +16 B (0%) Total Size: 1.54 MB
ℹ️ View Unchanged
|
Moving to 11.6.0 |
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.
Good job, @Aljullu. The PR works correctly and addresses the styling inconsistencies between the editor and front end.
.wc-block-editor-add-to-cart-form { | ||
display: flex; | ||
flex-direction: column; | ||
row-gap: $default-block-margin; | ||
} | ||
|
||
input.wc-block-editor-add-to-cart-form__quantity[type="number"] { | ||
max-width: 50px; | ||
min-height: 23px; | ||
float: left; | ||
padding: 6px 6px 6px 12px; | ||
margin-right: 10px; | ||
font-size: 13px; | ||
height: inherit; | ||
} | ||
|
||
input[type="number"]::-webkit-inner-spin-button { | ||
opacity: 1; | ||
} | ||
|
||
button.components-button.wc-block-add-to-cart-form__button { | ||
float: left; | ||
padding: 20px 30px; | ||
border-radius: 0; | ||
} | ||
|
||
.wc-block-editor-container { |
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.
Since some of this code was added to fix: #8582, I'd add a testing step to make sure the button styling is correct both with Gutenberg plugin disabled and enabled.
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.
Good idea, and thanks for the review!
I updated the testing instructions with this step:
Test with WP 6.3 & Gutenberg disabled and WP 6.4 & Gutenberg enabled (you can use this plugin to update to WP 6.4 before it's released).
What
Fixes #11303.
Why
This PR aligns the markup, classes and styles between the editor and the frontend view of the Add to Cart with Options block, to make sure it looks consistent in both views.
Testing Instructions
Screenshots or screencast
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog