Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What layouts does Flexbox solve that Cassowary[0] or GSS[1] layout doesn't?

[0]http://en.wikipedia.org/wiki/Cassowary_(software)

[1]http://gridstylesheets.org/



As another user says, no js.

Pure CSS runs in the browser without a get request (other than the CSS file you are already using, obv.) so it eliminates the need for a grid system like Bootstrap, 960gs etc. The 'grid' is there in the CSS and html where it is meant to be, without the need for @media queries with 10 decimal points and 15 font sizes. It also provides more layout options than currently exist without the need for hacky solutions.

How useful the linked site is right now is questionable though. If you want a IE8+ cross browser & mobile site to rely on flex-box ... it can be done and quite easily, but not with the skeleton examples on that page (but they do point that out themselves).


I'd like to read more about flexbox, any link you'd recommend? Especially backwards compatibility and the cross browser/mobile you are mentioning are something I'm interested in. Thanks





Here is some extensive discussion on that very issue: https://twitter.com/nikitonsky/status/561941079038390273?__h...

Basically, constraint solving is harder to understanding, doesn't support wrapping, and is slow.


This is the kind of response I was looking for. Though I have to ask, is this specific to Cassowary.js or to Cassowary constraint solver in general?

Because from what I've seen/heard, the Cassowary constraint solver is used extensively in Mac OS X/iOS for UI layout, which AFAIK isn't really referred to as slow.

Plus the constraint solver does operate on a matrix of constraint, which should make it easier to work on GPU.


GPU based Web page layout has so many practical hurdles to overcome that the fact that Cassowary can be described in terms of a matrix isn't relevant.


Autolayout is very slow compared to manual layout on iOS. It limits the complexity of the UI you can build, especially if you need to update the layout at the display's refresh rate.


There's no reason why constraint solving wouldn't work just as well in the browser as AutoLayout works on OSX/iOS if it was natively implemented.

It is not natively implemented however. Also, to take it further, Cassowary.js could solve for and output to flexbox as a backend.


For a start, flexbox doesn't require JS.


I meant more as in Layouts. Anyway, cleared that miscommunication.


Built-in browser support


That's kinda only true at the moment.

With https://wiki.css-houdini.org/ there is a chance you could implement custom layout in CSS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: