masakudamatsu / line-height-picker

A front-end web app that helps web designers/developers pick the best line-height value for their websites
https://line-height-picker.vercel.app
MIT License
2 stars 1 forks source link

Add size dimensions to the img elements #249

Closed masakudamatsu closed 3 years ago

masakudamatsu commented 3 years ago

To avoid the layout shifts.

In CSS, make sure that height: auto is included so the aspect ratio won't be distorted.

See https://web.dev/optimize-cls/ for detail.

masakudamatsu commented 3 years ago

The current LightHouse audit result:

Screenshot 2020-09-21 at 10 49 19
masakudamatsu commented 3 years ago

After adding the width/height attributes:

Screenshot 2020-09-21 at 11 11 17