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

Issues with negative Numbers and Sizes #25

Open
laeubi opened this issue Sep 28, 2014 · 2 comments
Open

Issues with negative Numbers and Sizes #25

laeubi opened this issue Sep 28, 2014 · 2 comments

Comments

@laeubi
Copy link

laeubi commented Sep 28, 2014

I'm facing several issues with negative numbers, eg
top: -@variable
outputes
top: - 2.5mm;
(there is a space betwenn the minus sign an the value)

Using
top: @eval(-1*@variable)
outputs
top: 2.5mm

Using
top: @eval(-@variable)
outputs
org.zkoss.zuss.ZussException: Unable to negate a size, 2.5mm

From the source I can't see why it should not be possible to negate a size (since it's an ordinary number with a unit), so thin can be added. Another strange thing is that the negate operator only negates sizes and colors but not Numbers.

@laeubi
Copy link
Author

laeubi commented Sep 28, 2014

Testcase

@VARIABLE: 2.5mm;

div1 {
    top: -@VARIABLE;
}
div2 {
    top: @eval(-1*@VARIABLE);
}
div 3 {
    top: @eval(-@VARIABLE);
}

laeubi added a commit to laeubi/ZUSS that referenced this issue Sep 28, 2014
@laeubi
Copy link
Author

laeubi commented Sep 28, 2014

I created a pull request that fixes case 2 and 3, @tomyeh do you have any cahnce in looking at case 1? I currently can't see where to start to debugg that problem.

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