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.
Style variable fonts using old properties - CSS Tutorial
From the course: CSS: Variable Fonts
Style variable fonts using old properties
- [Narrator] Some of the registered variation axes can be controlled using stand-alone CSS properties, in particular, weight and width. Let's look at how that works. If I inspect the title here, I can use the weight slider in the font editor, to change the weight of this font. And what you see is, as I'm changing the weight, a new element style is created, with the font-weight property set to whatever value I'm defining down here. So as I change the value, the font-weight value is changing. So we're not using font variation settings, we're just using the classic font-weight property, which can be really useful if you're going to also serve up a fallback font, which we'll talk about later. Because if we serve up a fallback font, the fallback font will understand this value, and map it to whatever is the closest available value for the static font. However, using these existing stand-alone properties only works if things are…
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)
-
-