3 ms·
> Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suit
by nicoburns 3y ago
> Is there any easy to use/hack HTML layouting engine where I could experiment with custom CSS attributes and bridge that gap? Would anything from Servo be suitable?
Servo could be used for this. You'd want to add support for parsing the CSS properties themselves to the style crate in https://github.com/servo/stylo https://github.com/servo/stylo and then the layout implementation to the layout2020 crate in https://github.com/servo/servo https://github.com/servo/servo. You do effectively get a whole browser though.
I'm currently working on building a lighter weight / hackable layout engine based on a combination of https://github.com/servo/stylo https://github.com/servo/stylo (for css parsing and selector resolution), https://github.com/DioxusLabs/taffy https://github.com/DioxusLabs/taffy (for box-level layout) and https://github.com/pop-os/cosmic-text https://github.com/pop-os/cosmic-text (for flow/inline layout). I expect to have something decent in around 6 months
Neither of these setups currently have any support for pagination though.
- niutech 3y agoHow does it compare with https://github.com/litehtml/litehtml https://github.com/litehtml/litehtml?