Here are some new(ish) CSS properties that are seriously worth adopting. We use them in production, suggest you also try them out if not already. Hopefully there is a couple you haven’t tried yet.

Balanced headlines without manual line breaks

h1 { text-wrap: balance; }

Stops headlines from having one word on the last line. Browser redistributes text automatically. Works across modern browsers.

Tailwind: text-balance

Massive performance boost for long pages

article { content-visibility: auto; }

Browser skips rendering off-screen content. Massive performance boost for long pages with lots of content. You need to handle heights properly (via contain-intrinsic-size) to prevent scroll jumping.

Tailwind: [content-visibility:auto]

F…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help