Live data from Hacker News

Show HN: Dropflow, a CSS layout engine for node or

github.com

101–110 of 146 posts

Re: Show HN: Dropflow, a CSS layout engine for node or <canvas>

#101

Does anyone have a similar solution for drawing graphs / charts in a Node environment without a browser dependency? Last time I explored this I couldn't find any good solutions.

Do you need to create images?

It's trivial to create svg in the server. It's like rendering html.

Re: Show HN: Dropflow, a CSS layout engine for node or <canvas>

#102

Earlier quoted context omitted.

> it's just too much to ask to re-render let's say (20rows*10cols) 200 DOM I don't think this is true with modern browsers and CSS. For a table, every cell and parents of the cells as much as possible, should be styled `contain: strict` and if possible, absolutely positioned.

It's still true. You might be able to get decent performance on a Macbook 3000 (doubtful even) but anything less than that, nope. That's why many grid components use canvas rendering. It would have been a lot easier for all these grid devs to work with DOM nodes if they could.

> That's why many grid components use canvas rendering

Many grid components were developed many years before modern compositors and the `contain` property.

Re: Show HN: Dropflow, a CSS layout engine for node or <canvas>

#103
post #68
post #51

Earlier quoted context omitted.

Glide grid renders to canvas also.

Perhaps I worded it wrong: I meant to bring Glide Grid as an example how fast we can render millions of items to canvas.

It doesn't actually render millions of items though. It renders the visible viewport, something you can also do with pretty standard DOM virtualization techniques.

Re: Show HN: Dropflow, a CSS layout engine for node or <canvas>

#104
Brilliant! It's super important that stuff like this exists, demystifying the magic boxes of browser rendering engines.

It would be great if we could create a full machine readable spec for html and CSS rendering, so that renderers can be generated. Browser quirks could then be extensions to that. Like https://github.com/tawesoft/html5spec but used for real engines.

Re: Show HN: Dropflow, a CSS layout engine for node or <canvas>

#107

It doesn’t support flex box? I really can’t tell what the purpose of this library is then.

I agree, I think there has to be something compilable to WebAssembly.

A web search shows something that's written in Rust: https://github.com/DioxusLabs/taffy?tab=readme-ov-file#taffy

Re: Show HN: Dropflow, a CSS layout engine for node or <canvas>

#108
post #10

Earlier quoted context omitted.

> wondering if css and svg could be used as abstraction over graphics and UI libraries There's another project called Sciter that uses CSS to target native graphics libraries: https://sciter.com > I wonder how hard it was to implement css. I've heard it can be pretty complex. It was hard, but the biggest barrier is the obscurity of the knowledge. Text layout is the hardest, because working with glyphs and iterating t…

> It's also the most obscure because nobody has written down everything you need to know in one place Your work might have been, or maybe still is, the worlds biggest chance for this to change!

There was a whole team behind Microsoft Trident (IE engine) that was dissolved in favour of third-party (for them) Blink engine. That team was surely knowledgeable, but they had gone.

Blink source is de facto current spec. Each function, if not single line, there is a paragraph in spec.

I remember at WHATWG / HTML5 WG times when Ian Hickson (Google) was pushing whole SQLite (and its SQL flavour) to be included in HTML5 ...

The spec area is so huge and indeed obscure that even Microsoft could not handle it.

Re: Show HN: Dropflow, a CSS layout engine for node or <canvas>

#110

Brilliant! It's super important that stuff like this exists, demystifying the magic boxes of browser rendering engines. It would be great if we could create a full machine readable spec for html and CSS rendering, so that renderers can be generated. Browser quirks could then be extensions to that. Like https://github.com/tawesoft/html5spec but used for real engines.

Somehow this reminded me that Ladybird is a browser being written by scratch and this has been really useful to actually make sure that there are no bugs in the spec.
Post reply on HN