• 0

How to specify that a specific header uses the primary text font instead of header font


Question

Posted · Report post

Hi, I am wondering how I can specify that my h2 head use the font that is used for text rather than the font used for headers.

I know I can specify the font name itself, but I just want to make it use whatever I've selected in the primary text global settings, so if I change that the h2 will just follow along.

How would you do that in css?

 

Thanks for your help.

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Posted · Report post

It's actually LESS code so put this in your Custom Code -> Custom LESS/CSS box on your site or in your child theme style.less file. @plBaseFont is the variable set from Typography - Primary Font.

h2 {
  font-family: @plBaseFont;
}

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank you! What is the variable set of the header font?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Go to your site, logged in as admin, then viewing the homepage.  Click on the Global Options and then on the left menu, click Typography.   The Header fonts are the ones on the right. Select one from the drop down selector.  Save by clicking Publish.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

tiltcreative When you set the primary font under Global Options -> Typography that option is saved to a LESS variable @plBaseFont which is used in DMS LESS (like CSS but better). So by using my code above you are telling the h2 selector to use the font selected for primary font in Global Options -> Typography.

 

Hope that clarifies a bit. If you want to know more let me know and I will point you to some articles on LESS and variables used in particular in DMS.

 

Ellen

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

@ellenmva  Thanks for helping!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now