Picture of Dean Wilson
Styling body text (H1)
by Dean Wilson - Thursday, 25 August 2016, 11:17 AM
 

Hello all

Does anyone know how to create a H1 tag to be used within a .less file?

I'd like to add <h1> into the body of an article and be able to produce the same colour, style and font each time.

 

Thanks
Dean

Picture of Tom Taylor
Re: Styling body text (H1)
by Tom Taylor - Thursday, 25 August 2016, 1:56 PM
 

Hi Dean, 

Are you using the authoring tool, or developing straight into the framework?

It should just be a case of targeting the h1 tag and overwriting that style. See this snippet of the Vanilla theme for an example: https://github.com/adaptlearning/adapt-contrib-vanilla/blob/master/less/src/fonts.less#L123-L139

Picture of Dean Wilson
Re: Styling body text (H1)
by Dean Wilson - Thursday, 25 August 2016, 2:33 PM
 

Thanks Tom.

I'm using the framework. As per your advice, I've managed to get the tag working; font size and font weight all works fine. However, the font color isn't doing what I'm asking, and I'm not sure why. 

h1 {
font-size: 29px;
line-height: 140%;
font-weight: 300;
font-color: @blue;
}