5 ms·
What layouts does Flexbox solve that Cassowary[0] or GSS[1] layout doesn't? [0]http://en.wikipedia.org/wiki/Cassowary_(software) http://en.wikipedia.org/wiki/C
by Ygg2 11y ago
What layouts does Flexbox solve that Cassowary[0] or GSS[1] layout doesn't?
[0]http://en.wikipedia.org/wiki/Cassowary_(software) http://en.wikipedia.org/wiki/Cassowary_(software)
[1]http://gridstylesheets.org/ http://gridstylesheets.org/
- de_dave 11y agoFor a start, flexbox doesn't require JS.
- Ygg2 11y agoI meant more as in Layouts. Anyway, cleared that miscommunication.
- dyladan 11y agoBuilt-in browser support
- Ygg2 11y agoThat's kinda only true at the moment. With https://wiki.css-houdini.org/ https://wiki.css-houdini.org/ there is a chance you could implement custom layout in CSS.
- kagamine 11y agoAs 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).
- scotu 11y agoI'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
- phaer 11y agohttp://caniuse.com/#feat=flexbox http://caniuse.com/#feat=flexbox
- Eric_WVGG 11y agohttps://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties?utm_content=buffer4b45b&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-p...
- kagamine 11y agohttps://css-tricks.com/snippets/css/a-guide-to-flexbox/ https://css-tricks.com/snippets/css/a-guide-to-flexbox/ https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes?redirectlocale=en-US&redirectslug=CSS%2FTutorials%2FUsing_CSS_flexible_boxes https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexi...
- woah 11y agoHere is some extensive discussion on that very issue: https://twitter.com/nikitonsky/status/561941079038390273?__hstc=114081816.f76a75a67c7899992519d5ce8d6f27e8.1432297175947.1432297175947.1432297175947.1&__hssc=114081816.1.1432297175948&__hsfp=554760146 https://twitter.com/nikitonsky/status/561941079038390273?__h... Basically, constraint solving is harder to understanding, doesn't support wrapping, and is slow.
- Ygg2 11y agoThis 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.
- pcwalton 11y agoGPU 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.
- recuter 11y agoThere'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.
- panic 11y agoAutolayout 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.