-
Notifications
You must be signed in to change notification settings - Fork 50
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
Uniform Smart Button Display for PayPal, Google Pay, and Apple Pay (2177) #1900
Merged
Dinamiko
merged 5 commits into
trunk
from
PCP-2177-uniform-smart-button-display-for-pay-pal-google-pay-and-apple-pay
Dec 14, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
46c575a
Fix apm button styling
pedrosilva-pt 55c7900
Adjust block button styles.
pedrosilva-pt ec0dd52
Adjustments to apm button layouts.
pedrosilva-pt c59f6de
Fix ApmButton margin condition.
pedrosilva-pt 39040eb
Remove unused code.
pedrosilva-pt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@use "../../../ppcp-button/resources/css/mixins/apm-button" as apm-button; | ||
|
||
li[id^="express-payment-method-ppcp-"] { | ||
line-height: 0; | ||
|
||
// Set min-width to 0 as the buttons need to fit in a tight grid. | ||
.paypal-buttons { | ||
min-width: 0 !important; | ||
} | ||
} | ||
|
||
.ppcp-button-apm { | ||
@include apm-button.button; | ||
} | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
@mixin button { | ||
overflow: hidden; | ||
min-width: 0; | ||
max-width: 750px; | ||
line-height: 0; | ||
border-radius: 4px; | ||
|
||
// Defaults | ||
height: 45px; | ||
margin-top: 14px; | ||
|
||
&.ppcp-button-pill { | ||
border-radius: 50px; | ||
} | ||
|
||
&.ppcp-button-minicart { | ||
display: block; | ||
} | ||
|
||
.ppcp-width-min & { | ||
height: 35px; | ||
} | ||
|
||
.ppcp-width-300 & { | ||
height: 45px; | ||
} | ||
|
||
.ppcp-width-500 & { | ||
height: 55px; | ||
} | ||
|
||
// No margin on block layout. | ||
.wp-block-woocommerce-checkout &, .wp-block-woocommerce-cart & { | ||
margin: 0; | ||
min-width: 0; | ||
} | ||
|
||
.wp-admin & { | ||
pointer-events: none; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This may not load in editor (if block not added yet).
If we want to fix that, here is how I check it in the messaging branch 4e34332
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 don't think we should load in the block editor right now as the preview there currently isn't working, maybe address it in the context of that fix:
![image](https://private-user-images.githubusercontent.com/45217709/290155590-a8962f4d-58cd-4b8a-a59e-f9a1ab43e9eb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NTAzNzcsIm5iZiI6MTczOTQ1MDA3NywicGF0aCI6Ii80NTIxNzcwOS8yOTAxNTU1OTAtYTg5NjJmNGQtNThjZC00YjhhLWE1OWUtZjlhMWFiNDNlOWViLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDEyMzQzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI1YTg5YTgwYTE3MTczMTdiMDJhMjQ0MzUzMmQ3OWJhNDAwM2EyZjcwY2IxMjNhZjI0NjA2NjFjMGFhOTQ0ZWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.eSnowV1CGo7mpqKhhV0GfCz-ZllpA_oY08Oi4DZISZE)