Bug: Designer Perspective expects string for style.fontSize

When modifying the style of a Perspective component such as a button or label, having a number in the style.fontSize value generates the following warning in the Designer.

Changing the fontSize to a string results in the size not changing.


I think it need to specify the unit as well, e.g.

Thanks for that pointer. Checking the documentation:

Font Size
Specifies the size of the font in pixels (px) or points (pt). If you enter just a number, Perspective assumes the value is in pixels.

So Designer should also have the same assumption and not throw a warning/error? Or maybe have the warning more descriptive: “Interpreting value as number of pixels”?

Well, it’s just a type validation error - as you’ll notice, it doesn’t actually affect anything in the runtime. It can, and probably eventually will, be relaxed on our end, but in the meantime, you can either safely ignore it, or add units (because explicit is better than implicit)

Consider using “Em” or Percent as well