# Bug: Designer Perspective expects string for style.fontSize

**URL:** <https://forum.inductiveautomation.com/t/bug-designer-perspective-expects-string-for-style-fontsize/35115>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [May 28, 2020, 1:30pm UTC](https://forum.inductiveautomation.com/t/bug-designer-perspective-expects-string-for-style-fontsize/35115 "2020-05-28T13:30:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![321liftoff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/321liftoff/32/27544_2.png) [@321liftoff](https://forum.inductiveautomation.com/u/321liftoff)\
**Post date:** [May 28, 2020, 1:30pm UTC](https://forum.inductiveautomation.com/t/bug-designer-perspective-expects-string-for-style-fontsize/35115/1 "2020-05-28T13:30:28Z")

</div>

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.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/678c0f2c6438acd27ae6134036d1a83cfcba736f.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 28, 2020, 1:53pm UTC](https://forum.inductiveautomation.com/t/bug-designer-perspective-expects-string-for-style-fontsize/35115/2 "2020-05-28T13:53:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![321liftoff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/321liftoff/32/27544_2.png) [@321liftoff](https://forum.inductiveautomation.com/u/321liftoff)\
**Post date:** [May 28, 2020, 3:20pm UTC](https://forum.inductiveautomation.com/t/bug-designer-perspective-expects-string-for-style-fontsize/35115/3 "2020-05-28T15:20:34Z")

</div>

Thanks for that pointer. Checking the documentation:  
[https://docs.inductiveautomation.com/display/DOC80/Style+Reference](https://docs.inductiveautomation.com/display/DOC80/Style+Reference)

> 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"?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 28, 2020, 3:31pm UTC](https://forum.inductiveautomation.com/t/bug-designer-perspective-expects-string-for-style-fontsize/35115/4 "2020-05-28T15:31:40Z")

</div>

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](https://www.python.org/dev/peps/pep-0020/))

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [May 28, 2020, 3:33pm UTC](https://forum.inductiveautomation.com/t/bug-designer-perspective-expects-string-for-style-fontsize/35115/5 "2020-05-28T15:33:26Z")

</div>

Consider using “Em” or Percent as well

[https://kyleschaeffer.com/css-font-size-em-vs-px-vs-pt-vs-percent](https://kyleschaeffer.com/css-font-size-em-vs-px-vs-pt-vs-percent)
