Answer the question
In order to leave comments, you need to log in
Link or import fonts?
Good morning everyone and have a nice day.
I make the site static on PUG + SCSS and select the optimal fonts for the site. Hence a few questions:
How best to do:
1. register a link in the template, setting the font itself as a variable + add styles for the body in it?
- var fontGlob = 'Roboto'
link(rel="stylesheet", href='https://fonts.googleapis.com/css?family=' + fontGlob + '|Montserrat&display=swap')
style.
body {font-family: '#{fontGlob}', sans-serif;}
@import 'https://fonts.googleapis.com/css?family= + #{$fontGlob} + |Montserrat&display=swap'
$fontGlob: 'Roboto'
body {font-family: '#{$fontGlob}', sans-serif;}
Josefin+Sans
. Answer the question
In order to leave comments, you need to log in
all fonts, libraries, etc. must be connected locally so that their display is not affected by the availability of another server. Connect later in a separate scss file with import into the main one
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question