Leo
(@leohsiang)
Hi there,
Any chance you can link us to the site in question?
Let me know 🙂
@guido07111975 if you are using GP 3.0 and above you need to be very specific in the CSS classes you are using. Instead of .main-title {font-size: 25px}
use .main-title a {font-size: 25px}
.
Thread Starter
Guido
(@guido07111975)
Hi,
so this is overriding the size I’ve set (25px).
I now notice it’s not a heading, so I did not set this size in theme settings.
But in main stylesheet main-title
is set at 25px. So I don’t understand where 45px comes from.
Check this temp link.
Guido
Hi there,
where did you add your CSS? I am not seeing it on your site?
This CSS would make it more specific:
.navigation-branding .main-title {
font-size: 25px;
}
Thread Starter
Guido
(@guido07111975)
Hi David,
I’m sorry, there’s no custom CSS, I’ve set up a new install and shared the link in my previous reply.
So I did not add any changes to div main-title
.
It’s generated by GeneratePress itself (generate-style-inline-css): .main-title{font-size:45px;}
Guido
How are you changing ( trying to change ) the Site Title font size ? The Free Theme doesn’t have that as an option?
Thread Starter
Guido
(@guido07111975)
Hi,
I can add custom CSS to change it, but if you inspect the code you will notice 2 sizes:
1) From “generate-style-inline-css”:
.main-title {font-size: 45px;}
2) From theme stylesheet:
.main-title {
margin: 0;
font-size: 25px;
line-height: 1.2em;
word-wrap: break-word;
font-weight: 700;
text-transform: none;
}
I would like to know where number 1 is coming from? I did not set this myself, the free version of GP does not have this option. So something must be triggering this 45px.
Guido
Theme Author
Tom
(@edge22)
That is being generated dynamically, as you’re able to change that value using the Customizer in the pro version.
To overwrite it in the free version, you need CSS:
.site-branding .main-title {
font-size: 30px;
}
Thread Starter
Guido
(@guido07111975)
Hi Tom,
Understood. But I have older installs without .main-title
in the “generate-style-inline-css”, so is this something that is added in a recent update?
Guido
Theme Author
Tom
(@edge22)
No, this has been something that’s been a part of the theme for a long time. For example, as far back as 2.0: https://github.com/tomusborne/generatepress/blob/2.0/inc/css-output.php#L376
Thread Starter
Guido
(@guido07111975)
Hi Tom,
But somehow it’s not present in the “generate-style-inline-css” of that site (local install). Anyway, I now know it should be present, so guess it’s a bug somehow. Will use the custom CSS in case I want to change size.
Thanks again!
Guido
Theme Author
Tom
(@edge22)
The dynamic CSS will only print if it’s different than the default value.
If it matches the default value, it will use it (in the static CSS file) vs printing it in the dynamic CSS.
We may change this in the future, but that’s how it works as of right now 🙂