Forum How do I...?

CSS3 Units

dancotter
Is there a list of what units are and are not supported?

I have noticed that ch, rem, vh, and vw do not work. ex sort of works but is usually wrong.
mikeday
in, mm, cm, pt, pc, q, px, ex :)

As you say, ex is a tricky unit and is currently treated equivalently to 0.5em.
dancotter
Thanks mike.

I ended up making a page to test units as attached, might be useful for someone. Green bars should be around half the view if the view is set to size A4.

Working: % px mm cm in pt pc em

Not accurate: ex

Not working ones are: ch, rem, vh, vw, vmin, vmax.

Chrome supports all of them, except they too seem to estimate ex and ch which is understandable.
  1. unitsA4.html1.1 kB

Edited by dancotter

rlpowell
It's too bad about rem :(

I don't like em's cascading behaviour, I find it confusing.
mikeday
Prince latest builds now support rem units! :D
shorshe
Hi Mike,
fitting text into a box is one of my major obstacles. I'd like to think "vw" would help me in this scenario. Is support for vw anywhere on the roadmap?
mikeday
Yes vw/vh units are on the roadmap. although we are not working on them right at this moment.