These are chat archives for LearnBoost/stylus

19th
Mar 2016
S├ębastien D.
@demsking
Mar 19 2016 21:13
Hi

Why this code does not work?

div
    $length = 28px
    width: ceil(sqrt(2*$length*$length))
Error: /home/user/node/lib/node_modules/stylus/lib/functions/index.styl:55:12
   51| // Rounding Math functions
   52| 
   53| ceil(n, precision = 0)
   54|   multiplier = 10 ** precision
   55|   math(n * multiplier, 'ceil') / multiplier
------------------^
   56| 
   57| floor(n, precision = 0)
   58|   multiplier = 10 ** precision

How to fix it?

Covington Doan
@covingtondoan
Mar 19 2016 21:34
@demsking Instead of sqrt() did you try math(x, 'sqrt')?
S├ębastien D.
@demsking
Mar 19 2016 21:44
@covingtondoan Its works, thanks :+1: