Sign in
Log inSign up
Selectively loading fonts within media queries?

Selectively loading fonts within media queries?

Sharon Chaisky's photo
Sharon Chaisky
·Mar 29, 2016

I had this idea of using @font-face within media query for just for large screens to load up whatever fancy fonts I have and then use a regular, browser default font for smaller screens.

The @font-face would only load up for larger screens and not for the smaller screens where the connection is usually slow. So it won't load the unnecessary font in smaller screens.

I have two queries with this.

Is it possible to use @font-face within a media query to selectively load the font? and would it actually work the way I described here?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct