linebender / parley

Rich text layout library
Apache License 2.0
228 stars 28 forks source link

Feature: Floated boxes (CSS Floats) #99

Open nicoburns opened 3 months ago

nicoburns commented 3 months ago

This issue tracks the implementation of CSS Floats in Parley (/API enhancements that enable CSS Floats to be implemented on top of Parley).


Code Flow

If we go with the latter option (APIs that enable Floats to implemented on top of Parley) then I think the requirements for Parley itself might actually be quite simple. Parley would need to:

The wider layout engine (that handles both box layout and text layout) would then be responsible for:

Parley API

In concrete API terms this would probably look like:

Appendix A: The position of the floated box

The position of the floated box would be either: