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

Named page is not applied at first page with running element #1405

Open
MurakamiShinyu opened this issue Oct 28, 2024 · 0 comments
Open

Named page is not applied at first page with running element #1405

MurakamiShinyu opened this issue Oct 28, 2024 · 0 comments
Assignees
Labels

Comments

@MurakamiShinyu
Copy link
Member

Test sample:
https://gist.githubusercontent.com/MurakamiShinyu/f9bef6503a9fc22c9c3a3938b1494268/raw/running-named-pages-1.html

<style>
.running {
  font-style: italic;
  position: running(running);
}
.named-one {
  page: named-one;
}
.named-two {
  page: named-two;
}
@page named-one {
  @top-center {
    content: "Named Page One";
  }
  @bottom-center {
    background: orange;
    content: element(running);
  }
}
@page named-two {
  @top-center {
    content: "Named Page Two";
  }
  @bottom-center {
    background: lime;
    content: element(running);
  }
}
</style>
<body>
  <div class="running">Running Element</div>
  <section class="named-one">
    <h2>Named Page One</h2>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ipsa saepe placeat exercitationem mollitia doloremque, nisi nostrum, ab amet sint repudiandae consequatur. Dignissimos quibusdam fugit eum sed veritatis repellendus tempora ad.</p>
  </section>
  <section class="named-two">
    <h2>Named Page Two</h2>
    <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Nisi nam consequatur ut itaque voluptas architecto nihil illum ullam, porro numquam ipsa hic quibusdam earum deserunt labore dolore sed provident quas.</p>
  </section>
</body>

Test with Vivliostyle Viewer (v2.30.5):
https://vivliostyle.github.io/viewer/v2.30.5/#src=https://gist.githubusercontent.com/MurakamiShinyu/f9bef6503a9fc22c9c3a3938b1494268/raw/running-named-pages-1.html

In the result, the named page "named-one" is not applied at the first page.

If the named page "named-one" is not started at the first page, the named page is applied correctly. Test: https://vivliostyle.github.io/viewer/v2.30.5/#src=https://gist.githubusercontent.com/MurakamiShinyu/f9bef6503a9fc22c9c3a3938b1494268/raw/running-named-pages-2.html

Also, if running element is not used, the named page is applied correctly. Test: https://vivliostyle.github.io/viewer/v2.30.5/#src=https://gist.githubusercontent.com/MurakamiShinyu/f9bef6503a9fc22c9c3a3938b1494268/raw/named-pages-1.html

@MurakamiShinyu MurakamiShinyu self-assigned this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant