3 ms·
Are there any CSS replacement proposals that are based on linear programming [1]? There are a lot of things you cannot solve with just LP (e.g. rearranging f
by colanderman 12y ago
Are there any CSS replacement proposals that are based on linear programming [1]? There are a lot of things you cannot solve with just LP (e.g. rearranging floats on a page) but it's a pretty good -- and simple -- abstraction for laying out boxes relative to each other.
Solving LP is fast, especially when many of your constraints are equality constraints (as would be when specifying tables).
[1] http://en.wikipedia.org/wiki/Linear_programming http://en.wikipedia.org/wiki/Linear_programming
- drifkin 12y agoI think Cassowary [1] is what you're talking about (particularly section 1.2 where they talk about some modifications to make their system very fast for incremental updates). Apple has based their constraint-based layout system, Autolayout [2], on Cassowary. There's also a project that incorporates Cassowary constraints into a CSS-like declarative syntax called GSS [3]. [1] https://www.cs.washington.edu/research/constraints/cassowary/cassowary-tr.pdf https://www.cs.washington.edu/research/constraints/cassowary... [2] https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/Introduction/Introduction.html https://developer.apple.com/library/ios/documentation/userex... [3] http://gridstylesheets.org/ http://gridstylesheets.org/
- colanderman 12y agoGreat links, thanks!