Design comparison
SolutionDesign
Solution retrospective
The only issue I normally encounter is how to apply the font provided by Frontend Mentor.
Community feedback
- @VickyAzolaPosted about 1 year ago
Hi there!
So, there are two ways: import it into your CSS or your HTML, and then apply it to the body or the necessary classes.
- First, go to style-guide.md and copy the font link on Google.
- Then, on the right (blue links), select the necessary weights (specified in the guide) of the font.
- There will appear a red dot on the icon in the top right corner (selected families), which will open a window on the right with a review of your selected fonts.
- Below it will appear "Use on the Web" with 2 options: "<link>" (you can copy this and paste it on your head HTML) and "@import" (this goes on the top of your CSS). Choose whatever you want, and then copy the text on "CSS rules to specify families" and paste it on your CSS body or classes that require the font.
Here is an example:
- With @import:
in your CSS @import url('https://fonts.googleapis.com/css2family=Poppins:wght@200;400;600&display=swap'); body { font-family: 'Poppins', sans-serif; }
- With <link>:
In your HTML <head> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;600&display=swap" rel="stylesheet"> </head> In your CSS: body { font-family: 'Poppins', sans-serif; }
1
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