Sass and rounding down numbers. Can this be configured?

后端 未结 3 1479
野性不改
野性不改 2020-12-03 18:15

Is there any way for me to modify the way that Sass will handle decimal places? I saw a few people saying that Sass will dynamically do the (target/parent)*100 calculation n

3条回答
  •  醉梦人生
    2020-12-03 19:04

    It can also be configured using --precision in the commandline, see SASS Changelog, version 3.1.8.

    Should also add that if you want to edit @precision in numbers.rb directly, you can find numbers.rb (at least on OS X), here:

    /usr/lib/ruby/user-gems/1.8/gems/sass-3.1.10/lib/sass/script
    

    1.8 and 3.1.10 should of course be replaced with your (preferably the latest) version numbers.

提交回复
热议问题