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

negative page margin values not working as expected #1217

Closed
MurakamiShinyu opened this issue Aug 4, 2023 · 1 comment · Fixed by #1218
Closed

negative page margin values not working as expected #1217

MurakamiShinyu opened this issue Aug 4, 2023 · 1 comment · Fixed by #1218
Assignees
Labels

Comments

@MurakamiShinyu
Copy link
Member

Test example:

<!doctype html>
<style>
@page {
  size: 210mm 210mm;
  marks: crop cross;
  bleed: 3mm;
  margin: -3mm;
}
body {
  margin: 0;
}
img {
  display: block;
  width: 100vw;
  height: 100vh;
}
</style>
<body>
<img src="https://vivliostyle.github.io/vivliostyle_doc/samples/gon/img/gon.jpg"/>
</body>

HTML: https://gist.githack.com/MurakamiShinyu/82b86a8cc7bbd45f94d5390f8fc6ada7/raw/negative-page-margin.html

Test with Vivliostyle Viewer:
https://vivliostyle.org/viewer/#src=https://gist.githack.com/MurakamiShinyu/82b86a8cc7bbd45f94d5390f8fc6ada7/raw/negative-page-margin.html

Result screenshot:
スクリーンショット 2023-08-04 17 11 53

In this example, a negative page margin value (-3mm) is specified, and the image's top left corner should be aligned to the top left bleed area edge (3mm outside of the page size). However the top and left -3mm page margin values seem to be not working as expected.

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