Design comparison
Solution retrospective
Is it necessary to use 3 @ font-face, 1 for each font weight considering that I use the same font? I hope you can answer me! Thank you
Community feedback
- @pierre-pellegrinoPosted over 3 years ago
Hey, it looks nice ! I'm kind of a newbie and I don't know SCSS but I did it another way with my fonts :
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;600&display=swap" rel="stylesheet">
in my HTML file.h1, p { font-family: 'Josefin Sans', sans-serif; }
And this in my CSS, and you can just change the
font-weight
as you wish for each.I don't know if it is a better way but it is a bit shorter. Good job !
0@Alex-AR-LRPosted over 3 years ago@PierreWagon Thank you! Yes, I already knew that it can be done in the way you comment but my question was for when I want to use imports with the @ font-face, since I have no practice using that method.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord