font-weight: 300 considered harmful
Many modern web pages set font-weight: 300
in their stylesheets. For the DejaVu Sans font I prefer, this will result in the text being very thin and light and difficult to read, and for some reason the system will use the "DejaVu Sans ExtraLight" (200 in thickness) variant instead.
Why do people set font-weight: 300
? Probably a Mac user. On my macOS Catalina computer, see the difference between 400 and 300 by default built-in fonts.
I won't blame the designer for using 300 thickness in some cases. In fact, 11 years ago I posted a code snippet called "Best Helvetica" which mentioned this:
<code>body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 300; }</code>
But for Tomáš, his default font is DejaVu Sans (the default font for many Linux and Android systems), which is difficult to read when the font is so thin. Part of the problem is that if the alternate font happens to be less than 300 thickness, the specification states that it can fall back to 100, if needed. I believe the professional terminology of this is very, very detailed .
I will try to avoid this myself (or use it when I load a web font that I know has 300 thickness), but if this bothers you on many websites, check out Tomáš's article to learn how to fix this on your computer. This actually reminds me of different fix levels.
Direct link →
The above is the detailed content of font-weight: 300 considered harmful. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

It's out! Congrats to the Vue team for getting it done, I know it was a massive effort and a long time coming. All new docs, as well.

I had someone write in with this very legit question. Lea just blogged about how you can get valid CSS properties themselves from the browser. That's like this.

I'd say "website" fits better than "mobile app" but I like this framing from Max Lynch:

The other day, I spotted this particularly lovely bit from Corey Ginnivan’s website where a collection of cards stack on top of one another as you scroll.

If we need to show documentation to the user directly in the WordPress editor, what is the best way to do it?

There are a number of these desktop apps where the goal is showing your site at different dimensions all at the same time. So you can, for example, be writing

CSS Grid is a collection of properties designed to make layout easier than it’s ever been. Like anything, there's a bit of a learning curve, but Grid is

I see Google Fonts rolled out a new design (Tweet). Compared to the last big redesign, this feels much more iterative. I can barely tell the difference
