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

margin-break:discard not working properly #1123

Closed
MurakamiShinyu opened this issue Feb 8, 2023 · 1 comment · Fixed by #1124
Closed

margin-break:discard not working properly #1123

MurakamiShinyu opened this issue Feb 8, 2023 · 1 comment · Fixed by #1124
Assignees
Labels
Milestone

Comments

@MurakamiShinyu
Copy link
Member

Test sample:

<style>
  p {
    margin-block-start: 1em;
    margin-block-end: 0;
    margin-break: discard;
  }
</style>
<body>
  <p>AAA</p>
  <p>BBB</p>
</body>

GitHub Gist: https://gist.github.com/MurakamiShinyu/2608cec2d6c28344518e60d289e2f9bf

Test with Vivliostyle Viewer: https://vivliostyle.vercel.app/#src=https://gist.github.com/MurakamiShinyu/2608cec2d6c28344518e60d289e2f9bf

Result screenshot:

Screenshot 2023-02-08 at 17 22 19

The margin-break: discard in this case should discard only the block-start margin of the first P element "AAA" which is beginning the page. But in this output, the block-start margin of the second P element "BBB" which is not beginning a page is also discarded.

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

Successfully merging a pull request may close this issue.

1 participant