From the course: CSS: Variable Fonts
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Use the font-variation-settings property - CSS Tutorial
From the course: CSS: Variable Fonts
Use the font-variation-settings property
- [Narrator] You can use existing standalone properties like font weight, font stretch, etc. to customize some registered variation axis, but you're likely to run into inconsistent behavior if you do so, let me show you what I mean. In my example, I've set the font weight, and font stretch properties in the heading, and it looks the way I wanted to in Firefox. But look what happens when I open the same document in Chrome, the heading font appears thicker and weightier somehow, but it's not because of the font weight. Can see the font ways that weight is applied same way, and if I changed the value here, you see, it gets thicker or thinner, but it still has this weightier appearance to it, so something else is happening. What's happening here is, while Firefox is automatically adjusting the optical sizing of the font, Chrome is not. Now, this is likely because variable fonts are still new and considered experimental, so the…
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)
Add a variable font5m 9s
-
(Locked)
Style variable fonts using old properties2m 55s
-
(Locked)
Use the font-variation-settings property4m 11s
-
(Locked)
Interplay between variation axes3m 31s
-
(Locked)
Use custom properties for easier styling6m 38s
-
(Locked)
Design typography in the browser4m 29s
-
(Locked)
-
-