https://github.com/vovayatsyuk/shrink-to-viewport
Automatically update element's max-height to fit viewport size https://vovayatsyuk.github.io/shrink-to-viewport/
https://github.com/vovayatsyuk/shrink-to-viewport
height-calculation viewport
Last synced: 5 months ago
JSON representation
Automatically update element's max-height to fit viewport size https://vovayatsyuk.github.io/shrink-to-viewport/
- Host: GitHub
- URL: https://github.com/vovayatsyuk/shrink-to-viewport
- Owner: vovayatsyuk
- Created: 2017-02-19T19:22:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-21T19:15:21.000Z (over 9 years ago)
- Last Synced: 2025-05-20T21:38:05.438Z (about 1 year ago)
- Topics: height-calculation, viewport
- Language: HTML
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```js
new ShrinkToViewport(document.getElementById('aside'), {
offset: 20
});
```