re-resizable icon indicating copy to clipboard operation
re-resizable copied to clipboard

height issue with getStringSize - add 'px' where I don't need

Open dana2208 opened this issue 3 years ago • 2 comments

Hi,

I put my height to be: calc(100% - var(--top-header-height))

But it goes through the function getStringSize where it adds "px" at the end. In fact var(--top-header-height) is 50px which means that I wanted: height: calc(100% - 50px) and not: height: calc(100% - 50px)px

Therefore the height css attribute is not working.

Moreover it can be in the future that I want: height: var(--top-header-height) and I don't want neither 'px' at the end since this variable already contains px.

Can you fix this issue?

Thank you!

dana2208 avatar Dec 12 '21 13:12 dana2208

I have the same issue. It should be fixed, if first it will be checked, if the input n is a number, then ${n}px should be returned and line 186 should be replaced to return n, so all other conditions can be removed. I think such safety checks are not necessary.

Fridious avatar Mar 08 '22 01:03 Fridious

Does anyone know, if the project lead accept pr, then I could fix it?

Fridious avatar Mar 08 '22 02:03 Fridious