DEV Community

earlman
earlman

Posted on

3 2

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay