5 ms·
Funnily enough Apple's UI toolkits (both macOS's AppKit and iOS's UIKit) use Cassowary constraint solvers under the hood. There was also a startup a while back
by kmeisthax 6y ago
Funnily enough Apple's UI toolkits (both macOS's AppKit and iOS's UIKit) use Cassowary constraint solvers under the hood. There was also a startup a while back (The Grid, I think?) that was trying to use it as the basis of a web design platform. No clue if they ever shipped anything but I remember seeing their source release for the constraint solver and thinking, "Man, if calculating layout in JavaScript wasn't a total jankfest for end-users I'd totally use this".
- Animats 6y agoThat makes sense for GUI systems. If you have lots of elements with alignment constraints, a constraint solver is the right tool for the job. 20 years ago, they were obscure pieces of software, though, and rather alien to people who were thinking "word processor".
- wruza 6y agoI guess you're talking about GSS, which works fine, but I haven't seen any mention of it on the internets until this. What bugs me most is that we're stuck with what browsers provide, and they not gonna do display: cassowary; or display: kiwi; no matter how loud you cry for something a little more sane than a bunch of css crutches glued together. I'd totally use this too. https://gss.github.io/ https://gss.github.io/ http://overconstrained.io/ http://overconstrained.io/
- esprehn 6y agoThe Houdini Layout API is specifically designed to allow adding things like display: cassowary and display: kiwi https://houdini.glitch.me/layout https://houdini.glitch.me/layout There's much discussion within browser makers about making it so you're not stuck with only what they provide.
- madeofpalk 6y agoI was going to say exactly this - Houdini is a set of APIs that exposes the (CSS) layout engine to you in CSS to do all sorts of custom funky things.
- wruza 6y agoOh, that looks so promising that just glancing over that page and seeing a request/allocate cycle felt like a breath of fresh air (well, good old fresh). Thanks for sharing!
- dmitriid 6y agoCassowary was suggested to w3c in 1999 IIRC, but was rejected. Even though the concerns are understandable at the time (processing requirements), it's still a sad development. EDIT: A better description from the author of css-layout: https://news.ycombinator.com/item?id=13125160 https://news.ycombinator.com/item?id=13125160
- cxr 6y ago280 North did this with Cappuccino and their Atlas tool (which has unfortunately been swallowed up and forgotten after the company was acquired by Motorola).