Skip to content

vovayatsyuk/shrink-to-viewport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Shrink to Viewport

The script calculates maximum of available height for the element to fit the viewport and set it as max-height style.

Usage

new ShrinkToViewport(document.getElementById('aside'), {
    offset: 20
});