[css-break-4] Should fragmentation of block-level replaced-elements be configurable? ("object-slice")
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
"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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CSS Break 4 discussion at the referenced end-block section, then compare the proposed behavior with the PDFreactor object-slice documentation. Review how none, auto, and avoid interact with block-direction fragmentation, orphans, and widows; done means reaching agreement on the property's definition and scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100