Site logo

Archived topic

Error found in CSS for changing font-size on mobile

5 replies · Started by JoAnne on January 10, 2022

Viewing posts 1–6 of 6

Here is a problem I solved for you.

I couldn't understand why my customization of changing font-size in site-title wasn't applying to mobile.
Poking around in the Firefox Inspect tool, I discovered that the CSS code that was rendered was missing a comma.
The code rendered was
@media (max-width: 768px){.navigation-branding .main-title{font-size:26px;}}

Once I added a comma just after ".navigation-branding", the font-size was applied correctly.

Looking forward to the next update with this included!

Hi there,

Can you link us to the site where this occurs? To check what's actually happening to it.

I've tried replicating this issue but was unable to.

As for the selector, .navigation-branding .main-title is actually correct as it specifically wants to style the .main-title which is a child of .navigation-branding. https://share.getcloudapp.com/kpu4LKE4

Here is the site
judithclarkindexing.com

Maybe the problem is that the code for the tablet font-size is overwriting the mobile font-size.
This is what I found in the inline style sheet using Firefox Inspect tool:

.navigation-branding .main-title{font-weight:700;text-transform:none;font-size:60px;}
@media (max-width: 1024px){.main-title, .navigation-branding .main-title{font-size:37px;}}
@media (max-width: 768px){.navigation-branding .main-title{font-size:26px;}}

I have added a login for you in case you need to visit the backend.

It works great under the new typography system.
Thanks.

Great!

You are welcome :)

This archived topic is closed to new replies.