From the course: Responsive Typography Techniques
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Solution: Handling your own web font events - CSS Tutorial
From the course: Responsive Typography Techniques
Solution: Handling your own web font events
For my solution to our challenge, I chose Lily Script One as the font I was going to replace the headline font with. I got that from Google Fonts, as you can see here, and it only has one weight of 400, so that really kind of narrowed down my options. When I put it in our example page, it looks a little like this. I also changed the letter spacing and margins around the first and third line of our headline. Just to balance things out a little better with our very cursive-y script. We'll take a look at the CSS that I changed and I made a couple of changes. First of all, I added the font family of Lily Script One to my h1. And Google offered the fallback font of Cursive originally, but I thought that Georgia actually looked a lot closer to Lily Script One, even though it's not a cursive font. The weight and size of the letters was much closer to what I was using than Cursive was, so I got rid of that and made my fallback font Georgia. Below that I added two classes. One for when Lily…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Maintaining line lengths for comfortable reading across screen sizes6m 5s
-
(Locked)
Using media queries to set natural typographic breakpoints9m 10s
-
Controlling line breaks for headings5m 15s
-
(Locked)
Managing flashes of unstyled text (FOUT) using web font events6m 25s
-
(Locked)
Challenge: Handling your own web font events40s
-
(Locked)
Solution: Handling your own web font events2m 17s
-
(Locked)
-
-