benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 205 forks source link

[BUGFIX] #1479 Wrong image width in containers when nesting containers #1538

Open Q4U-mspitz opened 1 week ago

Q4U-mspitz commented 1 week ago

Pull Request

Related Issues

Prerequisites

Description

The layout used the colPos of the Contentelement for each Container. If you used a 75/25 container and placed a 50/50 container inside the 75% column, the images are calculated with multiplier 0.75 0.75 for the left image and 0.25 0.25 for the right image.

Instead of this, the colPos of the container has to be respected in calculation. And that´s what this Fix does.

Steps to Validate

  1. place a 75/25 Container somwhere on the page
  2. place a 50/50 container inside the 75% column of the previous container
  3. place TextMedia-Elements with images inside both columns of the 50/50 container

The right image will be blurry, because the 0.25 multiplier of the outer container is also used for calculating the 50/50 container.

After this fix, both images are calculated the right way and both are the same size.