Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dana2208 opened this issue Dec 12, 2021 · 2 comments
Open

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

dana2208 opened this issue Dec 12, 2021 · 2 comments

Comments

@dana2208
Copy link

dana2208 commented Dec 12, 2021

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!

@Fridious
Copy link

Fridious commented Mar 8, 2022

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
Copy link

Fridious commented Mar 8, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants