3 ms·
Dynamic layout is a hard problem. I've never come across a layout engine that didn't require at least a day to get comfortable with. Some may have the advantage
by jasonkostempski 11y ago
Dynamic layout is a hard problem. I've never come across a layout engine that didn't require at least a day to get comfortable with. Some may have the advantage of being similar to something you've used before and might give you a head start but that can also slow you down when you assumed it's exactly like the other when it's not.
- Animats 11y agoIf you want to see a completely different approach to dynamic layout that makes more sense, check out the constraint system in the 2D sketch system of Autodesk Inventor. It's all visual, controlled through a GUI; you select two points or two lines or a point and line and apply constraints such as "coincident" or "perpendicular" or "parallel" or "tangent". You can also give things explicit dimensions, which may be computed from other dimensions. The GUI stops you if you try to insert incompatible constraints. You can put in text, too, so you can actually use it as a layout engine. There's no notion of "line break", though; it won't change the number of things in a row if you change the outer bounding width. This is much more comfortable for designers than trying to do it through a set of declarations with no consistency checking. A constraint engine really is the right tool for the job. It also maps well to a GUI, which CSS does not. The constraint system isn't limited to horizontal and vertical. You can have circles, arcs, and even splines. Graphic designers would love to have such capabilities in web design.