Forum How do I...?

page identifier

Ben
If I have a tag, say, <toc>, which uses a specific page type, it can be overwritten with a basic page type. For example, if I have:

@page tocpages {
  border:solid 1px blue;
}
toc {
  page:tocpages
}
@page {
  border:solid 1px black;
}


The toc page will have a black border, not a blue border (the page definition overwrites it). Why is this? Why doesn't it stick to blue like it should? If I remove the black border definition, it works fine.

EDIT: If I reverse the order, and put the black border definition FIRST, then it works fine. It's almost as if the @page selector rewrites the definition for ALL pages, regardless of whether or not a tag has been assigned a specific named page. Is this correct?

Edited by Ben

mikeday
Hi Ben,

Yes, it seems that @page rules are not correctly preserving the selector specificity, which is contrary to the behaviour that you would expect.

We will investigate fixing this for the next release of Prince; thanks for reporting the issue! :D

Cheers,

Michael