Yoast / yoast-components

Accessible React components by Yoast
GNU General Public License v3.0
21 stars 6 forks source link

Fix courses overview layout in IE11 #805

Closed afercia closed 5 years ago

afercia commented 5 years ago

Summary

This PR can be summarized in the following changelog entry:

Relevant technical choices:

Examples updated:

Details: Although the layout change needs to be implemented in wordpress-seo too, the example needs to be updated as well. When switching to flexbox, a new IE11 bug appeared.

In IE 11, when flex items in a column direction have an height that is computed based on a scaled image. the item height is calculated on the height of the image before it gets scaled by the browser. See https://github.com/philipwalton/flexbugs#flexbug-5 Bug demo: https://codepen.io/philipwalton/full/LEbQON

Screenshot of the bug:

screenshot 173

The blank space is given by the space the image would take before it gets scaled. Adding overflow: hidden to the image container fixes the bug.

Test instructions

To test the standalone app in IE11:

Fixes https://github.com/Yoast/wordpress-seo/issues/11953

Dieterrr commented 5 years ago

CR done 👍

IreneStr commented 5 years ago

Acceptance 👍