DEV Community

earlman
earlman

Posted on

TIL: `font-weight: 1 999;` is a thing

There's no way anybody uses variable fonts without just setting:

@font-face { 
   font-weight: 1 999; 
}
Enter fullscreen mode Exit fullscreen mode

...right? It's the same .woff2 file in the end so it seems like it should be the same performance. Otherwise, you gotta do the @font-face rules for every single declaration:

@font-face { 
   font-weight: 200; 
}
@font-face { 
   font-weight: 400; 
}
//...etc
Enter fullscreen mode Exit fullscreen mode

Just learned that the 1 999 syntax existed today in a tiny section on a blog post on Digital Ocean. There's some better examples on there. Seems useful 😝

Top comments (0)