DEV Community

Discussion on: Units in CSS (em, rem, pt, px, vw, vh, vmin, vmax, ex, ch, ...)

Collapse
 
maxart2501 profile image
Massimo Artizzu

Good one, Matthias!

These are all length units. Here's your friendly reminder that in CSS you could also measure:

  • angles (deg, rad, grad, turn);
  • time (s, ms);
  • aspect ratio (expressed as a fraction, like 16/9);
  • frequency (Hz, kHz) (but nobody has ever implemented it haha)
Collapse
 
asfo profile image
Asfo

The frequency is on "CR" (Candidate Recommendation) yet. So, not a single browser implemented this yet.

Collapse
 
maxart2501 profile image
Massimo Artizzu

And we won't see them implement it either for the foreseeable future either. Because, after reaching the CR stage in 2012, the CSS Speech Module has been largely ignored by vendors and has actually been retired last year.
So much for standards... 🙃

Thread Thread
 
asfo profile image
Asfo

Yep haha...this one is really weird, and I think pretty useless. But well...#JustW3Things

Collapse
 
matthias profile image
Matthias 🤖

Thank you! 🙏

I could not even imagine a use case for frequency 🤔 Do you have an example?

Collapse
 
maxart2501 profile image
Massimo Artizzu

No... and nobody will have one either for a while! 😂

But it was meant for some properties (like pitch) where a synthesized voice was involved, for screen readers and such.

And it's actually the second time a module like this gets canned. Oh well, looks like the visually impaired are fine without it 😐