11 comments

  • nicoburns 2 minutes ago

    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.

  • hereonout2 35 minutes ago

    An unfortunate name for certain audiences in the UK!

  • LoganDark an hour ago

    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!

    • fschuett 14 minutes ago

      https://github.com/dylanede/cassowary-rs but it's not that great on performance once you have like 1000+ constraints (used that library last in 2018 / 2019? maybe it has improved). I think https://github.com/christolliday/limn used it way back then.

      • nicoburns 13 minutes ago

        Ratatui (TUI) uses cassowary layout with a faster underlying library.

    • scoopr 8 minutes ago

      I believe there are several crates (and other languages too) inspired by the original cassowary paper, don't know how mature they are though.

  • troupo an hour ago

    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...

    • iainmerrick 15 minutes ago

      Well, hang on, there are several different layout algorithms in CSS, right? They keep the old ones for backwards compatibility, and they have to interoperate which makes things more complicated; but flexbox and grid are relatively new and quite nice.

  • righthand 20 minutes ago

    <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