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

modularScale throws an error if its second argument is a number #429

Closed
ervasive opened this issue Apr 22, 2019 · 2 comments
Closed

modularScale throws an error if its second argument is a number #429

ervasive opened this issue Apr 22, 2019 · 2 comments
Labels

Comments

@ervasive
Copy link

The documentation states that the second parameter to the modularScale can be either a number or string, but when I try to provide a unitless number it throws an error.

  • polished version: 3.2.0

Mixin/Helper/Shorthand you were using and how you were using it:

modularScale(1, 1.5)

What you are seeing:

Error: Invalid value passed as base to modularScale, expected number or em/rem string but got 1.5.`

What you expected to see:

1.9994999999999998 (as a plain number without units)

Reproduction:

https://codesandbox.io/s/133lqrox73 (look at console output)

Thanks.

@bhough
Copy link
Contributor

bhough commented Apr 26, 2019

Thanks @ervasive

We're working on a re-write of modularScale that should be out soon that will address this problem and free it from its current em/rem limitation.

@bhough
Copy link
Contributor

bhough commented May 5, 2019

Addressed in 3.3.0

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

Successfully merging a pull request may close this issue.

2 participants