2

Attached is a trace while compiling using grunt dist

(webmaker)Anils-MacBook-Pro:bootstrap anil$ grunt dist
Running "clean:dist" (clean) task

Running "less:compileCore" (less) task
>> ArgumentError: error evaluating function `ceil`: argument must be a number in less/variables.less on line 48, column 27:
>> 47 @font-size-base:          15px;
>> 48 @font-size-large:         ceil(@font-size-base * 1.25); // ~18px
>> 49 @font-size-small:         ceil(@font-size-base * 0.85); // ~12px
Warning: Error compiling less/bootstrap.less Use --force to continue.

Aborted due to warnings.

The grunt-contrib-less is the latest version and as can be seen, the variable @font-size-base is defined just above and it works.

A similar thread I found https://groups.google.com/forum/#!topic/brackets-dev/ZpBOFqDc3H8 but no solutions yet.

1
  • 1
    It looks like it's compiled with --strict-math=on Less option but Boosrtrap 3.0.3 (and below) requires --strict-math=off. (Contrary the current Boosrtrap master requires --strict-math=on). Commented Jan 20, 2014 at 11:20

1 Answer 1

12

The solution is probably to add extra parentheses to the @font-size-large and @font-size-small lines.

Before:

@font-size-large:         ceil(@font-size-base * 1.25); // ~18px
@font-size-small:         ceil(@font-size-base * 0.85); // ~12px

After:

@font-size-large:         ceil((@font-size-base * 1.25)); // ~18px
@font-size-small:         ceil((@font-size-base * 0.85)); // ~12px

I'm guessing this has happened because you, like me, changed @font-size-base, and a bad merge for some reason protected that line, but also the following two lines. (Something changed between 3.0 and 3.1 that means those lines need double parentheses--see @font-size-h1, @font-size-h2, etc.)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.