This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Make payment method icons display well even if theme tries to override their height/width #4427
Merged
Conversation
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
opr
added
status: needs review
type: enhancement
The issue is a request for an enhancement.
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
focus: global styles
Issues that involve styles/css/layout structure.
labels
Jul 5, 2021
Size Change: +122 B (0%) Total Size: 979 kB
ℹ️ View Unchanged
|
Aljullu
approved these changes
Jul 6, 2021
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.
Looking great, thanks @opr! 👏
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
block: cart
Issues related to the cart block.
block: checkout
Issues related to the checkout block.
focus: global styles
Issues that involve styles/css/layout structure.
type: enhancement
The issue is a request for an enhancement.
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.
Note: I couldn't replicate the issue reported in #4371 without adding custom CSS, such as:
I added this through an option in the theme, but you could also add it to
{your-theme}/style.css
.This PR will add a max-height and max-width to payment method icons, we've seen a couple of instances of themes adding 100% width to images which have been applied to the payment icons.
It also adds the icons to a flex container to ensure they display in a row and wrap onto the next line if there are too many icons to fit on one line.
It also changes the display of the individual payment method icons on the Checkout page, it sets
object-fit: cover
andobject-position: left
so that even if themes have set 100% width on images, any payment method image won't stretch.Fixes #4371 (I can't replicate #4371 but have emulated using custom CSS.)
Screenshots
Cart
Checkout
How to test the changes in this Pull Request:
Changelog