Hacker News new | ask | show | jobs
by asiachick 1334 days ago
IIRC the way someone reimplemented flexbox was to take the layout tests and iterate until their implementation passed.

https://yogalayout.com/

2 comments

There may be layout tests for flexbox (I haven't looked into them, because I don't care about them as much as normal flow) but there are basically no layout tests for CSS 2.1 that aren't fully manual.

So basically for 25 years, as far as I understand, no one said, hey given a set of known layout constraints and rasterization parameters, let's create automated tests.

For 25 years.

Maybe I'm wrong, but I keep looking for these tests and the ones that exist for normal flow are a nonstarter.

There was acid2, so merely "almost none" rather than actually none
Yes, but the fact that someone had to do this makes it clear that the spec isn't complete. A complete spec would state the algorithm unambiguously. You might still need to fix bugs based on tests, but you shouldn't need to be working about behaviour because it's unspecified.
Not my experience at all. It doesn't matter how well written a spec is. No tests = no conformance. End of story. Most people can't hold an entire spec in their head or think through all the ramifications of the edge cases. Even the spec writers. I work on several specs. I work with people who work on specs. They're all mortal. No test = divergence. Always and without fail.