Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What should constraining the block-progression direction do? #43

Open
travisleithead opened this issue Feb 4, 2022 · 4 comments
Open

Comments

@travisleithead
Copy link
Member

The explainer's data model allows height and width to be specified. Depending on the writing-mode specified on the context object, either of these dimensions could become the block-progression direction. We know that we want the inline direction to wrap content. But what should happen when the limit specified in the block direction is reached?

  • Is there a "fit" model that choses when to overflow the box, already specified (or in draft) in CSS fragmentation? (Partial lines would be "pushed" to a following container/dropped alltogether?)
  • Should content be clipped exactly at that pixel boundary (relevant when rendering)
  • Should content just continue in the block-progression dimension inrrespective of the limit specified (as if it renders offscreen)--effectively ignoring the limit?

This was brought up in review of PR 39

@dlibby-
Copy link

dlibby- commented Feb 4, 2022

Intuitively, I don't think clipping makes much sense (and default for CSS is overflow: visible anyhow). If we format the runs and expose line metrics, we'd have to lay everything out anyways. So maybe we apply that principle, and leave clipping up to the canvas renderer if necessary?

@travisleithead
Copy link
Member Author

Yes, that makes sense to me. It could also be interesting to expose a boolean line metric flag that would be true when the particular line intersects with or is beyond the provided bounding box of the provided constraints.

@fantasai
Copy link

You might want to have it lay out as many lines as will fit, and then stop, and allow the caller to continue formatting the paragraph in another function call (or not format it, similar to using line-clamp).

@fantasai
Copy link

But also, if you're not sure what you want to do, maybe you don't offer this parameter. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants