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

calc -- not working correctly. #2837

Closed
xblakestone opened this issue Mar 10, 2016 · 3 comments
Closed

calc -- not working correctly. #2837

xblakestone opened this issue Mar 10, 2016 · 3 comments

Comments

@xblakestone
Copy link

[less.min.js - v2.5.3]
I tried to use 'calc' such as "width:calc(100% - 35px);" and it would calculate the 35px as a percent i.e. 100% - 35% (page displayed width:65%).

I am still new to LESS and not sure if this is a bug or maybe I am not using it correctly?

@Justineo
Copy link
Contributor

You should use:

width: ~"calc(100% - 35px)";

You can try it here.

@seven-phases-max
Copy link
Member

See --strict-math and examples of escaping syntax (for the default --strict-math=off) there.

@seven-phases-max
Copy link
Member

Closing as expected behaviour.

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

3 participants