From the course: Build a Lightweight Full-Stack Headless CMS Using Next.js, Contentful, and GraphQL
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Solution: Add styling to your front end - GraphQL Tutorial
From the course: Build a Lightweight Full-Stack Headless CMS Using Next.js, Contentful, and GraphQL
Solution: Add styling to your front end
(bright music) - [Instructor] So I know earlier in this section, I went ahead and showed you how to set up SaaS. I showed you a few layout changes that I've made on my site, I changed the background color. So I wanted to show you a little bit about how to change the font, how to use Google fonts that's built into Next, which is really nice, and how to use those within your front end. So this syntax for importing fonts is how you're going to go ahead and use the Next font Google Library. So up here, the starter kit uses Inter as the font, but say I wanted to use something like Open Sans, you could just add that there, import it, right? And then I use this object here, this variable. So I call it Open Sans. I call this and I pass in these attributes. This is all in the Google font documentation, also in the Next documentation, as well. So, this isn't something that I just memorized. It's something that I looked up. And so you can pass this in. And now another thing to note, as well, is…