equalizeheight

0.1.4 • Public • Published

Equalize height

Equalize the height of elements on the same row, based on their offsetTop value. Most importantly, this also works for responsive layouts.

Installing

Using npm:

$ npm install equalizeheight

How to use

First, import the package into your project:

import 'equalizeheight';

To equalize the height of elements on the same row, you simply add a data-equalize-height attribute to those elements with a dedicated group name:

<div>
    <span data-equalize-height="group-name">Hello world!</span>
    <span data-equalize-height="group-name">Hello world!</span>
    <span data-equalize-height="group-name">Hello world!</span>
</div>

Just like that, all items on the same row with the same group name will be set to the same height. DONE!

Readme

Keywords

none

Package Sidebar

Install

npm i equalizeheight

Weekly Downloads

6

Version

0.1.4

License

ISC

Unpacked Size

11.8 kB

Total Files

4

Last publish

Collaborators

  • tijsv