A simple module that, given some logos images, resize them so that they appear in harmony when placed on a row / grid.
npm i ratiologos
import { ratiologos } from 'ratiologos'
ratiologos({
element: '.logos__img',
// other options
});
- element: The elements that you want to resize;
- widthBase: The base width for the elements, defaults to 100;
- scaleFactor: The scale factor for the elements, defaults to 0.525;
In orther to avoid FOUC, you should set the initial display property on your elements to none
.