CSS having limited effect on pre & code
I added the following to the Content Formatting section of my Scroll PDF Exporter template:
body { font-family: SourceSansPro; }
tt, code, pre { font-family: DejaVuSansMono }
The default size for the code / pre font is much too large relative to the body font, so I experimented with various size settings (percent, points, "smaller," etc.). The font gets maybe 15% smaller but no matter what I do it won't go below that. For example, all of these look the same in the PDF:
tt, code, pre { font-family: DejaVuSansMono, font-size: 10pt; }
tt, code, pre { font-family: DejaVuSansMono, font-size: 9pt; }
tt, code, pre { font-family: DejaVuSansMono, font-size: 8pt; }
Suggestions?
content_formatting_css.txt
-
Hi Robert,
it seems you have a typo in your CSS: after the font family name you added a comma while a semicolon is required to separate the settings for font-family and font-size.
In your case the CSS interpreter tries to find the font with the name "DejaVuSansMono, font-size: 10pt". This fails of course.
Let us know if that helped.
Cheers,
Jens
Please sign in to leave a comment.
Comments
2 comments