Skip to content

Instantly share code, notes, and snippets.

View srflp's full-sized avatar
🎯

Filip Sauer srflp

🎯
  • Prismic
  • Poznań, Poland
  • 23:13 (UTC +01:00)
  • LinkedIn in/srflp
View GitHub Profile
@basham
basham / css-units-best-practices.md
Last active October 9, 2024 20:03
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units