Px instead of em

I have the settings set to px, yet in cornerstone when I choose classic text it keeps setting the font size in em. How do I make it stay on px?

Hi @vmars9,

Thanks for writing in.

I have tried it in my setup and classic and new text is working well. Please check your setup if it the latest version.

Latest version:

Updating guide:

Let us know how it goes.

Thanks.

Font size is still default em in cornerstone while my settings are “px,” I would like to change all of cornerstone to default to px.

The default font size for V2 elements will always be in EMs. There isn’t a way to change the default. In the next major release you’ll be able to save your own presets which will allow you to save a version of an element that can be reused. Using that you could set the font size in px, and apply your preset to new elements.

We would recommend looking into how em and rem units work, as they have become a best practice in web development for setting typography sizes. The global theme options for typography allow you to set the body font size at certain breakpoints. Then the em and rem units can be used to relatively size your content based on that root size. You can think of rems as the percentage of the root font size (body) and ems as the percentage of the parent elements font size. If the body font size is 14px, then 1rem would equate to 14px.

The idea is that you set the arbitrary values in a single place, then the rest of your content scales accordingly. One good example would be button padding. If you set it in ems, then the spacing around the button will be consistent regardless of what font size the button text takes on.

Thank you I appreciate all the information.

I do know how to use em, I am just accustomed to using px and px allows for more flexibility. I know what 12px, 14px looks like from being accustomed to seeing font in px. I’m not ready to completely change to em.

Hi There,

You can click on the EM with grey background and switch to px.

Hope it helps

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.