Skip to content

Force all Campaign Block images to be 200x200#2123

Open
Jonas-C wants to merge 1 commit intomasterfrom
force-all-campaign-block-images-to-1-1-aspect-ratio
Open

Force all Campaign Block images to be 200x200#2123
Jonas-C wants to merge 1 commit intomasterfrom
force-all-campaign-block-images-to-1-1-aspect-ratio

Conversation

@Jonas-C
Copy link
Contributor

@Jonas-C Jonas-C commented Feb 12, 2024

@Jonas-C Jonas-C requested a review from a team February 12, 2024 10:51
Copy link
Contributor

@rauboti rauboti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ser ut til å fungere greit på bilder som er kvadratiske eller nesten kvadratiske. Men kan bli rotete for bilder med andre aspect ratios.
image
Er det ev. et alternativ å bruke canvas og drawImage til å croppe bildene? Blir jo en litt større operasjon, men kanskje visuelt penere. Med mindre dette er et så søkt eksempel at det aldri vil skje, in which case, kindly ignore 💯

@John-H-Christiansen
Copy link
Contributor

Kunne du ha byttet ut :
max-width: 200px;
/* This is unset globally on images */
max-height: 200px !important;
min-width: 200px;
min-height: 200px;

Med:
aspect-ratio: 1;
max-block-size: 200px;
min-block-size: 200px;
?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants