Search code examples
cssgoogle-chromeviewport-units

"vw" CSS units in calc in Chrome not working


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?


Solution

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