Allow floating-point em dimensions

Previously creating a template with a dimension such
as "width": "1.5em" would break the layout because
it wasn't being parsed correctly.