Hacker News new | ask | show | jobs
by wanda 3791 days ago
I've looked at this for all of three minutes, but it appears that it's basically an Angular version of Masonry with a dash of flexbox.

Masonry is something I'd love to implement in pure CSS, but it's not really possible. You need to know the heights and then be able to position your grid items absolutely, it's not something that can be done dynamically without using JavaScript.

You can use CSS3 Columns, but then your content is going to be displayed in a counter-intuitive order. It works great for a photo grid or Pinterest-style site, but most cases require some kind of intuitive display order. I am especially thinking of e-commerce, where it's imperative to offer the end-user the ability to sort products alphabetically, and search results in terms of relevance or whatever.

1 comments

Angular Material doesn't suffer from any of those issues because it is based on flexbox. It works without Javascript, only it hasn't been written to do that. There are two issues:

- first, the elements being selected are all angular directives like `md-content`, `md-button` -- not a dependency on Javascript but clearly targeting a JS app

- a second theme stylesheet is dynamically generated and injected into the head

None of these are strict requirements -- I've extracted the stylesheet and repurposed it for my own projects.