3 ms·
The layout constraints system on iOS works pretty well once you understand that it uses a global constraint solver: https://developer.apple.com/library/archive
by thexa4 8y ago
The layout constraints system on iOS works pretty well once you understand that it uses a global constraint solver:
https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/index.html https://developer.apple.com/library/archive/documentation/Us...
- ZenPsycho 8y agoI wonder if CSS could be translated/compiled to sets of linear constraints? Obviously just the parts that affect layout would be relevant for this translation. But I wonder if it's possible to come up with a formalised mathematical relationship between the byzantine context sensitive rules of CSS layout, and the smaller set of building blocks that cassowary supplies. And then, I wonder how much could be round tripped? Do flexbox and grid fill enough of the gaps to make systems of linear constraints fully expressible in terms of flexbox/grid? If not, where are the remaining gaps, and are they useful enough "real world" usecases that you couldn't practically make constraints->css a (potentially) lossy translation. It kinda looks like GSS attempted this, but I wonder if GSS can be improved upon to rely less on JS for filling the gaps in 2018?