[Backport to release/10.6] [WOOPRD-3142] Fix buttons stacking poorly on smaller viewports on WP 7.0#63836
Conversation
…7.0 (#63815) --------- Co-authored-by: Agent Runner <agent@runner.local> Co-authored-by: Jorge Torres <jorge.torres@automattic.com>
Testing GuidelinesHi @jorgeatorres @nerrad , Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
|
Size Change: +225 B (0%) Total Size: 5.97 MB
|
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
This PR is a cherry-pick of #63815 to
release/10.6.Original PR Description
Submission Review Guidelines:
Changes proposed in this Pull Request:
WordPress 7.0 increased default button
min-heightfrom 30px to 40px. This causes action button rows in the single order view to wrap/stack at ~1200px viewport widths, where they previously fit on a single line.This PR adds responsive CSS rules scoped under the
.wc-wp-version-gte-70body class to fix premature button wrapping in:.add-items): "Add item(s)", "Apply coupon", "Refund", "Recalculate" buttons.refund-actions): "Refund via [gateway]", "Refund manually", "Cancel" buttons#actions): select dropdown + apply buttonAt viewports ≤1280px, the fix:
min-height,padding, andfont-sizeto prevent premature wrapping.add-itemsand.refund-actionsfrom float-based to flexbox layout withflex-wrapandgapfor graceful degradationAlso adds the
wc-wp-version-gte-70body class detection inclass-wc-admin.php(same pattern used by PR #63779).Closes WOOPRD-3142
Part of WOOPRD-3138 (Single Order View — WP 7.0 Visual Regressions)
How to test the changes in this Pull Request:
Testing that has already taken place:
Milestone
Automatically assign milestone for the next WooCommerce versionChangelog entry
This Pull Request does not require a changelog entry. (Comment required below)Changelog Entry Comment
Comment
Changelog entry was created manually in
plugins/woocommerce/changelog/fix-buttons-stacking-small-viewports.