4 ms·
> CSS is not a real constraint language. If it really were a constraint language, it would be better. There's no constraint solver. Just a bunch of rules applie
by GorgeRonde 8y ago
> CSS is not a real constraint language. If it really were a constraint language, it would be better. There's no constraint solver. Just a bunch of rules applied sequentially.
> I'd like to have a real constraint system, like the one in Autodesk Inventor sketch mode
Here you go: https://gss.github.io/ https://gss.github.io/
> GSS reimagines CSS layout & replaces the browser’s layout engine with one that harnesses the Cassowary Constraint Solver
- mch82 8y agoHere’s the [parent project][1] and the old [research page][2] at University of Washington. The most recent implementation is Rust in 2018. The JavaScript repos are inactive. I’m not sure if that’s because the algorithms are considered complete or because the project is dormant. One of the researchers is no longer at UW and the other is an emeritus professor, so semi-retired. The claim is Apple uses these layout algorithms in Interface Builder. [1]: http://overconstrained.io/ http://overconstrained.io/ [2]: https://constraints.cs.washington.edu/cassowary/ https://constraints.cs.washington.edu/cassowary/
- Animats 8y agoToo bad. That was the right idea. With that, we could have Dreamweaver type layout working again. That project seems to be more about the math than making layout easier. That's a problem with many academic projects. One thing I've liked about Autodesk products is that they often have complex math inside, completely hidden from the user. You see that in the CAD world, where the physical universe has to be modeled.
- mpweiher 8y ago> Too bad. That [constraints] was the right idea. In theory, yes. And the theory certainly can work beautifully as intended in practice. However, developers and designer tend to have huge problems with autolayout. Specifying what you want visually as a set of linear constraints is challenging. It is very easy to get very surprising outcomes, easy to overconstrain and underconstrain. It's a very big sledgehammer aimed at some very delicate eggshells. Not just when it comes to understandability, but also when it comes to runtime performance.