Skip to content

Calculate the hypothetical vertical margin between two elements, which is automatically "collapsed" by CSS.

Notifications You must be signed in to change notification settings

owen-m1/collapsed-margin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

collapsed-margin

Calculate the hypothetical vertical margin between two elements, which is automatically "collapsed" by CSS.

Installation:

npm install --save collapsed-margin

Usage:

import collapsedMargin from 'collapsed-margin';

var el1 = document.getElementById('el1');
var el2 = document.getElementById('el2');

var spaceBetween = collapsedMargin(el1, el2);

About

Calculate the hypothetical vertical margin between two elements, which is automatically "collapsed" by CSS.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published