-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Overview
The lead-image card defaults to a vertical view on mobile. The image fills up the space accordingly by using object-fit: cover but the image does get cropped in various ways that might not work great. We should allow users to edit this.
Default w/ object-position: 50% 50%; cuts off football

Edited to have object-position: 37% 50%; may be slightly better on most mobile formats

Recommended Solution
We have some control over what gets cropped on mobile through the object-position CSS property, and for the custom element we already have CSS variables to control this: --lead-image-object-position-horizontal-mobile and --lead-image-object-position-vertical-mobile.
We just need to add the ability to edit these CSS variables within the no-code tool.
For simplicity, for the object-position variables, I think we should allow the user to set a range from 0% to 100%. Looking at --podcast-grid-max-width (another CSS variable, for the podcast-grid custom element) in the menu-dev.js file could provide a reasonable example of how to enable this type feature within the no-code tool.