Add Image ratio as utility class

Created on 26 May 2023, over 1 year ago
Updated 14 September 2023, over 1 year ago

Problem/Motivation

In the roadmap 🌱 [META] Stable release Fixed there is a task to create the image ratio throught utility classes.
With this utility we can reduce the image styles in the site, the user can select the aspect ratio and the fit of the image, if is cover or contain (letterboxing) keeping the original aspect ratio to fit in the area.

Proposed resolution

Add a new utility class for the aspect ratio, adding the most used aspect ratios (1:1, 4:3, 16:9, 3:4). For each aspect ratio you can select the fit of the image, cover or contain, and for cover you can select the position of the image (top, left, right, bottom, center).
A small css is provided to cover all this options.

Feature request
Status

Fixed

Version

1.0

Component

User interface

Created by

🇪🇸Spain alzz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024