-
Notifications
You must be signed in to change notification settings - Fork 72
Fix WooPay express button text clipping #11126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix WooPay express button text clipping #11126
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
|
Size Change: +468 B (0%) Total Size: 874 kB
ℹ️ View Unchanged
|
|
@mgascam is there something specific needed to see the Before state? I tried in Safari and Chrome/Arc, and both
develop.movThis branch: this-branch.mov |
frosso
left a comment
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.
I was able to reproduce the before / after, and test the fix on multiple pages & with mutiple styles/sizes. Changes look good to me. I considered to make a suggestion and creating a SCSS mixin as below, but I think it would have become a little less maintainable.
@mixin responsive-container-queries($size-offset: 0) {
@container woopay-button (max-width: 280px) {
font-size: #{14 + $size-offset}px;
letter-spacing: #{0.5 + ($size-offset * 0.1)}px;
svg {
width: #{88 + $size-offset}px;
margin-left: 4px;
}
}
@container woopay-button (max-width: 240px) {
font-size: #{12 + $size-offset}px;
letter-spacing: #{0.3 + ($size-offset * 0.1)}px;
svg {
width: #{84 + $size-offset}px;
margin-left: 3px;
}
}
@container woopay-button (max-width: 200px) {
font-size: #{10 + $size-offset}px;
letter-spacing: #{0.2 + ($size-offset * 0.1)}px;
svg {
width: #{80 + $size-offset}px;
margin-left: 2px;
}
}
}In the end, the outputted code wouldn't really change in lenght. So this is good to me 👍
|
@RadoslavGeorgiev I think you might need to change the WooPay CTA's value from "Only icon" to something else
|
RadoslavGeorgiev
left a comment
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.
…-cutoff-on-checkout-alt

Fixes #WOOPMNT-5396
This PR fixes the WooPay express checkout button text clipping issue that occurred when buttons were displayed horizontally in constrained layouts (e.g., checkout block with multiple payment buttons).
Changes proposed in this Pull Request
Solutions considered:
Trade-offs:
Screenshots
Before
After
Testing instructions
Tested the button size and call to action variations on Chrome, Safari and Firefox and Mobile Safari.
Prerequisites:
Expected result:
No text or logo clipping at any viewport size or button configuration.
npm run changelogto add a changelog file, choosepatchto leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge