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…

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
Print Share Comment Cite Upload Translate
CITATION GOES HERE CITATION GOES HERE
Select a language: