Repository navigation
Fix review form overflow on phones, bump to 1.18.1 - #33
Merged
Merged
Conversation
The product review form's inputs set width: 100% plus padding and a border under the default content-box sizing, so they overflowed the column and gave single product pages a horizontal scrollbar at 360-414px.
The fields use width: 100% plus padding, the same shape that overflowed the product review form. Core's comments-form block styles already apply border-box here, so nothing overflowed; the theme rule now states it itself rather than depending on that stylesheet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On single product pages, the review form's inputs, select and textarea (
assets/css/woocommerce.css) setwidth: 100%plus padding and a border under the defaultcontent-boxsizing. The name and email fields ran 6-7px past their column, giving every product page a horizontal scrollbar at 360-414px.Changes
assets/css/woocommerce.css: addbox-sizing: border-boxto the review form field rule.style.css§6.7: the post comment form fields have the samewidth: 100%plus padding. They did not overflow, because core's comments-form block styles already applyborder-box, but the theme rule now declares it itself. Hardening only, no visible change.style.css,CHANGELOG.md,readme.txtandpackage.json.Testing
Synced to the local demo multisite and compared
scrollWidthwith the viewport in headless Chromium at 360, 414, 600, 768, 860, 900, 1024, 1186, 1280, 1366, 1440, 1512 and 1920px:border-boxwith their right edge flush to the column, both before and after.Cart and checkout still overflow locally. That comes from a missing thumbnail image in the demo subsite's uploads (the files were not restored), not from theme code.