(I made an edit to the code after posting, I think it’s better now, and added some background)
I’m a bit of a readability nerd. I added these two snippet to make text more readable. The negative word spacing is to prevent ‘rivers’, lines of white space between words on different lines, and the letter spacing is to better differentiate each character. These two adjustments are often made in book typography.
You can see (although minimal differences) that the ‘after’ image has a more even look then the ‘before’ image.
I use it with the default macOS font, ‘San Francisco’ and since every typeface has different kerning you will need to tweak it further for your own choice of typefaces. Go slowly on the values, take very small steps.
Before:
After:
/* Better word and character spacing */
body {
word-spacing: -0.04rem;
letter-spacing: 0.01rem;
}
This one makes type a lot sharper and clear on hires screens. This might not be complete for all platforms, I’m uncertain if WebKit and moz-osx account for all web renderers.
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}