Site logo

Archived topic

How to change preformatted block font style generatepress

5 replies · Started by robchanoi on June 21, 2021

Viewing posts 1–6 of 6

Hi, ... I set up a page using the preformatted font in classic ed. as I like the grey background it gives but would like to change the font type.
I don't see font type has been raised here for preformatted text.

Would smth like this work:

pre{
font-family: ‘Noto Serif’, Georgia, Times, serif;
background-color: inherit;
border: none;
}

Thanks.

Hi there,

that CSS will work, IF that font is being loaded - if you have the Noto Serif font set to any element in the Customizer > Typogaphy settings then it will load.

Thanks David.
Found this elsewhere.
I changed background colour "inherit" to #F2F2F2 which works, but for Helvetica which I'd like to use and is being used for h1, h2, h3 under Customizer > Typogaphy settings, not picking it up.

pre{
font-family: ‘Helvetica’, Georgia, Times, serif;
background-color: #F2F2F2;
border: none;
}

Hi there,

The element pre inherits its font from what you've set on Appearance > Customize > Typography > Body.

If you want to set something specific applied only to that element, you'll have to write a custom CSS for it. :)

That's clear - thanks Elvin.

No problem. Glad to be of any help. :D

This archived topic is closed to new replies.