Skip to content

[css-break-4] Should margin-break: keep also keep the block-end margin before the break? #3254

Open

Description

@fantasai

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?

CC @mstensho @dauwhe @MurakamiShinyu

Activity

  1. mstensho commented on Oct 29, 2018

    @mstensho
    Contributor

    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.

  2. MurakamiShinyu commented on Oct 30, 2018

    @MurakamiShinyu

    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.

  3. mstensho commented on Oct 30, 2018

    @mstensho
    Contributor

    @MurakamiShinyu Could you elaborate a bit more on that? A use case / test case? Thanks.

  4. MurakamiShinyu commented on Nov 19, 2018

    @MurakamiShinyu

    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.

  5. mstensho commented on Nov 19, 2018

    @mstensho
    Contributor

    @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).

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions