jh3y / driveway

pure CSS masonry layouts
https://jh3y.github.io/driveway
Other
632 stars 85 forks source link

Implement chronological ordering #10

Open jh3y opened 7 years ago

jh3y commented 7 years ago

The common issue that arises or that I'm asked about is chronological ordering(left to right by order in DOM, usually date). This has been brought up in #1, #7 and #9. It has also been brought to my attention again when I saw a discussion about masonry pop up on Twitter.

This feature does require some JavaScript intervention and can not be implemented via pure CSS alone.

My aim is to implement this as an optional feature that will require some JavaScript to also be included. Think something like;

  <div class='dw dw--chronological'></div>

with;

const el = document.querySelector('#chronological')
const myDriveway = new Driveway(el)

@jh3y

jh3y commented 7 years ago

I've put together an initial implementation for chronological ordering here.

@jh3y