The ex unit in CSS (#tilPost)

Today, it’s a really quick one. I came across the ex unit in CSS, and I didn’t know that it was a thing. It stands for the x-height, and the spec defines it as follows:

The x-height is so called because it is often equal to the hei…


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis

Today, it's a really quick one. I came across the ex unit in CSS, and I didn't know that it was a thing. It stands for the x-height, and the spec defines it as follows:

The x-height is so called because it is often equal to the height of the lowercase "x".

I'm not sure when I would use that, but I hope to remember it when I find a need for it. A picture is worth more than words, so here we go with a quick #devsheets illustration. ?

The ex unit in CSS


Reply to Stefan


This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis


Print Share Comment Cite Upload Translate
APA
Stefan Judis | Sciencx (2022-12-08T16:41:12+00:00) » The ex unit in CSS (#tilPost). Retrieved from https://www.scien.cx/2020/07/19/the-ex-unit-in-css-tilpost/.
MLA
" » The ex unit in CSS (#tilPost)." Stefan Judis | Sciencx - Sunday July 19, 2020, https://www.scien.cx/2020/07/19/the-ex-unit-in-css-tilpost/
HARVARD
Stefan Judis | Sciencx Sunday July 19, 2020 » The ex unit in CSS (#tilPost)., viewed 2022-12-08T16:41:12+00:00,<https://www.scien.cx/2020/07/19/the-ex-unit-in-css-tilpost/>
VANCOUVER
Stefan Judis | Sciencx - » The ex unit in CSS (#tilPost). [Internet]. [Accessed 2022-12-08T16:41:12+00:00]. Available from: https://www.scien.cx/2020/07/19/the-ex-unit-in-css-tilpost/
CHICAGO
" » The ex unit in CSS (#tilPost)." Stefan Judis | Sciencx - Accessed 2022-12-08T16:41:12+00:00. https://www.scien.cx/2020/07/19/the-ex-unit-in-css-tilpost/
IEEE
" » The ex unit in CSS (#tilPost)." Stefan Judis | Sciencx [Online]. Available: https://www.scien.cx/2020/07/19/the-ex-unit-in-css-tilpost/. [Accessed: 2022-12-08T16:41:12+00:00]
rf:citation
» The ex unit in CSS (#tilPost) | Stefan Judis | Sciencx | https://www.scien.cx/2020/07/19/the-ex-unit-in-css-tilpost/ | 2022-12-08T16:41:12+00:00
https://github.com/addpipe/simple-recorderjs-demo