I am trying to get into the CSS business, though have never worked with CSS before. So let me already excuse for this basic question as well as my inability to find an answer in existing posts.
What I’m trying to do
I want a CSS-snippet for export to pdf with only basic functionality. This is
It should fix a specific font
It should set the font size
It should set margins and line spacings
Things I have tried
I have a snippet that does the first point (source):
@media print {
body {
/* set your preferred fonts here. */
--font-text: 'Karla' !important;
}
}
Interestingly, the -- in front of the font-text seems crucial, although from my basic understanding I don’t know why.
Something like this should work. You might be able to get by without the !importants, but to be safe I put them in there. Tested with the default and Minimal themes.
There’s also a variable, --line-height: n; that will work in the body section, but seems to only in the Minimal theme and not in the default theme (which is odd). Didn’t have time to figure out why so put it in the second section. Fingers crossed…