I'm interested whether anyone can give me some insight as to why certain aspects of CSS fail to render when when the target's output type changes to PDF (using 2016 r2).
I have a scenario where I am using some pretty fancy CSS on the ::before pseudo-element to create a note style that looks like two table cells. When I set the output type to HTML, this renders correctly in the output and the preview window. However, if I switch the output type to PDF, leaving everything else the same, it neither renders correctly in the output or in the preview windows.
In the HTML+preview it looks like this: and in the PDF+preview it looks like this: I think the CSS that fails in the PDF build is related to the following, particularly the position attribute:
Code: Select all
.note::before {
content: "Note";
display: block;
position: relative;
left: -10px;
width: 110%; /*or some other custom value*/
}
I find it very strange that the CSS processor works differently for HTML5 and PDF, especially when only in preview mode (not even in the browser!).
Any thoughts/suggestions? Should I log a bug?
Best,
Kristy
(Please excuse the egregious colors used for example purposes!)