| ▲ | Taffy: A flexible, high-performance, cross-platform UI layout library(github.com) | |||||||||||||||||||||||||||||||||||||
| 38 points by robin_reala 6 days ago | 18 comments | ||||||||||||||||||||||||||||||||||||||
| ▲ | nicoburns 38 minutes ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
I maintain Taffy: AMA. I am currently in the process of building a wider browser engine / GUI toolkit on top of it (https://github.com/dioxuslabs/blitz). As part of that I am implementing a lot of the messier parts of CSS layout (floats, etc), and also grinding on fixing all the WPT tests which we track here: https://blitz.is/status/wpt/css/css-flexbox. The vision is a complete standalone implementation of the web layout algorithms that can be easily embedded (with individual algorithms enabled/disabled on a pay what you use basis), and which can also be part of a modular ecosystem of browser engine components that make it easier for people to create new browser engines. Beyond Blitz, some notable users are: - Servo which uses it only for CSS Grid - Zed which uses it via it's GPUI toolkit. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | chrisweekly 30 minutes ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
Closely-related tangent: for an amazing resource showing how to leverage CSS from first principles, see https://every-layout.dev | ||||||||||||||||||||||||||||||||||||||
| ▲ | hereonout2 an hour ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
An unfortunate name for certain audiences in the UK! | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | LoganDark 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
I would be interested in something like Apple's constraint layout system. Nested flexboxes and grids can do a lot, but I kinda fell in love after seeing constraint layout. Even how window resizing is represented as a constraint with a certain priority too! | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | troupo an hour ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||
My opinion is that no one should re-implement CSS layout orimitives and algorithms. Those are rather unique in how (by necessity and quirks if history) awkward, stange and bolted on they are. Explore other layout ideas. E.g. https://stackoverflow.com/questions/53911631/gui-layout-algo... | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | righthand an hour ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
<strike>This project IMO should admit it's taken a lot of it's inspiration from Clay, a C layout immediate mode UI library: https://github.com/nicbarker/clay/</strike> EDIT: Was wrong, see reply to this comment, need my coffee...still not a good excuse | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||