RFC: add support for @page-left and @page-right mediaqueries
Let’s say that we have an element that would need different margins depending on the page is a left one or a right one.
For now, we can achieve this by using pagedjs internal behavior:
.pagedjs_left_page .elementThatChange {
margin-left: -131px;
}
.pagedjs_left_page .elementThatChange {
margin-right: -131px;
}
but my feeling is that we should have something like:
@media print and (page:left){ … }
or @media print and (page:right){ … }
or @media print and (page:first){ … }
We could have recto
and verso
and all the other possibilities from the @page
component itself.
We could support this easily today as we can just recreate the css to be what pagedjs expect in the end (using the classes we have), so it wouldn’t cost too much of work to show a demo. What do you think?
This would give us much more control on what we could achieve from the css itself without having to modify the DOM.
We’ll probably make a proposal for the specs, but i’m curious if that feel right for you too.
@JulieBlanc and @fchasen