Hacker News new | ask | show | jobs
by tdj 4371 days ago
A layout engine works on a different level of abstraction, putting layout features in CSS will be awkward. CSS is fine for typographic features and selectors, but layout is all about relationships.

Actually, one really impressive engine for web layout engine is Treesaver: https://github.com/Treesaver/treesaver

It's meant to provide primitives that are familiar to people from graphic design working on paginated content, like columns, grids, floating containers. Like Latex, it's also has the least-bad-layout strategy, but here, this runs on the client in Javascript, so that it adapts to the screen size.

I had just stopped working on a startup based on this technology. Operationally, it was proving extremely difficult adding effects that people are taking for granted in InDesign to work in a responsive manner on top of CSS and a 20kLoC Javascript layout engine. It took around a year of development just to get to the level of layout automation sophistication comparable to what a junior layout designer would produce.