1.0.3 • Published 4 years ago
spangrid v1.0.3
Spangrid
Span grid items randomly within an interval.
Usage
Assuming that you're bundling your files with a tool such as Webpack or Browserify, which allow you to "require('modules')" in the browser by bundling up all of your dependencies.
npm i spangrid
<div id="grid">
<h1>Lorem, ipsum dolor</h1>
<h1>Lorem, ipsum dolor</h1>
<h1>Lorem, ipsum dolor</h1>
<h1>Lorem, ipsum dolor</h1>
</div>
const spangrid = require('spangrid')
const grid = document.getElemnetById('grid')
const minSpan = 15 //percentage
const maxSpan = 35 //percentage
const cols = 4
spangrid(grid, minSpan, maxSpan, cols)