Skip to content

[css-break-4] Should fragmentation of block-level replaced-elements be configurable? ("object-slice") #3403

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

Closed
bernhardf-ro opened this issue Dec 6, 2018 · 1 comment

Comments

@bernhardf-ro
Copy link

"Some content is not fragmentable, for example many types of replaced elements [CSS21] (such as images"
from https://drafts.csswg.org/css-break-4/#end-block (actually slightly below that ID)

We have always considered replaced elements as monolithic, until there was customer demand for optionally breaking inside images.

So we implemented the property object-slice, effective on block-level replaced elements (for simplicity from now on called "images"):
https://www.pdfreactor.com/product/doc_html/index.html#css-property-ro-object-slice

The initial value none keeps the previous behavior, i.e. monolithic.
auto and avoid allow fragmentation of the image, avoid preferring to move it entirely to the next fragment container if it fits there.
(To avoid overflow and loss of information avoid could also be considered as initial value. Large block-level replaced-elements should be rare enough for this to have very little impact on existing documents.)
Please note that we are only talking block-direction breaks. Handling inline-direction overflow of images is not part of the scope of this property.

Additionally, to avoid splitting off small parts at the beginning or end of the image, and to be more in line with blocks containing inline content, we also added support for the orphans and widows properties. Their values are just multiplied with the used line-height of the image box and cause breaks to be avoided or happen earlier, as in text.

I would like to put the property and related behavior up for discussion and consideration, to give authors (of documents, or of print style sheets) the needed control over large images.

@bernhardf-ro
Copy link
Author

duplicate

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

No branches or pull requests

2 participants