"vw" CSS units in calc in Chrome not working

user663031 picture user663031 · Jan 6, 2013 · Viewed 15.5k times · Source

The new vw (and vh, vmin and vmax) CSS units are quite useful, as is calc. Both work fine in Chrome (the latter prefixed as -webkit-calc), but for some reason I've found that calc property values including the v* units, such as width: -webkit-calc(95vw - 25em) yield an invalid property value. Is this just not implemented yet, or the spec, or a bug?

Answer

Jukka K. Korpela picture Jukka K. Korpela · Jan 6, 2013

It’s a bug, registered as Bug 94158 - calc isn't working with viewport units.