twbs / bootstrap

The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web.
https://getbootstrap.com
MIT License
167.75k stars 78.47k forks source link

Added object position for images #39930

Closed IarinaX closed 1 week ago

IarinaX commented 1 month ago

Description

Motivation & Context

Type of changes

This pull request addresses the issue https://github.com/twbs/bootstrap/issues/39196 by introducing support for the object-position property within Bootstrap's utility classes. The absence of this property limited developers' ability to precisely control the positioning of images within their projects. To remedy this, we have implemented a set of utility classes that enable developers to specify the position of images with greater flexibility and granularity.

Changes:

Added new utility classes for object-position property. Defined utility classes for centering, top-left, top-right, top-center, bottom-left, bottom-right, and bottom-center positioning options. Ensured compatibility with Bootstrap's design principles and naming conventions. Testing:

Conducted thorough testing to verify the functionality and compatibility of the new utility classes across different browsers and devices. Tested various positioning scenarios to ensure consistent behavior and visual presentation. Impact:

Enhances the flexibility and usability of Bootstrap's image handling capabilities. Empowers developers to create visually appealing and well-structured layouts with ease. Improves the overall user experience for developers working with Bootstrap-based projects.

Live previews

Related issues

Closes #39196