CSS knows several measurement units. The best known unit is pixels, but there are other units that are not that popular but very handy in some uses...
For further actions, you may consider blocking this person and/or reporting abuse
Good one, Matthias!
These are all length units. Here's your friendly reminder that in CSS you could also measure:
deg
,rad
,grad
,turn
);s
,ms
);16/9
);Hz
,kHz
) (but nobody has ever implemented it haha)The frequency is on "CR" (Candidate Recommendation) yet. So, not a single browser implemented this yet.
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... 🙃
Yep haha...this one is really weird, and I think pretty useless. But well...#JustW3Things
Thank you! 🙏
I could not even imagine a use case for frequency 🤔 Do you have an example?
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 😐
Nice article, easy to skim through and to the point, thank you! :)
I have to admit, i still use px everywhere in practice.
Occasionally i use vh and vw for layout and such.
Someday i will get an opportunity to make or implement a system that uses proper font scaling... Or so i keep telling my self.
A quick way to jump on the relative size bandwagon: Replace all uses of px with rem and adjust accordingly :)
I need to align it with teams of mixed experience already making lots of other more major mistakes, telling people to use px values is a lot easier than adding to the pile of things to learn :/
I agree tho, it’s a good way to start a migration. :)
Reporting back, did this.
Thank you.
Nice! 🎉
Great post. Very well written and detailed.
On top of this, I recommend listing to syntax.fm/show/107/hasty-treat-css... episode. It covers all of the above units well. Will act to strengthen what you get from this article.
Thank you! I always try hard to write good articles. I hope they are easy to understand as English is not my mother language.
I didn't know that there is a CSS units episode of syntax.fm. I started listening their podcast a few weeks ago.
@wesbos and @stolinski are incredible good hosts and it's fun to listen.
Thanks for the shout out!
There is another interesting unit 'q'. 1q = 0.945px (approx.). I came across this unit while css code-golfing on cssbattle.dev .
Nice article!
Brief and well explained
Thank you so much for your feedback!
Awesome article - thank you.
Thank you!
Great post!
Thank you!
hlo,i am front end developer ,woking in html ,css, js, bs .
what should add on my profile for future developement skills.
Hello, I'd like to translate this awesome tutorial to Chinese. The translated text will be published at nextfe.com. Can you give me the permission? :-)
Nice one 👏👏