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.

Providing proper fallbacks

Providing proper fallbacks - CSS Tutorial

From the course: CSS: Variable Fonts

Start my 1-month free trial

Providing proper fallbacks

- [Instructor] When using variable fonts, it's essential to provide proper font fallbacks for all the browsers that do not support the variable fonts specification. Here it's important to remember, you don't need to provide visitors using older browsers with the exact same font experience, but it's important to provide them with a similar and equitable experience, which in some terms, means providing a similar looking and similarly featured fallback font. I've found two robust ways of doing this. The first and most explicit method uses the @supports query to test for browser support. This is what MDM recommends and it works like this. You first declare whatever style you want to provide to an older browser, then you use the @supports query to ask hey browser, do you understand this particular feature? Font variation settings with 115. If the browser understands this feature, it'll try to run whatever code is inside of…

Contents