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

The hardest part is actually layout managers, i.e. what happens if you want to support more than one pixel width. With all its clunkiness, CSS & DOM actually solve that.

edit: they actually have their own layout implementation(s). I wonder how those compare to the built in browser versions (performance, correctness, ...)?

https://github.com/Flipboard/react-canvas/blob/master/lib/La...




It's css-layout: https://github.com/facebook/css-layout. The same engine used in React Native. It turns out that you only need a portion of CSS for apps. It's very performant.


Huh. Using a reimplemented, minimal CSS engine would mean more or less baked-in cross-browser compatibility, right?


Yes, but it's hard to do your own layout on the web because in times that want to width of an element that has text with `flex: 0`, you can't do that. It's mainly useful for things like this where you control everything.




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

Search: