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

Operator range (..) does not take into account units. #2793

Open
Denis535 opened this issue May 17, 2023 · 1 comment
Open

Operator range (..) does not take into account units. #2793

Denis535 opened this issue May 17, 2023 · 1 comment

Comments

@Denis535
Copy link

It all works, but units don't affect anything.
Strange, but I did not find a similar issue.

p(i) for i in 0..1
p(i) for i in 2..3%
p(i) for i in 4..5px

�[90minspect:�[0m 0
�[90minspect:�[0m 1
�[90minspect:�[0m 2
�[90minspect:�[0m 3
�[90minspect:�[0m 4
�[90minspect:�[0m 5
@Denis535
Copy link
Author

Denis535 commented May 17, 2023

How to achieve it?

Update:
You can use:
range(10px, 50px, 10)

Update:
It doesn't work!
range(0px, -100px, -1)

https://github.com/stylus/stylus/blob/dev/lib/functions/range.js#LL28C1-L28C1

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

1 participant