Open lewisdorigo opened 1 month ago
When an Aspect Box is used within a page layout, images are incorrectly sized.
This is because, in src/base/objects/layout/_layout.scss, image height is set to auto.
auto
This selector's specificity means it is overriding the height specified in src/components/aspect-box/_aspect-box.scss.
<div class="ds_layout"> <div class="ds_layout__content"> <div class="ds_aspect-box ds_aspect-box--square"> <img src="//picsum.photos/1280/720/" alt="" class="ds_aspect-box__inner" /> </div> </div> </div>
The image shows as a square, cropped to the centre of the image.
(Added outlines to aspect box, and to image to show bounding boxes).
Thanks Lewis. A fix for this is currently in testing and will be in the next release.
Description of the issue
When an Aspect Box is used within a page layout, images are incorrectly sized.
This is because, in src/base/objects/layout/_layout.scss, image height is set to
auto
.This selector's specificity means it is overriding the height specified in src/components/aspect-box/_aspect-box.scss.
Steps to reproduce the issue
Expected behaviour
The image shows as a square, cropped to the centre of the image.
Screenshots
(Added outlines to aspect box, and to image to show bounding boxes).