Skip to content

Change default font for H tags #14

Answered by extrabright
Therrapy asked this question in Issues
Discussion options

You must be logged in to vote

Hi,

Do you want to change the default font for all typography elements or just for the H tags?

In case you want to add an additional font here's what you have to do:

  1. Add the Google font in the section of the page
  2. Create a new _variables.scss file to store your custom variables: https://webpixels.io/docs/css/1.0/theme#creating-themes
  3. Use the $font-display variable to change the font family
  4. Compile the new Sass using your current setup or by following the examples in our docs: https://webpixels.io/docs/css/1.0/build-tools

Example

In your HTML page:

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="h…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@Therrapy
Comment options

@Therrapy
Comment options

@Therrapy
Comment options

@webpixels
Comment options

@Therrapy
Comment options

Answer selected by extrabright
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Issues
Labels
None yet
2 participants