Hacker News new | past | comments | ask | show | jobs | submit login

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




I 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...

[2] https://developer.apple.com/library/ios/documentation/userex...

[3] http://gridstylesheets.org/


Great links, thanks!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: