-
Notifications
You must be signed in to change notification settings - Fork 446
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
数学运算:less编译为css是,除法没有被编译成功,这是一个bug嘛? #540
Comments
Did you use less v4 ? If you use v4, you need change youe code like follow: @width: 100px;
@height: @width / 10;
div {
width: @width;
height: @height;
border: 1px solid #0;
position: relative;
top: 100px 100px;
left: 100px - 2;
margin: 10px * 2;
padding: (10px / 2); // <- add parens ()
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
less文件:
`@width: 100px;
@height: @width / 10;
div {
width: @width;
height: @height;
border: 1px solid #000;
position: relative;
top: 100px 100px;
left: 100px - 2;
margin: 10px * 2;
padding: 10px / 2;
}`
编译命令: lessc styles.less styles.css
编译后产生的css文件:
div { width: 100px; height: 100px / 10; border: 1px solid #000; position: relative; top: 200px; left: 98px; margin: 20px; padding: 10px / 2; }
有人知道是怎么回事嘛?
The text was updated successfully, but these errors were encountered: