Problem : margins must be given to all page templates
Problem : margins must be given to all page templates.
With the following code, the margins disappear from the right pages.
@page{
size: 140mm 205mm;
margin: 12mm 12mm;
}
@page:right {
@top-left{
...
}
}
The problem is solved by adding the size of the margins in the right page, like this :
@page{
size: 140mm 205mm;
margin: 12mm 12mm;
}
@page:right {
margin: 12mm 12mm;
@top-left{
...
}
}
The correct version is that if the margins are declared only in @page
, they also apply on @page:right
that are declared without margins. It's the same for the other page selector (@page:left
, @page:first
, @page:nth(x)
)
The rule is that pages with selector has priority on @page
, but properties of @page
remains if it is not declared in pages with selectors.
Same problem with named pages.
With the following code, the margins disappear from the named pages "chapter".
@page{
size: 140mm 205mm;
margin: 12mm 12mm;
}
section {
page: chapter
}
@page chapter {
@top-center{
...
}
}
The correct version is that if the margins are declared only in @page
, @page:right
and @page:left
, they also apply on @page:chapter
that are declared without margins. The left pages of chapter pages has the same margins as @page:left
and the right pages of chapter pages has the same margins as @page:right