minigrid
Version:
Minimal 2kb zero dependency cascading grid layout
94 lines (63 loc) • 2.04 kB
Markdown
//github.com/henriquea/minigrid/issues/60
- Add RTL support https://github.com/henriquea/minigrid/issues/59
- Update `npmcdn` url https://github.com/henriquea/minigrid/pull/57
- Revert breaking change https://github.com/henriquea/minigrid/issues/55
- Add site to js.org
- Move GitHub pages to `master` branch
- Add dist file to `package.json`
The major change is the API. We took one step back to its core principle of "keep it simple".
```js
var props = {
container: '.cards',
item: '.card',
guter: 8
};
var grid = new Minigrid(props);
grid.mount();
```
- Back to 2kb 🎉
- `mount()` method to initialize Minigrid
- Animation was removed due to issues when dealing with many items which is the most of the user cases
- Remove the custom loading causing issues when loaded with require
- Round `posX`, `poxY` values
- Fixes the issue when working with multiple grids/selectors
- Works when loaded via module
- Add containerLoaded and itemLoaded options
- Fix minification
- Remove webpack
- Remove custom `forEach` loop
- Replace custom `window.onload` function for `window.addEventListener('load')`. Closes
- Add `backface-visibility` to prevent text rendering issues. Closes
- Change default `gutter` to `0`
- Fix issue uptading the container className with `--loaded` modifier multiple times
The major change is that now minigrid receives a `props` object rather arguments.
```js
// v1.x
minigrid('.grid', '.grid-item');
// v2.0.0
minigrid({ container: '.grid', item: '.grid-item'});
```
On `window.onLoad` minigrid adds a new className, the container name plus the `--loaded` modifier.
```html
<div class="grid grid--loaded">
...
</div>
```
The same happens for each grid child item when it is ready for use.
```html
<div class="grid grid--loaded">
<div class="grid-item grid-item--loaded">
</div>
```
- Remove `overflow: hidden` https: