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

UnitInput: Fix unit change for zero values #254

Open
ItsJonQ opened this issue Feb 2, 2021 · 2 comments
Open

UnitInput: Fix unit change for zero values #254

ItsJonQ opened this issue Feb 2, 2021 · 2 comments
Assignees
Labels
bug Something isn't working components

Comments

@ItsJonQ
Copy link
Owner

ItsJonQ commented Feb 2, 2021

It looks like UnitInput is unable to handle unit changes for values like 0px -> 0vh

@ItsJonQ ItsJonQ self-assigned this Feb 2, 2021
@ItsJonQ ItsJonQ added bug Something isn't working components labels Feb 2, 2021
@aristath
Copy link

aristath commented Feb 3, 2021

Why should it handle them? Changing units when the value is 0 doesn't really change anything... 0px is the same as 0% and 0em 🤔

@ItsJonQ
Copy link
Owner Author

ItsJonQ commented Feb 9, 2021

Great question! The rendered value doesn't change (CSS wise). However, I think the UI feels broken if I (the user) manually typed a change from 0px or 0vh. Or worse... used the unit selector to change from 0px to 0vh.

Neither methods work at the moment 🙈

https://g2-components.xyz/iframe.html?id=components-unitinput--default&viewMode=story

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working components
Projects
None yet
Development

No branches or pull requests

2 participants