I've run into a situation where I want to have several background images that repeatedly cycle (for example, with three images, the image on first spread, second image on second spread, third image on third spread, first image on the fourth spread, etc, etc).
Normally, I would achieve this by using @page:nth(3n + 1) and so on, but it would appear that prince doesn't support the "n" operator in @page:nth()
may I ask that y'all consider adding support for the "n" operator within @page:nth()
the full code for that example that I'd use would be, just for completion's sake.
Normally, I would achieve this by using @page:nth(3n + 1) and so on, but it would appear that prince doesn't support the "n" operator in @page:nth()
may I ask that y'all consider adding support for the "n" operator within @page:nth()
the full code for that example that I'd use would be, just for completion's sake.
@page:nth(6n+1) { background: url("../assets/bg/1.svg"); }
@page:nth(6n+2) { background: url("../assets/bg/1.svg"); }
@page:nth(6n+3) { background: url("../assets/bg/2.svg"); }
@page:nth(6n+4) { background: url("../assets/bg/2.svg"); }
@page:nth(6n+5) { background: url("../assets/bg/3.svg"); }
@page:nth(6n+6) { background: url("../assets/bg/3.svg"); }
@page:right { background-position: center right; }
@page:left { background-position: center left; }
Edited by ThatRobHuman
