Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But now you just added `whitespace: no-wrap` to the middle element, with `overflow: visible`, to force it into a single line. That's hardly a generic solution, because it makes assumptions about the contained items... i.e. applying `whitespace: no-wrap` and `overflow: visible` will typically break the appearance of things.

Regarding AutoLayout: the six constraints from my original comment, don't say anything about the relationship between the left/middle/right items, so they will simply overlap if there isn't enough space. This can be remedied by adding two extra constraints:

1. left.right < middle.left

2. middle.right < right.left

It's just a bunch of equations. No weird tricks, no special cases, no hacks. You describe what you want with equations, and the solver spits out the solution.



Do you have an email? I am thinking of doing a blog post comparing css/auto layout, and would like your input?


Sure: gvjjdcnohdt@protonmail.com


Yeh, I edited my reply, I realised what you meant afterwards.

Auto layout does sound neat.




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

Search: