You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[css-break-4] Should margin-break: keep also keep the block-end margin before the break? #3254
Antenna House’s margin-break property takes two values, the second controlling whether the block-end margin is kept before the break. This raises some questions:
Do we want to add independent control over the block-end margin?
If that second value is omitted (or doesn't exist), is the block-end margin kept or truncated?
If the block-end margin is kept, this means that it affects the height of an auto-height fragmentainer in which it occurs. If the fragmentainer is fixed-height, does it also mean that the margin should not be truncated, and should force a break earlier in the page in order that it not be truncated?
Regarding @fantasai's last bullet point: I see no value in forcefully keeping margins, and make it impossible to break inside of them. If a block-end margin doesn't fit, it should collapse into the fragmentainer boundary.
Therefore, I don't think we want/need to control block-end margin. As far as I understand the model, margins never cross fragmentainer boundaries. So whether you say that we put the portion of the margin that fits in the remaining space in the fragmentainer and truncate the rest, or we say that we just truncate the entire margin, the result will be the same. Right?
https://drafts.csswg.org/css-break-4/#break-margins currently gives some multicol examples where it appears to make a difference. Because of column balancing? I don't think we want that, because column balancing should ideally make the block size as small as possible, i.e. it shouldn't attempt to leave any room at all for margins at the end of the fragmentainer at all.
When I worked on Antenna House’s margin-break property, my idea was that the keep value for block-end margin is necessary when the block content is aligned to the block-end edge with the block-end margin kept intentionally. I still think it is useful.
I think there are may cases where we want to keep margin after the last block in a page. For example, when we want to make some special pages such as title page, colophon etc. in a book, and align the content of such page to block-end edge (align-content: end on the block-container) with some margin, the second keep value of the margin-break will be necessary.
@MurakamiShinyu I think I need an actual testcase to understand this. align-content doesn't align the margin box, as far as I understand (and if it actually did include the margin box, we'd guarantee to make room for the margin at the end of the page anyway).
Activity
mstensho commentedon Oct 29, 2018
Regarding @fantasai's last bullet point: I see no value in forcefully keeping margins, and make it impossible to break inside of them. If a block-end margin doesn't fit, it should collapse into the fragmentainer boundary.
Therefore, I don't think we want/need to control block-end margin. As far as I understand the model, margins never cross fragmentainer boundaries. So whether you say that we put the portion of the margin that fits in the remaining space in the fragmentainer and truncate the rest, or we say that we just truncate the entire margin, the result will be the same. Right?
https://drafts.csswg.org/css-break-4/#break-margins currently gives some multicol examples where it appears to make a difference. Because of column balancing? I don't think we want that, because column balancing should ideally make the block size as small as possible, i.e. it shouldn't attempt to leave any room at all for margins at the end of the fragmentainer at all.
MurakamiShinyu commentedon Oct 30, 2018
When I worked on Antenna House’s margin-break property, my idea was that the
keepvalue for block-end margin is necessary when the block content is aligned to the block-end edge with the block-end margin kept intentionally. I still think it is useful.mstensho commentedon Oct 30, 2018
@MurakamiShinyu Could you elaborate a bit more on that? A use case / test case? Thanks.
MurakamiShinyu commentedon Nov 19, 2018
I think there are may cases where we want to keep margin after the last block in a page. For example, when we want to make some special pages such as title page, colophon etc. in a book, and align the content of such page to block-end edge (
align-content: endon the block-container) with some margin, the secondkeepvalue of themargin-breakwill be necessary.mstensho commentedon Nov 19, 2018
@MurakamiShinyu I think I need an actual testcase to understand this. align-content doesn't align the margin box, as far as I understand (and if it actually did include the margin box, we'd guarantee to make room for the margin at the end of the page anyway).